Repository navigation
fix(doctor): lint healthy installs without unused database plugins - #175169
Conversation
Load database port descriptors only when discovery finds a physical store. Healthy installs do not require optional database plugin APIs just to report that their stores are absent. Existing stores retain owner schema admission and unreadable-path warnings. Missing rows beside real stores retain their family descriptor facts; absent-only families report unknown schema facts. Update behavior: standalone Doctor remains clean after a successful legacy upgrade when optional store families have no data. No update, migration, schema, or custody policy changes. Retain the final Doctor lint output in bounded, redacted upgrade-survivor diagnostics to expose future failures. Regression fails before the owner fix and passes afterward. pnpm test src/commands/doctor-database-engine-inspection.test.ts --maxWorkers=1: 2 passed, 180.76s Vitest /203.62s wrapper (cold compilation dominates). Capture regression: 41 passed,13.35s /17.45s. Eight consumer files: 336 passed,2 existing platform skips,244.50s wrapper. Targeted production and test types, lint, boundary lint, format and P2 review pass.
|
🦞👀 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 changesThis PR skips database port descriptor loading for absent stores and retains final Doctor lint output in upgrade diagnostics. Example: Run openclaw doctor --lint with empty state and bundled plugins disabled.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Regression provenanceRegression provenance — verified: source commit Merge readiness✅ Ready for maintainer review Keep this PR: it fixes a current-main Doctor false warning without weakening existing-store checks, and no introduced correctness or security defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherDoctor's inspection worker combines configured database families, plugin metadata, and filesystem observations into per-store diagnostics consumed by text output and lint findings. flowchart TD
A[Doctor CLI] --> B[Inspection worker]
B --> C[Discover physical stores]
C --> D[Load descriptors for present families]
D --> E[Inspect stores]
E --> F[Text and lint diagnostics]
Technical reviewBest possible solution: Land the existing discovery-owner fix once exact-head required CI completes. Do we have a high-confidence way to reproduce the issue? Current main unconditionally loads the Team Reports descriptor even without stores, and that descriptor throws when its plugin API is unavailable; the PR records a failing-before, passing-after worker regression. Is this the best way to solve the issue? The change fixes descriptor loading at its existing discovery owner, preserves real-store admission and permission warnings, and adds no competing policy or configuration. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 8c7c9f6947eb. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +6, Tests +34, Docs +1, Other +2. Total +43 across 5 files. Added test files: 0. View PR surface stats
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 17, 2026, 2:05 AM ET / 06:05 UTC. |
…175169) Load database port descriptors only when discovery finds a physical store. Healthy installs do not require optional database plugin APIs just to report that their stores are absent. Existing stores retain owner schema admission and unreadable-path warnings. Missing rows beside real stores retain their family descriptor facts; absent-only families report unknown schema facts. Update behavior: standalone Doctor remains clean after a successful legacy upgrade when optional store families have no data. No update, migration, schema, or custody policy changes. Retain the final Doctor lint output in bounded, redacted upgrade-survivor diagnostics to expose future failures. Regression fails before the owner fix and passes afterward. pnpm test src/commands/doctor-database-engine-inspection.test.ts --maxWorkers=1: 2 passed, 180.76s Vitest /203.62s wrapper (cold compilation dominates). Capture regression: 41 passed,13.35s /17.45s. Eight consumer files: 336 passed,2 existing platform skips,244.50s wrapper. Targeted production and test types, lint, boundary lint, format and P2 review pass.
What Problem This Solves
Fixes: Doctor reports uninspectable database roots on healthy installs after an upgrade when optional database plugins have no stores. This regressed in #174912 and surfaced in main's legacy-operator upgrade survivor.
User Impact
Standalone
openclaw doctor --lintcan remain clean after a successful legacy upgrade without requiring unused database plugins. Existing stores retain owner schema admission, migration and permission warnings. Update, migration, schema and custody policy are unchanged.Why This Change Was Made
The inspection worker loaded every port descriptor even when its family had no physical store. The installed package can lack an optional plugin API or a port-only source asset. Discovery now uses its existing filesystem observations to load descriptors only for families with physical stores. Absent-only families retain informational rows with unknown schema facts; missing rows beside a real store retain the family descriptor facts.
The survivor's final Doctor JSON and stderr were also missing from its failure artifact. Both now use the existing bounded, redacted capture path, preserving the original exit status.
Evidence
discoveryFailed=true; after the fix the file passes 2/2.pnpm test src/commands/doctor-database-engine-inspection.test.ts --maxWorkers=1: 180.76s Vitest /203.62s wrapper, including cold compiled-worker preparation. This boundary needs the real discovery worker and optional-plugin environment.published-upgrade-survivor-legacy-operator-statescenario now passes on an isolated Blacksmith Testbox: 522s for the scenario, 17m16s including build/packaging. Its final Doctor result isok: true, 39 checks run, zero findings; candidate schemas, legacy delivery import, cron ownership, agent turn, and no-op update also pass. Testbox run. PR CI supplies the remaining broad proof.Related: #175173 fixes a separate temporary plugin-capture context in the same inspection worker; its diff complements this absent-store fix.