fix(queue): settle interrupted turns before draining - #390
Closed
0xSolarPunk wants to merge 9 commits into
Closed
Conversation
added 6 commits
July 24, 2026 03:27
Strengthens coverage for cfal#388
Prevents stale predecessor restoration during active-input admission.
Persist accepted input before publishing successor turn ownership across the queue, event bus, operation tracker, and Codex runtime. Transfer abortability at the same synchronous boundary and cover failure, restart, and settlement races deterministically.
0xSolarPunk
force-pushed
the
fix/send-now-turn-settlement
branch
from
July 24, 2026 03:29
a7c45e3 to
8ff0fbf
Compare
yongkangc
enabled auto-merge (squash)
July 25, 2026 05:01
auto-merge was automatically disabled
July 25, 2026 06:33
Head branch was pushed to by a user without write access
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.
Before
After
The server now retains interrupted execution ownership until exact settlement, rejects accidental live-turn replacement, and stages active-input identity handoff across the queue attempt, event bus, provider operation tracker, and Codex runtime. Durable persistence completes before successor metadata becomes observable; the final handoff and abortability transfer commit synchronously.
Pre-commit failure leaves predecessor ownership unchanged. Post-commit delivery ambiguity retains successor ownership for reconciliation. This closes the server ownership gap that remained after #362 fixed stale client processing state.
Files
server/chat-execution/coordinates exact predecessor settlement and staged active-input ownership.server/agents/guards event routing and composes synchronous handoff participants.server-agents/codex/transfers operation, runtime metadata, and abortability at the delivery boundary.Tests
bun run check: passed with no Svelte errors or warnings.Closes #388.
Prompted by: yk (@chiayong)