Skip to content

validate a public-review stage's model pin against the provider's own model list - #6127

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mtm2gt6z/agent-ccf79a24
Sep 3, 2026
Merged

validate a public-review stage's model pin against the provider's own model list#6127
atomantic merged 1 commit into
mainfrom
cos/task-mtm2gt6z/agent-ccf79a24

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • A pr-reviewer stage pin outlives edits to its provider's models list. The live Eligibility Gate was pinned to a model its provider no longer offered, and the guard only checked that the pinned provider matched the resolved one — so the stale id reached the CLI as a model it could not serve.
  • Consequence: the stage spawned, exited in ~12s with no output, and was retried through a fresh task id — roughly 20 spawns in five minutes, which the churn guard logged a park for on every cycle without stopping.
  • resolvePublicReviewAgentProvider now also requires the resolved provider to offer the pinned model, mirroring the check the ordinary resolution path and cliProviderRun.js#resolveCliProviderAndModel already make. A provider that enumerates no models stays a pass-through.

Found while driving the pr-reviewer automation over the five open contributor PRs (all now reviewed and merged).

Test plan

  • server/services/agentProviderResolution.test.js — 29/29, with two new cases: a pin the matching provider no longer offers falls back to the provider's own selection, and a pin on a provider that enumerates no models is still honored.
  • Bypass probe: forcing pinIsOffered = true fails the new test, confirming it catches the defect rather than restating the implementation.
  • prReviewerPipeline.test.js + prReviewerSecurity.test.js — 46/46 together with the above.

Follow-ups filed

… model list

A pr-reviewer stage pin survives edits to its provider's `models` list, so
the live Eligibility Gate sat pinned to a model its provider no longer
offered. The pin guard only checked that the pinned PROVIDER matched the
resolved one, so the stale id was handed to the CLI as a model it could not
serve: the stage spawned, exited in ~12s with no output, and was retried
through a fresh task id — roughly 20 spawns in five minutes.

Require the resolved provider to actually offer the pinned model, mirroring
the check the ordinary resolution path and `cliProviderRun.js` already make.
A provider that enumerates no models stays a pass-through.

The unbounded retry that the empty run then caused is tracked in #6124.
@atomantic
atomantic merged commit 27106ad into main Sep 3, 2026
7 checks passed
@atomantic
atomantic deleted the cos/task-mtm2gt6z/agent-ccf79a24 branch September 3, 2026 22:25
@atomantic
atomantic restored the cos/task-mtm2gt6z/agent-ccf79a24 branch September 3, 2026 22:26
@atomantic
atomantic deleted the cos/task-mtm2gt6z/agent-ccf79a24 branch September 3, 2026 22:26
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