Repository navigation
Admit settle parallel groups and wake once every member has an outcome - #1383
Conversation
Native refused explicit settle groups because its barrier counted only successful members as closed and woke the workflow at the first failure. A settle group would either wake too early or never wake. Inside a settle group a member failure no longer wakes the workflow. The group closes when every member has an outcome: a completed, failed or cancelled activity, a fired or cancelled timer, a completed, failed, cancelled or terminated child, or a closed condition wait. A retrying activity has no outcome yet. The last outcome wakes the workflow once, and its history holds each member's result or failure. Legacy and propagate groups keep the fail-fast wake. settle is now admitted for a worker whose descriptor lists it. cancel_remaining stays refused, and discovery still advertises nothing. Refs durable-workflow/.github#232 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
|
Independent review: PASS at head 92effec What I verified
The contract question (externally cancelled members) Note for #1377 (non-blocking here) |



settleslice of native support for durable-workflow/.github#232, after #1376 and #1381.What changes
No early wake. Inside a
settlegroup, a member failure no longer wakes the workflow.When the group closes. It closes once every member has an outcome:
A retrying activity has no outcome yet. Child failures follow the same rule.
One wake. The last outcome wakes the workflow once. The history delivered to the worker holds each member's result or failure.
Legacy and
propagateunchanged. Those groups keep the existing fail-fast wake.Admission.
settleis admitted for a worker whose registered descriptor lists it.cancel_remainingstays refused. Discovery still advertises nothing.Tests (
tests/execution/parallel_group_policies.rs)settlewakes once, after the last outcome, with every member's outcome in the delivered history. A cold reopen in between changes nothing. A worker that registers onlypropagatecannot take thesettlerun.propagateandsettleside by side: the same failure wakespropagateand leavessettlewaiting until the sibling completes.settlechild group: a failed child leaves the parent asleep until its sibling completes. In a mixed group, an activity failure waits for the timer.settlehistory instead of the direct history rewrite from Route explicit-policy runs only to workers that register their policies #1381.settle, so the fixture'sunsupported-selected-policyrefusal vector maps tocancel_remaining, which stays unadmitted.parallel_all,parallel_children,parallel_cancellation,grouped_condition, child cascade, retries and supervision,activity_deadlinesandselections.parallel_all,parallel_childrenandgrouped_condition, after rebasing onto Route explicit-policy runs only to workers that register their policies #1381's merge. Before the rebase they also passed on MySQL 8.4.Contract gap: the contract doesn't define an outcome for a member cancelled by something other than its group, such as a cancellation scope. This PR counts a cancelled activity, timer or child as an outcome.
🤖 Generated with Claude Code