Repository navigation
fix: drained turns before runtime handover - #229
Merged
Merged
Conversation
- Paused new admissions before waiting for current turns to finish. - Reconnected completed chats without replaying dispatched work. - Kept verified upgrades waiting through long drains and reconciled unchanged runtimes safely. - Added overlapping traffic and failure-path regression coverage.
- Checked authenticated runtime status after long drains exceeded discovery time. - Reported explicit controller failures without timing out healthy paused listeners. - Covered authentication, transaction binding, transient errors and unchanged submission requests.
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.
Busy chats previously kept renewing work before the upgrade controller reached its drain command, so deployment could defer indefinitely. Upgrades now pause new admissions first and let each dispatched turn finish. Completed WebSocket chats receive
1012and reconnect; new connections queue while remaining turns drain and the verified successor takes ownership.Validation:
go build ./...,go vet ./..., andgo test -race -count=1 ./...passed. Focused final CLI race tests passed. Native Homebrew acceptance at final headc9bf4fapassed: all 163 admitted turns completed, HTTP200=148, WebSocket101=14, zero503, refused connections or continuity mismatches, one coordinator owner and the same listener/PID. Production state stayed unchanged.The already-running v0.34.2 controller still needs its existing initial quiet boundary to load this fix. Subsequent handovers use the new drain ordering.