Repository navigation
fix(coordinator): retain healthy speculative attempts after terminal errors - #987
Gajesh2007 wants to merge 2 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Consolidated into #1056 for review and merge after #1094, #1095 and #1096. #1056 contains this branch's exact head ( |
When a speculative provider fails before content, its error is queued before its chunk channel closes. Selecting the closed chunk previously cancelled the healthy racer before checking that error: a primary failure abandoned the backup and retried, while a backup failure waited on an already-cancelled primary.
Resolve both closed-chunk errors through the existing direct-error transitions before winner cancellation. The survivor keeps its pending request, settlement decision and remaining first-content deadline. Buffered content still wins ahead of its later error. Extract four terminal operations from
dispatch.goand remove the duplicate closed-backup wait loop; production source shrinks by 107 lines.Before:
After:
Validation at source
d5c07ea67c37abda2fff856eacfeeff7ffd033e2:7c394fa2bafter only a behavior-preserving extraction of its selected chunk-handler bodies. The real provider error handler supplies the terminal; both original handlers remove the live survivor. This is selected-branch coverage, not a claim that Go select order is deterministic.Source scope is terminal ownership and duplicate control-flow cleanup. Routing thresholds, hedge timing, protocol fields and model behavior are unchanged.