fix: preserve orchestration sessions across restarts - #3123
Merged
Conversation
numnx
marked this pull request as ready for review
July 14, 2026 10:14
numnx
enabled auto-merge
July 14, 2026 10:17
numnx
disabled auto-merge
July 14, 2026 10:41
numnx
enabled auto-merge
July 14, 2026 10:41
Merged
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.
Summary
Root cause
A completed QA changes_requested verdict was durable, but its generated coding handoff was not fully checkpointed before the side effect. After a restart, the scheduler could therefore see neither a fresh completion event nor a recoverable pending handoff and remain at a fixed point. QA, CI-fix, and merge-conflict executions also lacked complete durable continuation metadata across every crash window.
A later CI run exposed a narrower audit race: the repair provider had returned successfully, but shutdown began before its terminal usage row was persisted. The repair was durably published and correctly recovered without duplicate provider work, while startup classified the stale running audit row as cancelled. Durable post-provider checkpoints now prove and restore completed provider status, while genuinely interrupted attempts remain cancelled and continue their preserved session.
Validation
Risk and rollback
Risk is concentrated in startup recovery, provider terminal bookkeeping, and QA/repair state transitions. The new paths are bounded by phase markers, exact invocation correlation, ancestry/tree validation, and retry caps. Roll back by reverting this PR; existing persisted payloads remain backward-compatible and unknown recovery fields are ignored by the prior runtime.