Repository navigation
refactor(agents): move live model policy to test owner - #129184
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 5:48 AM ET / 09:48 UTC. ClawSweeper reviewWhat this changesMoves live-model selection policy into the dynamic live-candidate test helper, removes its standalone module, and updates live-test imports, documentation, and CI-planner expectations. Merge readinessKeep open: current main still keeps the policy in the standalone module, while this PR removes that test-only duplicate and repoints all known test consumers. No blocking defect was found; the protected maintainer label, behind base, and incomplete exact-head CI require maintainer review before merge. Priority: P3 Review scores
Verification
Live VerificationCommand: Result: PASS (completed) Assertions:
How this fits togetherOpt-in direct-agent and Gateway live tests select and cap provider models through shared policy before running real provider checks. This refactor makes the dynamic candidate helper own that test-only policy and feeds the same selected candidates into both test suites. flowchart LR
A[Live test settings] --> B[Model selection policy]
C[Configured provider models] --> B
B --> D[Direct agent live tests]
B --> E[Gateway live tests]
D --> F[Provider validation]
E --> F
Decision needed
Why: The protected maintainer label routes this ownership-boundary cleanup to an explicit maintainer decision even though source review found no correctness blocker. Before merge
Agent review detailsSecurityNone. PR surfaceSource -185, Tests +1, Docs 0. Total -184 across 8 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Rebase or refresh against current main, retain one policy implementation in the test helper, and land only after exact-head checks confirm the move remains behavior-neutral. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR refactors test-support ownership rather than reporting a user-observable failure. Is this the best way to solve the issue? Yes: current-main references show this policy is consumed by docs and test suites, and consolidating it into the existing candidate helper removes the standalone test-only owner without adding a parallel path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against ef7b6653a89d. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
|
Merged via squash.
|
* refactor(agents): move live model policy to test owner * test(agents): retain dynamic live model policy map types
What Problem This Solves
Live model validation policy lived in a 453-line production-classified agent module despite having no shipped runtime, package, SDK, or public consumers. Its only callers were live/unit tests and their change-classification fixtures.
Why This Change Was Made
Delete the unused production module and consolidate the still-valuable live-provider selection policy into its existing test-support owner. Update real direct agent/Gateway tests, truthful live-testing documentation, and existing CI planner fixtures without weakening classification.
User Impact
No production behavior or shipped public contract changes. Production code decreases by 453 lines; test-support grows 269 lines while the complete change still removes 184 lines. Existing provider priorities, owner exclusions, spread, caps, overrides, lazy preparation, and fail-safe CI planning remain unchanged.
Evidence