Skip to content

Fix numeric string Worker names in PHP SDK 2.5.1 - #181

Merged
rmcdaniel merged 4 commits into
mainfrom
general/numeric-handler-names
Oct 18, 2026
Merged

rmcdaniel merged 4 commits into
mainfrom
general/numeric-handler-names

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 18, 2026 •

Copy link
Copy Markdown
Member

Addresses #180. Published-package acceptance completes the issue.

Normally installed PHP SDK 2.5.0 rejects a managed workflow named 0 or 17 before registration. PHP coerces these dictionary keys to integers. The low-level API accepts strings, but later validation, attributed registration and fingerprint calls expect those stored keys to remain strings.

Change

  • Recover original string names at the internal dictionary boundaries for workflow/activity/query/signal/update declarations.
  • Keep advertised names and reflected command names as strings, including distinct 17 and 017.
  • Serialize nonempty keyed registration maps as JSON objects when PHP would otherwise encode contiguous numeric keys as a list. Keep omission and legacy empty metadata behavior unchanged.
  • Preserve duplicate/malformed refusal and attributed registration atomicity.
  • Prepare compatible patch 2.5.1. Public method signatures, runtime dependency constraints and protocol floors are unchanged.

Qualification

Normally installed 2.5.0 controls refuse 0 and 17, while 017 and an ordinary name pass. The observed managed Worker failure occurs before HTTP registration, with zero workflows/tasks in the separate Server 2.9.4 runtime. This is not a Server or Core defect.

On unchanged runtime, the corrected 24-case regression suite reports 11 TypeErrors and two JSON-map failures, with 11 controls passing. Current implementation passes all 24 cases / 102 assertions, PHPStan and the full local suite: 2,463 tests / 12,317 assertions, 56 explicit environment-dependent skips. The first test draft had a plural-key typo; a later assertion incorrectly compared wrapper closure identity. Both fixture errors are corrected, with actual activity dispatch used for the identity control.

Final candidate 2e76c92974ce867340d2fbddceaacea6e32f6b38 / tree 0c8042952a1e008681b72ba80a29c216a2d4ea17 passes every applicable hosted check: PHP 8.1–8.4, package/identity, Laravel/Symfony bridges, transitions, docs, static analysis and official corpus/counterfactual validation. A numeric attributed workflow now retains its original caller context and isolated state across three cold tasks. The preceding source fails its registration boundary. No corpus policy or threshold was relaxed. Connected cooperation remains explicitly skipped.

The first hosted e529627 run remains failed on incomplete quickstart release metadata and missing corpus growth. Both were corrected before final qualification. Local official corpus invocation lacked Git in its tooling image; the PHP fixture and hosted official validation pass separately.

Sonar passes with zero OPEN/CONFIRMED PR findings, 0.0% new duplication and no ignored conditions. Merged source aba516ef471a414365f384810307bb3f93f98d4a has the identical tested tree. Automatic main checks remain their own runs.

Separate source HTTP qualification uses the unpublished exact implementation with loaded Worker/Client hash checks against verified Server 2.9.4. All three 0/17/017 originals pass typed execute and fresh-process cold reads, preserving original 30-second budgets. Three Workers and both API/queue roles exit 0 with no OOM/restarts. Stopped WAL-aware SQL confirms three completed runs/activities, nine completed tasks, eighteen events, zero repairs/failed jobs and unchanged original database/sidecar bytes. The first direct read-only audit could not open WAL; corrected readback uses a disposable copy of the stopped database and WAL, with the original mounted read-only. All runtime data and resources are removed.

Published 2.5.1 at exact aba516ef. Packagist source/dist references and the normal installed package match. The fresh registry-only consumer passes all three numeric-name typed execute/cold-read originals on the verified Server image. All managed Workers/API/queue exit 0, no OOM/restarts. Stopped readback confirms three completed runs/activities, nine completed tasks, eighteen events and zero repairs/failed jobs; original database and sidecar bytes remain unchanged. Fresh main CI 39143182758 also passes every applicable check. Package acceptance is complete; Sample/website alignment remains separate follow-through.

No Server, Workflow, native/shared/frozen fixture, schema, dependency or held Rust-major edit.

@sonarqubecloud

Copy link
Copy Markdown

@rmcdaniel
rmcdaniel marked this pull request as ready for review October 18, 2026 16:02
@rmcdaniel
rmcdaniel merged commit aba516e into main Oct 18, 2026
37 checks passed
@rmcdaniel
rmcdaniel deleted the general/numeric-handler-names branch October 18, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants