Repository navigation
fix(models): isolate catalog refresh failures across source changes - #142622
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 8, 2026, 6:56 PM ET / 22:56 UTC (Revision 3). ClawSweeper reviewWhat this changesTie model-catalog refresh warnings to their provider configuration, plugin metadata, and credentials so replacement sources do not inherit unrelated failures. Merge readiness⛔ Blocked before merge - 3 items remain This remains a useful, focused repair for a defect present on current main. No introduced correctness or security defect was found. Priority: P2 Review scores
Verification
How this fits togetherThe prepared model runtime supplies the Gateway with configured and discovered model choices. Its catalog status tells clients when discovery failed while keeping usable inventory available. flowchart TD
A[Provider configuration] --> D[Catalog source identity]
B[Plugin metadata and credentials] --> D
D --> E{Same source?}
E -->|Yes| F[Share refresh status]
E -->|No| G[Start fresh status]
F --> H[Gateway model catalog]
G --> H
Decision needed
Why: The approval marker does not identify verified secops authority, and no submitted owner review is visible. Before merge
Agent review detailsSecurityNone. PR surfaceSource +25, Tests +155. Total +180 across 5 files. View PR surface stats
Review metricsNone. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Retain source-bound catalog diagnostics and compatible-reload recovery, with listed-owner involvement covering the restricted test change. Do we have a high-confidence way to reproduce the issue? Yes, from source: fail catalog refresh, replace the provider endpoint, then read the replacement catalog before another successful refresh. Current main's getter still reads the shared owner's previous error; this review did not execute that sequence. Is this the best way to solve the issue? Yes. Binding diagnostic state to the existing inventory compatibility identity repairs the lifecycle owner without adding configuration, duplicating discovery, or changing authorization. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8459d9be8093. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
landpr-approve-admin-merge |
|
Landed as 73b5c9eb. Proof: Compiled Gateway warm and cold failure/recovery sequences passed. Independent source-blind acceptance passed all six clauses. All 45 focused tests passed, and required CI is green.
Exact-head local review passed with proof tier A, patch tier B, and no correctness or security findings. All five changed files match the reviewed head in the landed commit; signing and attribution are verified. The guarded merge used the exact-head owner-review approval for the procedural listed-owner hold. Correctness, security, behavior proof and required CI remained mandatory. Proof covers synthetic backend behavior; it does not claim native-client, browser, account-policy or inference coverage. |
…penclaw#142622) ## What Problem This Solves Fixes an issue where a catalog refresh failure remained visible after changing the provider endpoint. The replacement catalog dropped the previous source's learned models but still reported `refreshFailed: true` until another refresh succeeded. ## Why This Change Was Made Catalog attempt status now belongs to its captured source, plugin generation and prepared credentials. Compatible reloads share that status; a replacement source starts without the previous error. This replaces the unscoped error field while preserving failed first attempts, retained inventory, current-generation checks and the original error value. ## User Impact A new catalog source no longer inherits an unrelated refresh warning. A logging-only reload keeps the warning for the same source until a successful refresh clears it. ## Evidence - The public baseline reproduced the stale warning after an endpoint-only hot reload on the same Gateway. - The compiled candidate passes warm failure, neutral reload, source replacement and recovery through the public Gateway interface. Independent source-blind acceptance passes all six clauses, including one fresh cold first-attempt failure and recovery sequence. - All 45 focused runtime reload and scoped-refresh tests passed. The five added scenarios passed again after placement in the existing suites. Formatting and scoped lint passed. - [Required CI passed](https://github.com/openclaw/openclaw/actions/runs/34285022508) for `b41792da7118a37137071607aef27fd39e269755`. Public proof used its actual CI merge build, `1b284af37e091fab9fc58297e4478a0f701ed6fd`. Proof uses synthetic backend fixtures. It does not claim native-client, browser, account-policy or inference coverage. AI-assisted. Co-authored-by: Ayaan Zaidi <[email protected]>
What Problem This Solves
Fixes an issue where a catalog refresh failure remained visible after changing the provider endpoint. The replacement catalog dropped the previous source's learned models but still reported
refreshFailed: trueuntil another refresh succeeded.Why This Change Was Made
Catalog attempt status now belongs to its captured source, plugin generation and prepared credentials. Compatible reloads share that status; a replacement source starts without the previous error. This replaces the unscoped error field while preserving failed first attempts, retained inventory, current-generation checks and the original error value.
User Impact
A new catalog source no longer inherits an unrelated refresh warning. A logging-only reload keeps the warning for the same source until a successful refresh clears it.
Evidence
b41792da7118a37137071607aef27fd39e269755. Public proof used its actual CI merge build,1b284af37e091fab9fc58297e4478a0f701ed6fd.Proof uses synthetic backend fixtures. It does not claim native-client, browser, account-policy or inference coverage.
AI-assisted.