Repository navigation
fix(doctor): recognize models published by the selected Gateway - #179907
Conversation
Reuse Doctor's prepared catalog read to confirm runtime-discovered model references while retaining offline, migration, and server diagnostics. Remove the warning-only reader and migrate its status caller. Fixes #157010. Supersedes #170694. Co-authored-by: Arthur Pinheiro <[email protected]> Co-authored-by: Olli0103 <[email protected]>
|
🦞👀 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 SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex review: needs maintainer review before merge. What this changesDoctor uses the selected Gateway’s prepared catalog to avoid reporting published models as missing from offline metadata. Example: An active google/gemini-flash-lite-latest reference appears in the selected Gateway’s published catalog.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR: it fixes a confirmed diagnostic mismatch still present on main, and no actionable patch defect was found; the failing CI assertion also fails independently on another PR. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherDoctor combines configured model references, offline provider metadata, and the selected Gateway’s prepared inventory into diagnostic findings without discovering providers or changing configuration. flowchart TD
A[Configured model references] --> B[Offline reference inspector]
C[Selected Gateway prepared catalog] --> D[Shared catalog reader]
B --> E[Doctor model reference check]
D --> E
D --> F[Models status warnings]
E --> G[Diagnostic findings]
Technical reviewBest possible solution: Use the existing prepared-catalog owner to reconcile Doctor’s offline advisory while preserving typo, migration, server-warning, and offline behavior. Do we have a high-confidence way to reproduce the issue? The canonical report supplies paired release outputs, and current-main source shows why an active runtime-only model receives the advisory despite appearing in the selected Gateway’s inventory; this review executed no target code. Is this the best way to solve the issue? This is the smallest complete repair: expose the already-read catalog to Doctor, retain the existing warning projection for both consumers, and leave the offline inspector unchanged. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 975047836d1b. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource 0, Tests +38, Docs +6. Total +44 across 5 files. Added test files: 0. View PR surface stats
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed October 21, 2026, 5:26 PM ET / 21:26 UTC. |
…atalog (openclaw#179907) Doctor used the prepared Gateway catalog for warnings but not for model membership, so it flagged models the running Gateway publishes. It now reuses that read; typo, offline, migration and server warnings are preserved. Supersedes openclaw#170694, thanks @xilopaint. Co-authored-by: Arthur Pinheiro <[email protected]>
What Problem This Solves
Doctor reports active runtime-discovered models as missing from its local catalog even when the selected Gateway publishes them. Fixes #157010. Supersedes #170694, thanks @xilopaint; also preserves credit for @Olli0103's original approach.
User Impact
Published model IDs no longer receive the misleading offline-catalog advisory. Typos, unavailable-Gateway checks, legacy-reference migrations, and genuine server-catalog warnings remain. This is a read-only diagnostic change: no configuration, persisted data, provider discovery, or update admission changes.
Why This Change Was Made
Doctor already reads the selected Gateway's prepared catalog for server diagnostics. Reuse that single read for membership instead of introducing another model status or expanding the offline inspector. Remove the warning-only reader and let Doctor and
models statusshare the prepared reader and warning projection.Production: +22 / -22 (net 0). Tests: +38 / -0. Documentation: +6. The existing status file does not grow.
Evidence
548a331adb18: the published-model case fails; the other-provider and offline controls pass. The fixed case also keeps a typo advisory and asserts a single catalog read. Existing tests retain server-warning and exec-SecretRef coverage.HOME,OPENCLAW_STATE_DIR, andOPENCLAW_CONFIG_PATH, a free Gateway port, and a synthetic local Ollama HTTP server.models list --all --provider ollama --jsonpublishesollama/runtime-only:latestas available. Before the fix, Doctor reports both that model's false info finding and the real missing-server-model warning. After the fix, only the real warning remains. A typo still produces its info finding; with the Gateway stopped, the original model still receives the offline advisory. The two task-owned servers were stopped afterward.git diff --check; and Madge (0 cycles) passed. Independent Codex P0–P2 review found no actionable defects.check:changedSQLite inventory was omitted because of its known long-running inventory step; PR CI supplies broad proof. This does not claim authenticated Google inference or an installed-package upgrade.Focused Bun command (the Node caller run used the same runner with all 28 files found by
rgover the changed production basenames and their immediate callers):Exact live commands, with the isolated environment above:
The initial lint pass caught a local shadowed variable, and the initial commit hook caught one line of growth in the grandfathered status file; both were corrected. A broad run was invalidated by the final reader rename and was rerun with frozen sources. The development wrapper also correctly refused artifact publication while the isolated Gateway was running; subsequent live proof used the clean committed build.