Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,22 @@
column outside the migrator transaction under the schema lock budget, with
no backfill. To fill it for opted-in runs that closed before the upgrade,
rebuild them with `workflow:v2:rebuild-projections --run-id=...`.
- A signal wait interrupted by a delivered cooperative cancellation, including
timeout cleanup, is no longer reported as received by a later signal
(#1315). `SignalWaits`, run detail and the projected waits show it as
`cancelled` with source status `cancellation_delivered`, also for the member
waits of a delivered group. A signal accepted after delivery is buffered
under its own command identity, as any signal without an open wait is: its
`SignalReceived` and `SignalRejected` no longer carry the interrupted wait's
`signal_wait_id`, and it no longer schedules a workflow task that could not
apply it. A `WorkflowTimedOut` run now closes its open signal waits like the
other terminal events. History is unchanged and replay keeps its earlier
view of these waits; runs recorded before the upgrade show the corrected
wait state on their next projection.
One upgrade edge case: on an external (bridge) worker, an in-flight run
whose late signal an earlier engine attributed to the interrupted wait, and
which then opens a new wait for that signal, may not schedule a task for it
until another task runs. Embedded runs are unaffected.

## 2.42.0 - 2026-11-26

Expand Down
2 changes: 1 addition & 1 deletion src/V2/Support/DefaultWorkflowTaskBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -3102,7 +3102,7 @@ private function cancelSelectionLeaf(WorkflowRun $run, WorkflowTask $task, int $
}

$run->unsetRelation('historyEvents');
foreach (SignalWaits::forRun($run) as $wait) {
foreach (SignalWaits::forRun($run, replayCompatible: true) as $wait) {
if (($wait['sequence'] ?? null) === $sequence && ($wait['status'] ?? null) === 'open') {
return true;
}
Expand Down
4 changes: 4 additions & 0 deletions src/V2/Support/RunWaitView.php
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,10 @@ private static function signalWaits(WorkflowRun $run, array $taskByTimerId): arr
),
'cancelled' => match ($wait['source_status']) {
'timeout_cancelled' => sprintf('Signal %s timeout was cancelled.', $wait['signal_name']),
'cancellation_delivered' => sprintf(
'Signal %s wait ended when cancellation was delivered to it.',
$wait['signal_name'],
),
'cancelled' => 'Signal wait ended when the run was cancelled.',
'terminated' => 'Signal wait ended when the run was terminated.',
'continued' => 'Signal wait ended when the run continued as new.',
Expand Down
Loading