Repository navigation
Settle base-model suspension when a sibling effort probe completes - #80797
Merged
Merged
Conversation
Because a suspension covers every effort of its base model (contract 1), handle sibling-effort settlement in `recordOutcome` when the pair that ran is not itself suspended but shares its base model with one or more suspended siblings in the same scope: - On success, remove each suspended sibling's pending trailing failures, clear its `suspended` and `streak`, record the probe pair's success, advance `last_success_seq`, and emit `[pairName, "back"]`. - On failure after a subsequent success (`last_success_seq > since_seq`), keep only each due sibling's pending trailing failures, clear its `suspended` and `streak`, record the probe pair's failure with `streak = 0`, and emit `[pairName, "broken"]`. - On failure when no model has succeeded since suspension, return `false` so the run is recorded with `note: "awaiting_success"`. Sync the three `sibling-probe-*` oracle vectors into `aw2-reducer.json` and add targeted unit tests covering prior-success preservation/truncation, settlement events, mixed due/non-due siblings, and cross-provider/prefix isolation. Fixes #80792 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Cross-effort recovery rewrites persistent histories and suspension gates across multiple records, changing future model eligibility through interactions with AWF probe scheduling that warrant human review.
No open issues 🎉
What changed in this PR
This PR fixes adaptive-routing recovery when a probe runs on a sibling effort of a suspended model. It prevents the base model from remaining blocked after the originally suspended effort leaves the eligible catalogue.
Changes:
- Settle same-base sibling suspensions on success or confirmed failure, while preserving exact-pair behavior and ignoring failures that are not yet due.
- Add tests for history retention, settlement events, mixed suspension timing, and provider/model isolation.
| File | Description |
|---|---|
actions/setup/js/routing_history.test.cjs |
Adds targeted tests for sibling-effort suspension settlement. |
actions/setup/js/routing_history.cjs |
Matches sibling efforts by base model and settles their suspensions. |
Review effort: Max (adaptive)
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.
Fixes #80792
In adaptive routing (#79102), a suspension covers every effort of its base model (contract 1), so suspending
github-copilot/model-a@lowblocksgithub-copilot/model-a@highas well. Previously,recordOutcomeinactions/setup/js/routing_history.cjschecked onlypair.suspendedon the exact pair that ran. When a suspended effort leaves the router's eligible rank and AWF probes an eligible sibling effort (model-a@high), the sibling's outcome leftmodel-a@low'ssuspendedrecord untouched, keeping the entire base model blocked whilemodel-a@lowremained absent.Example
Suppose
github-copilot/model-a@lowfails 3 times and is suspended atseq = 7(suspended: {"since_seq": 7, "pending": 3}),github-copilot/model-b@highsucceeds atseq = 8(last_success_seq = 8),model-a@lowleaves the catalogue, and AWF probesgithub-copilot/model-a@high, which succeeds atseq = 9:model-a@highprobe succeedsmodel-a@low.suspended{"since_seq": 7, "pending": 3}nullmodel-a@low.history[])model-a@low.streak30model-a@high.history[9, ..., true, ...][9, ..., true, ...]github-copilot/model-aon next runmodel-a@lowis absentChanges
actions/setup/js/routing_history.cjs: addbaseOf(pairName)and settle suspended same-base siblings in the same scope insiderecordOutcomewhen the pair that ran is not itself suspended (keeping exact-pair behavior unchanged):pendingtrailing failures (bounded by history length), clear itssuspendedandstreak, record the probe pair's success withstreak = 0, advancescope.last_success_seq, and emit[pairName, "back"].scope.last_success_seq > sibling.suspended.since_seq: keep only each due sibling'spendingtrailing failures, clear itssuspendedandstreak, record the probe pair's failure withstreak = 0, and emit[pairName, "broken"].last_success_seq <= since_seqfor every suspended sibling): returnfalsesoapplyRunrecordscounted: falseandnote: "awaiting_success".actions/setup/js/fixtures/routing-history/aw2-reducer.json: sync the threesibling-probe-*oracle vectors (sibling-probe-restores,sibling-probe-confirms-break,sibling-probe-awaiting-success).actions/setup/js/routing_history.test.cjs: add unit tests for prior-success preservation on restore vs truncation on confirmed break,back/brokensettlement events, mixed due and non-due siblings, and cross-provider/model-prefix isolation.Validation
Validated locally on
4661bee944viaBASE_REF=3ef675923c make agent-report-progressin a clean Linux LF clone:tsc --noEmit: passedvitest run(routing_history.test.cjs45/45,push_routing_history.test.cjs23/23): 68/68 passed