Skip to content

fix: replay grouped condition physical reopens - #56

Merged
rmcdaniel merged 8 commits into
mainfrom
fix/grouped-condition-physical-replay
Oct 1, 2026
Merged

rmcdaniel merged 8 commits into
mainfrom
fix/grouped-condition-physical-replay

Conversation

@rmcdaniel

@rmcdaniel rmcdaniel commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Problem

After the Server admits a recorded grouped condition reopen, Rust validates its new physical sequence against the original authored member. That rejects valid history. The selected condition's final result also needs to wait for its canonical winner, and the winner and operation handle must follow the latest physical wait.

The original failure is retained in actual Worker run 36891976969 and the separate cooperative suite. The Native prerequisite is durable-workflow/workflow#602.

Change

  • Validate a physical reopen against its original authored sequence only when recorded history proves the same occurrence, condition key, predicate fingerprint, timeout and group path after a satisfied predecessor.
  • Keep a selected true predicate pending for its canonical winner without opening another physical wait.
  • Resolve selection winners and operation handles through the latest physical wait. Preserve the original durable operation identity and the causal timer resolution after timeout acknowledgement.
  • Add the official replay corpus fixture, invalid-history guards and a locked actual Worker consumer that uses a fresh process for every claim.
  • Prepare patch version 2.1.3. Protocol stays 1.19, with cooperative cancellation disabled.

Qualification

All 226 library tests pass, including typed satisfied and timed-out winner results. The locked five-case consumer builds with the candidate source. It covers scalar, nested parallel and keyed conditions, plus nested and keyed selection deadlines, through final WorkflowCompleted and typed results.

All five actual Worker source cases pass against Native 71f31baabea53cb4f4d334c6291896987f88db3a, through final WorkflowCompleted and typed results, with a fresh process for every claim. Final source CI passes on 4f1ae35385d803cc91331cb920b06c82cfb1bfe3, which adds the required 2.1.3 changelog and aligns the package product train and release fixture after the tested runtime checkpoint.

Rust 2.1.3 is published and verified from merged commit e948cab74406f8e245bd8f761ddb65e4e662ce20. Registry, built and downloaded crate checksums agree, and a fresh exact-version consumer builds on Rust 1.86. Exact published Server Worker qualification remains in the owning Native issue.

Refs durable-workflow/workflow#601. This patch is a stable-product prerequisite to cancellation feature #55 and durable-workflow/.github#136. It does not publish or activate that feature.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Follow-through after admitted reopens

The engine's full source matrix 36891688925 passes at fc4ef6d5c29d219e595ad4d4f37f004b55b60585, including MySQL/PostgreSQL feature shards, MariaDB, Laravel embedded upgrades, full unit coverage and the coverage ratchet. The current Native head adds only the locked dependencies for the published reproduction.

Actual Worker follow-through exposed the necessary Rust prerequisite, now in Rust PR #56. The decoder correction passes the official replay corpus and rejects seven identity changes, an unsettled predecessor, a timed-out predecessor and a resolution recorded after its reopen. Current condition tests: 17 pass.

With corrected decoder source, scalar and nested parallel waits accept their reopened history and record final satisfaction on the second vote. Keyed selection also needs the SDK to stop reopening when that recorded predicate becomes true. That correction now records the durable SelectionResolved marker, but the workflow remains pending.

The isolated Server task diagnostic shows the signal task completed with waiting_for_history_acknowledged: true. Its canonical selection marker was committed during that completion, and no ready workflow successor drove the next replay during the bounded check. The candidate stack is being removed after retaining the fixture evidence.

Next concrete work: ensure committing a condition selection winner schedules the replay needed to observe it, then verify the winner's correlation to the original authored member across its later physical condition sequence. Run timeout, repeated false-wake and real cold-process checks before publishing the exact Native/Server/Rust tuple. Both fix PRs remain draft. No stable artifact or cooperative capability has been published from this work.

@rmcdaniel

Copy link
Copy Markdown
Member Author

All five source cases now pass through typed results and WorkflowCompleted with a fresh process per claim. Exact source tuple, raw records and cleanup receipt: durable-workflow/workflow#602 (comment). Current head e2739dd adds only the required 2.1.3 changelog after the tested runtime checkpoint. Next is stable release and exact published consumer qualification.

@rmcdaniel

Copy link
Copy Markdown
Member Author

Reviewed the final runtime diff and evidence at 4f1ae35385d803cc91331cb920b06c82cfb1bfe3.

  • Recorded reopens require the same authored occurrence, condition identity, timeout and group path, with a satisfied physical predecessor before the reopen. Invalid identity, unresolved/timed-out predecessors and late resolutions are rejected by regression cases.
  • A selected true predicate does not issue another open. Its result waits for the canonical winner and follows the latest physical condition while preserving the original operation handle identity.
  • Typed condition timeouts accept the causal condition timer fire and retain that winner after acknowledgement.
  • All 226 library tests and the actual five-case fresh-process Worker source consumer pass. Exact tuple and raw records: fix: reopen recorded service conditions within groups workflow#602 (comment).
  • Package version, product train, current release notes and release contract fixture are aligned to 2.1.3. Protocol remains 1.19 and cooperative capability activation is excluded.

Merge only after the current source CI gate passes. Publish the exact merged source as Rust 2.1.3, then verify the published crate with the new stable Server digest before closing the Native owning issue.

@rmcdaniel
rmcdaniel marked this pull request as ready for review October 1, 2026 17:47
@rmcdaniel
rmcdaniel merged commit e948cab into main Oct 1, 2026
9 checks passed
@rmcdaniel
rmcdaniel deleted the fix/grouped-condition-physical-replay branch October 1, 2026 17:48
@rmcdaniel

Copy link
Copy Markdown
Member Author

Rust 2.1.3 is published and verified from e948cab. Protected release run 36902057106 passes, with registry/built/downloaded crate checksum cdaef7b493bf2876726412d7c436299578f6fd6726e3b1d4b6dd0848795f445b and a fresh exact-version Rust 1.86 consumer build. https://github.com/durable-workflow/sdk-rust/actions/runs/36902057106. The merged head branch is deleted and verified absent. Stable Server PR durable-workflow/server#295 and owning Native issue durable-workflow/workflow#601 retain exact published Worker follow-through.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants