You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parallel-group contract and embedded Workflow disagree on same-millisecond all() failure ties #415
Problem. The parallel-group contract and embedded Workflow choose different failures when two all() members fail in the same millisecond.
Contract:conformance/parallel-groups/README.md (main b3e7906, line 121) says: "First-failure ties follow durable event order, never member position or a sort of timestamps." Line 103 says propagate raises the first member failure in durable history order.
Embedded Workflow:src/V2/Support/ParallelFailureSelector.php (workflow main 67e8a969) picks the earliest recorded_at in milliseconds. On equal milliseconds it picks the lower leaf index. WorkflowExecutor passes recorded_at?->getTimestampMs() from the member's terminal event, or closed_at for the execution rows. The concurrency guide documents the same rule ("the earliest recorded close time ... the lower barrier leaf index wins").
Effect: when two members fail in the same millisecond and the higher index was recorded first, embedded raises the lower index. A binding that follows the contract raises the higher one.
Python. sdk-python#348 makes Python's default (no recorded policy) raise the first failure in durable event order for runs that record its new failure-order marker. That follows the contract. Older runs keep their recorded rule. So Python and embedded can differ on same-millisecond ties, and #348 documents this.
Decision needed (Workflow, with the contract owners). Either:
embedded adopts durable event order for propagate, and for its default if the default is to match the contract; or
the contract states a timestamp-then-index rule, and the bindings follow it.
My recommendation: option 1. Event order is total and append-only, and it does not depend on clock resolution.
Embedded's existing absent-policy histories must keep their current selection on replay whichever option is chosen.
Acceptance
The contract and embedded agree on tie order for propagate, with a fixture of a same-millisecond tie.
The default all() rule for each runtime is documented, including any tie difference that remains for absent-policy histories.
Activity
Gate first-recorded-failure selection on a per-run marker (#307)