Skip to content

Settle base-model suspension when a sibling effort probe completes - #80797

Merged
rabeckett merged 1 commit into
mainfrom
fix/sibling-effort-suspension-settlement
Nov 24, 2026
Merged

rabeckett merged 1 commit into
mainfrom
fix/sibling-effort-suspension-settlement

Conversation

@rabeckett

Copy link
Copy Markdown
Collaborator

Fixes #80792

In adaptive routing (#79102), a suspension covers every effort of its base model (contract 1), so suspending github-copilot/model-a@low blocks github-copilot/model-a@high as well. Previously, recordOutcome in actions/setup/js/routing_history.cjs checked only pair.suspended on 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 left model-a@low's suspended record untouched, keeping the entire base model blocked while model-a@low remained absent.

Example

Suppose github-copilot/model-a@low fails 3 times and is suspended at seq = 7 (suspended: {"since_seq": 7, "pending": 3}), github-copilot/model-b@high succeeds at seq = 8 (last_success_seq = 8), model-a@low leaves the catalogue, and AWF probes github-copilot/model-a@high, which succeeds at seq = 9:

State after model-a@high probe succeeds Before After
model-a@low.suspended {"since_seq": 7, "pending": 3} null
model-a@low.history Keeps 3 pending failures Pending failures removed ([])
model-a@low.streak 3 0
model-a@high.history Records [9, ..., true, ...] Records [9, ..., true, ...]
github-copilot/model-a on next run Still blocked while model-a@low is absent Unblocked and eligible

Changes

  • actions/setup/js/routing_history.cjs: add baseOf(pairName) and settle suspended same-base siblings in the same scope inside recordOutcome when the pair that ran is not itself suspended (keeping exact-pair behavior unchanged):
    • On success: remove each suspended sibling's pending trailing failures (bounded by history length), clear its suspended and streak, record the probe pair's success with streak = 0, advance scope.last_success_seq, and emit [pairName, "back"].
    • On failure when scope.last_success_seq > sibling.suspended.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 before any model has succeeded since suspension (last_success_seq <= since_seq for every suspended sibling): return false so applyRun records counted: false and note: "awaiting_success".
  • actions/setup/js/fixtures/routing-history/aw2-reducer.json: sync the three sibling-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/broken settlement events, mixed due and non-due siblings, and cross-provider/model-prefix isolation.

Validation

Validated locally on 4661bee944 via BASE_REF=3ef675923c make agent-report-progress in a clean Linux LF clone:

  • ESLint + Prettier + tsc --noEmit: passed
  • vitest run (routing_history.test.cjs 45/45, push_routing_history.test.cjs 23/23): 68/68 passed

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>
Copilot AI adaptive review requested due to automatic review settings November 24, 2026 20:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 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)

@rabeckett
rabeckett merged commit 219e660 into main Nov 24, 2026
339 checks passed
@rabeckett
rabeckett deleted the fix/sibling-effort-suspension-settlement branch November 24, 2026 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Settle a base model's suspension when a sibling effort probe completes

2 participants