Repository navigation
fix(agents): tolerate replaced thinking catalog owners - #127284
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
a9c669f to
4c34834
Compare
4c34834 to
86d1565
Compare
|
Codex review: needs maintainer review before merge. Reviewed September 1, 2026, 6:42 PM ET / 22:42 UTC. ClawSweeper reviewWhat this changesThe PR skips a prepared model catalog snapshot whose configuration was replaced, allowing thinking lookup to use provider-scoped discovery and setup finalization to continue without stale catalog-derived hints. Regression provenancePossible regression — probable (reviewed change; failure trace). No predecessor PR is attributed. Merge readinessKeep open. Current main still throws on a replaced scoped catalog owner; this PR restores the documented thinking-catalog fallback and makes setup finalization avoid deriving hints from stale facts. No introduced correctness finding was found, but the MEMBER-authored, Priority: P2 Review scores
Verification
How this fits togetherAgent turns consult a prepared model catalog for thinking capability, while setup finalization uses it for bootstrap and authentication guidance. A Gateway configuration reload can replace that catalog generation, so callers must not consume its old facts. flowchart LR
A[Agent turn or setup finalization] --> B[Prepared model catalog]
B --> C{Owner config matches?}
C -->|yes| D[Use catalog facts]
C -->|no| E[Scoped discovery or no derived hints]
D --> F[Thinking selection or TUI]
E --> F
Decision needed
Why: The code correctly avoids mixing generations, but whether this temporary operator-facing degradation is preferable to failing finalization is a maintainer compatibility choice. Before merge
Agent review detailsSecurityNone. PR surfaceSource +12, Tests +79. Total +91 across 4 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the scoped thinking fallback and typed setup recovery, with no stale catalog facts reused; merge after maintainer acceptance of the temporary no-hint setup behavior and exact-head checks. Do we have a high-confidence way to reproduce the issue? Yes—source establishes a focused reproduction: present a published owner with a different config to a provider-scoped thinking read; current main throws before the documented scoped fallback. The PR body also records the corresponding hot-reload failure. Is this the best way to solve the issue? Unclear overall: the thinking change is the best fit for its existing fallback chain, while the wizard's no-hint recovery is a maintainership choice rather than a purely mechanical repair. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against d225e672bd21. LabelsLabel 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 (9 earlier review cycles; latest 8 shown)
|
|
Applied the latest Rank-up move by merging current into head and rerunning the exact focused catalog regression: 5/5 passed in 13.44s. The current-head test proves a mismatched prepared owner is rejected and the requested replacement model is resolved from provider-scoped static discovery. A full workspace-skill QA rerun is not available locally because this host has no isolated Docker/Testbox lane; no test-only seam was added. Deslop found no issues; autoreview is clean (0.98). |
|
Correction to the preceding shell-mangled note: Applied the latest Rank-up move by merging current main and rerunning the exact focused catalog regression: 5/5 passed in 13.44s. The current-head test proves a mismatched prepared owner is rejected and the requested replacement model is resolved from provider-scoped static discovery. A full workspace-skill QA rerun is unavailable locally because this host has no isolated Docker/Testbox lane; no test-only seam was added. Deslop found no issues; autoreview is clean (0.98). |
|
Live beta validation from a mixed-provider deployment supports this change. On Two adjacent defects were also required for the complete user-visible repair and are now split into separate PRs:
Those are independent of this PR; I am noting them because all three failures surfaced together in Model Setup and mixed-provider selection, while this PR remains the correct narrow fix for the replaced-owner catalog fallback. |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
…ng-reload # Conflicts: # src/agents/prepared-model-catalog.scoped-thinking.test.ts
Co-authored-by: Copilot App <[email protected]>
|
CI failure is unrelated |
* fix(agents): tolerate replaced thinking catalog owners * fix(wizard): tolerate replaced catalog during finalize Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: Karen Lai <[email protected]> Co-authored-by: Copilot App <[email protected]>
Summary
Root cause
The turn-path thinking lookup documents a published-owner → scoped-static → scoped-live fallback. Its published-owner loop instead threw
PreparedModelCatalogConfigReplacedErroron a generation mismatch, aborting agent admission before the scoped fallback. Run 32444623691 reproduced this twice after toggling a workspace skill:agent.wait returned error: prepared model catalog owner config was replaced during the read.Validation
plugin-lifecycle-hot-reload, run 32444623691, both agent attempts rejected before provider fetch.git diff --checkLOC
No Codex runtime/protocol behavior is involved.