Repository navigation
End a signal wait where cancellation was delivered - #1316
Merged
Merged
Conversation
A cooperative cancellation delivered at a signal wait, including timeout cleanup's interruption, records no SignalWaitCancelled, so the derived signal-wait view kept the wait open. A signal accepted afterwards was attributed to it: its SignalReceived and SignalRejected carried the interrupted wait's signal_wait_id, and SignalWaits showed the wait as received although the signal never applied. WorkflowTimedOut also left open waits open. SignalWaits now closes the wait at a signal delivery, and the member waits of a delivered group, as cancelled with source status cancellation_delivered, and closes open waits on WorkflowTimedOut. A later signal finds no open wait and is buffered under its own command identity. No history is added. The replay cursor and durable handle cancellation read the view with replayCompatible, which keeps the earlier states, so recorded histories replay unchanged. Fixes #1315. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
forRun grew past the cognitive-complexity and length limits with the delivery and timeout closures. Each event type now has its own handler, with the same state transitions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The step cursor reads SignalWaits with replayCompatible so that a wait closed by cancellation delivery still counts as it always did. A new feature test catches the delivery at a signal wait, waits for the same signal again, and checks that an update applied at the first wait sees the same step cursor when the last task replays it. Without the flag the replay sees 1 instead of 2. The CHANGELOG notes the bridge-worker upgrade edge case for a late signal an earlier engine attributed to the interrupted wait. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ECS on CI rewrote the chained call differently from a local fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Member
Author
|
Independent review: PASS at head ffbd258 Verification summary
Non-blocking notes
|
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.



Fixes #1315.
A cooperative cancellation delivered at a signal wait (timeout cleanup or ordinary cancellation) records no
SignalWaitCancelled, soSignalWaitskept the wait open. A signal accepted later was attributed to it, and the wait showed as received although the signal never applied.WorkflowTimedOutalso left open waits open.Change (derived views only, no new history)
SignalWaits::forRuncloses the wait at aCooperativeCancellationDeliveredwithcall_kind: signal, and the member waits of aparallel(selection) delivery, ascancelled/cancellation_delivered. Deliveries at a durable handle await or a started-child await close nothing, because the operation stays awaitable.WorkflowTimedOutcloses open waits (closed) like the other terminal events. Run detail gets a summary line for the new source status.signal-command:<command id>. That's the identity any signal accepted with no open wait already gets. ItsSignalReceivedandSignalRejectedno longer carry the interrupted wait's id, and it no longer schedules a workflow task that couldn't apply it.visibleSequenceForCurrent) and durable-handle cancellation (executor and bridge) readforRun(..., replayCompatible: true), which keeps the old states. Recorded histories replay unchanged. Pre-fix histories that already attributed a late signal now show the wait as interrupted.Tests
V2TimeoutCleanupTest: the Prove embedded timeout cleanup at signal/selection waits, under worker loss, and on the deadline turn #1312 signal-wait test, and the selection test, assert the wait is cancelled /cancellation_deliveredinSignalWaitsand run detail, and that the lateSignalReceivedandSignalRejectedcarry the buffered id.DurableWaitProjectionTest: closure for signal and group deliveries, no closure for a handle delivery,WorkflowTimedOut, and the replay-compatible view.cooperative-delivery-ends-signal-wait-attribution: ordinary cancellation. A pre-fix history replays and its view is corrected, and a live run buffers the late signal.validate-regression-corpus.pypassed locally with the counterfactual: the fixture fails on base and passes here.Native Server has the same attribution. That's reported separately and not changed here.
🤖 Generated with Claude Code