Repository navigation
Admit signals before any worker declares a contract, as PHP does - #572
Merged
Merged
Conversation
A run started before any worker registered for its type has no recorded command contract. Native treated that as a contract declaring nothing and rejected every signal with 404 unknown_signal, so the signal was lost; published PHP admits it (external_contract_unavailable). Admission now follows PHP's signalAdmissionForRun: only a complete durable contract makes a signal unknown, a declared signal without a parameter contract takes its arguments as given, and the runtime message-stream signal name is refused with 422 runtime_reserved_signal before admission, without a command. A signal without input, or with null input, has no arguments. Recorded contracts carry PHP's entry defaults, so they are complete. Signal responses carry workflow_type, the control_plane envelope projects exactly PHP's PROJECTED_FIELDS, and cancel and terminate responses carry it too. The new signals-before-worker fixture compares every response with a reviewed copy of published PHP's. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
rmcdaniel
enabled auto-merge
October 21, 2026 06:46
12 tasks
Member
Author
…ore-worker # Conflicts: # docs/rust-server-port.md
Member
Author
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Part of #325.
Native now admits signals as published Server 2.5.14 does when no worker of the workflow type has registered yet. Before this change, native rejected such signals with 404
unknown_signal, so they were lost. PHP accepts them.Found by. The Waterline service-mode qualification (#325 comment 6309509447) ran published Waterline 2.12.0 in front of PHP and in front of native, with identical seeds. Parity fixtures never reach this state, because they always run a worker.
Cause. Native records a run's command contract at start only when a worker for the type has registered. It then treated a missing contract as one that declares nothing. Its recorded contracts also lacked PHP's
declared_entry_*fields.What changes (following PHP's
signalAdmissionForRunandServerWorkflowControlPlane::signal):runtime_reserved_signalwith PHP's body, before admission and whatever the run's state. No command is recorded.input, or with null input, has no arguments. Native previously refused it withunsupported_payload_codec.handle,canonicalandexternal:<type>.workflow_type. Thecontrol_planeenvelope projects exactly PHP'sPROJECTED_FIELDS. Cancel and terminate responses now carry the envelope.Evidence.
signals-before-workerfixture, compared with a reviewed copy of PHP's responses. Locally, published PHP, embedded and this branch's native build pass it; the native build from Native takeover: refuse PHP schedules native cannot run yet #568's branch (current main plus Native takeover: refuse PHP schedules native cannot run yet #568) fails it.cooperative_child_independentdeadline test, fixed separately), signal tests on PostgreSQL and MySQL 8.4 (36 each), and all 5,043tests/Unit/ServerParity*contract tests.Out of scope, tracked on #325. The same comparison found three more differences, each with its own task:
UpdateRejectedevent;query_worker_unavailablerouting refusals;🤖 Generated with Claude Code