Skip to content

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

Done

Description

@rabeckett

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. However, recordOutcome in actions/setup/js/routing_history.cjs currently checks only pair.suspended on the exact pair that ran.

If github-copilot/model-a@low is suspended and later disappears from the router's eligible rank while github-copilot/model-a@high remains eligible, AWF's companion sibling-effort probe recovery schedules the due probe on the highest-ranked eligible sibling effort (github-copilot/model-a@high). Without matching settlement in routing_history.cjs, a completed sibling probe records a normal outcome on model-a@high and leaves model-a@low's suspended object untouched. Because refresh() never evicts suspended pairs or expires suspended past 60 days, the github-copilot/model-a base remains blocked from normal selection on every subsequent run while the original effort stays absent from the rank, until a workflow edit or manual gh aw routing reset.

For example, suppose a workflow records this sequence:

  1. github-copilot/model-a@low fails 3 times in a row and is suspended at seq = 7 (suspended: {"since_seq": 7, "pending": 3}).
  2. github-copilot/model-b@high succeeds at seq = 8 (last_success_seq = 8), making the probe due.
  3. github-copilot/model-a@low leaves the catalogue, so AWF probes github-copilot/model-a@high, which succeeds at seq = 9.
State after model-a@high probe succeeds Current behavior Intended behavior
model-a@low.suspended {"since_seq": 7, "pending": 3} null
model-a@low.history Keeps the 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

Intended behavior in actions/setup/js/routing_history.cjs (recordOutcome):

  • If the pair that ran is itself suspended, preserve the exact current behavior.
  • Otherwise, check whether any sibling pair in the same scope with the same base model (the prefix before @) has a non-null suspended record:
    • On success: settle every suspended sibling of that base as restored by removing each sibling's pending trailing failures (bounded by its history length) and clearing its suspended and streak, then record the probe pair's success entry with streak set to 0, advance scope.last_success_seq, and emit a back event for the probe pair.
    • On failure when scope.last_success_seq > sibling.suspended.since_seq: settle every due suspended sibling as confirmed broken by keeping only its pending trailing failures and clearing its suspended and streak, then record the probe pair's failure entry and reset its streak to 0, and emit a broken event for the probe pair.
    • On failure when no model has succeeded since the base's suspension (scope.last_success_seq <= since_seq for every suspended sibling): do not count the failure and emit note: "awaiting_success", matching exact-pair behavior.

Validation and docs:

  • Sync the sibling-probe-restores, sibling-probe-confirms-break, and sibling-probe-awaiting-success oracle vectors in actions/setup/js/fixtures/routing-history/aw2-reducer.json, and add targeted reducer unit tests in actions/setup/js/routing_history.test.cjs covering prior successes on the suspended sibling, settlement events, mixed due and non-due siblings, and cross-provider/prefix isolation.
  • Document sibling-effort suspension settlement under contract 5 in adaptive-routing/issues/contracts.md.

Activity

  1. added
    bug
    backlog:engines
    on Nov 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backlog:enginesbugmodel-routingtesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions