Skip to content

In-flight items pinned to an older baseline image are dispatched with a model ID their pinned agent CLI cannot serve - #760

Merged
AdamFrisby merged 2 commits into
mainfrom
codeybox/c88098da
Nov 8, 2026
Merged

AdamFrisby merged 2 commits into
mainfrom
codeybox/c88098da

Conversation

@AdamFrisby

Copy link
Copy Markdown
Owner

Automated via CodeyBox — work item c88098da0e014bd782264238e3995134

Initiated by CodeyBox operator


Co-Authored-By: CodeyBox noreply@codeybox.invalid
🤖 Generated with CodeyBox

AdamFrisby and others added 2 commits November 8, 2026 07:51
…nknown-model as configuration

Work items pin their sandbox baseline image, but the agent model id
resolves from live config at dispatch. After a CLI upgrade paired with a
model switch, items pinned to the old CLI run a model the old CLI does
not list and fail as a generic exit 1 (2026-11-06 incident).

- Pin BaselineImageModelId alongside the baseline and clear it with the
  pin (store column + migration, retrier/scheduler stamping).
- New BaselineStalePinEvaluator policy (hot-reloadable
  CodeyBox:BaselineStalePin:Mode, default
  MigrateOnToolchainAndModelChange): pickup clears a pin whose toolchain
  fingerprint differs from live config when the dispatch model also
  differs from the pinned model — same semantics as POST
  /baselines/migrate for non-terminal items. Terminal items untouched;
  Disabled restores manual-only migration.
- GET /baselines and /admin/baseline-images surface pinConsistency
  (stale count, warning, per-item stale pins on /baselines);
  BaselineMigrationService.CheckConsistencyAsync is read-only, and
  MigrateAsync logs when migrated pins bake a stale toolchain.
- AgentFailureClassifier detects CLI unknown-model shapes (incl.
  model-'id'-not-found) as Infrastructure; the audit path throws a
  deterministic AuditUnavailableException (failureKind configuration)
  without burning the fresh-sandbox retry.
- Tests: evaluator matrix, pickup end-to-end (migrate/keep/disabled/
  restamp), classifier + audit-helper cases, store round-trips,
  consistency check, endpoint shapes. Updated keep-pin tests to
  same-toolchain scoped pins.

CodeyBox-Prompt-Revision: 1
Co-Authored-By: CodeyBox <noreply@codeybox.invalid>
The anchored refusal check matched error words anywhere on the line, so
a provider-side failure echoing an id like 'unknown-xyz' classified as
Infrastructure instead of a genuine failure ('other'). The error word
must now sit outside the quoted id as a standalone token: quoted
segments are blanked first, then error phrases match whole whitespace
tokens (trailing sentence punctuation trimmed, id-joining -_/. kept).
Also dedupes the tripled model-quote anchor.

CodeyBox-Prompt-Revision: 1
Co-Authored-By: CodeyBox <noreply@codeybox.invalid>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@AdamFrisby
AdamFrisby merged commit a6c90db into main Nov 8, 2026
@AdamFrisby
AdamFrisby deleted the codeybox/c88098da branch November 8, 2026 12:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant