Repository navigation
improve(codex): guard native discovery against model-name restrictions - #132144
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 28, 2026, 5:53 PM ET / 21:53 UTC. ClawSweeper reviewWhat this changesThe PR table-drives two Codex native-discovery tests so both a GPT-shaped and opaque model identifier must remain eligible when native discovery owns authentication. Merge readinessKeep open: this maintainer-labelled PR is a focused test-only guard, but the required direct sibling Codex-source check is unavailable in this review environment, so no merge verdict is warranted. Priority: P3 Review scores
Verification
How this fits togetherThe bundled Codex plugin decides whether an explicitly selected OpenAI model can be discovered by the native Codex account before generic provider routing rejects it. That eligibility result enables the app-server model catalog and eventual session startup. flowchart LR
A[Explicit OpenAI model] --> B[Codex harness eligibility]
B --> C{Native account owns discovery?}
C -->|Yes| D[Codex app-server model list]
C -->|No| E[Provider route checks]
D --> F[Codex session startup]
E --> F
Before merge
Agent review detailsSecurityNone. PR surfaceTests +6. Total +6 across 1 file. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain the compact table-driven regression guard after a reviewer directly verifies Codex’s supplied-model handling and exact-head CI completes. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR protects against a hypothetical future prefix restriction rather than reporting a currently reproducible runtime failure. Is this the best way to solve the issue? Unclear: extending the two existing positive cases is the narrowest maintainable guard, but the Codex model-string contract could not be directly inspected here. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5b605da38946. 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
|
|
Land-ready verification for The change closes a coverage gap in native discovery eligibility: both prior positive cases used a GPT-shaped identifier. The table-driven cases now also exercise an opaque ID in the harness-auth and pre-auth states. Runtime logic, account entitlement, model catalogs, and configuration are unchanged. Production LOC: +0/-0; tests: +30/-24 (net +6). Validation:
Live inference and UI proof are not applicable to this test-only change; none is claimed. ClawSweeper follow-up and landing dispositionThe completed review found no code or security defects. Its remaining items concern direct upstream-source access unavailable in the review sandbox and maintainer disposition. Direct source verification is complete: the lead personally read the sibling Codex checkout at Disposition under the maintainer's explicit landing request: retain this compact table-driven coverage. The source-verification and exact-head-CI Rank-up move is satisfied; there is no production change or remaining actionable finding requiring a rewrite. This disposition does not claim that either fixture is a real model or establish account entitlement. |
|
Merged via squash.
|
Related: #127322 (native-account discovery for unlisted models), #127394 (discovery before auth preparation).
Additional instructions
Maintainers can update this same-repository branch.
What Problem This Solves
The Codex harness's positive native-discovery tests only exercised GPT-shaped model names. A regression that restricted discovery eligibility to a
gpt-prefix would pass those tests while rejecting opaque model identifiers.Why This Change Was Made
Table-drive the two existing discovery cases with
gpt-futureandumbreon-latest. The latter is an opaque model-ID fixture that checks eligibility both with harness-owned authentication and before authentication has been prepared. Keep the existing rejection cases for automatic runtime selection, authored endpoints, and owner-selected credentials unchanged.This strengthens coverage of the existing model-agnostic owner boundary; it does not add a model, change account entitlement, or alter runtime behavior. Codex's supplied-model contract preserves the provided string:
rust-v0.150.1,models-manager/src/manager.rs:153–183.User Impact
No user-visible behavior change. The tests now guard native model discovery against accidental model-name prefix restrictions. Production code, model catalogs, configuration, and dependencies are unchanged.
Evidence
node scripts/run-vitest.mjs extensions/codex/harness.test.ts extensions/codex/src/app-server/models.test.ts extensions/codex/src/app-server/model-catalog.test.ts— 69 tests passed across 3 files.node scripts/check-changed.mjs -- extensions/codex/harness.test.ts— formatting, extension test types, targeted lint, and selected guards passed.gpt-prefix at the existing eligibility predicate. Both opaque-ID cases failed while both GPT-shaped cases passed. Removed the mutation and reran the full focused proof above.git diff --check— passed.No live inference or UI proof is claimed: this is a test-only change, and the identifiers are test inputs rather than live model probes.