Repository navigation
fix(cli): surface validated plugin doctor warnings - #118526
Conversation
|
Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 2:09 AM ET / 06:09 UTC. ClawSweeper reviewWhat this changesThis PR makes Merge readinessKeep this PR open: current Priority: P2 Review scores
Verification
How this fits togetherThe plugins doctor CLI combines canonical configuration validation with plugin discovery and runtime diagnostics to tell operators and automation whether plugin setup is healthy. Its terminal and JSON results are consumed after config parsing but before any operator takes remediation action. flowchart LR
Config[Plugin configuration] --> Validation[Canonical validation]
Registry[Plugin registry] --> Diagnostics[Plugin diagnostics]
Validation --> Doctor[Plugins doctor]
Diagnostics --> Doctor
Doctor --> Terminal[Operator terminal output]
Doctor --> Json[Automation JSON health result]
Decision needed
Why: The source and regression tests support the correction, but it intentionally changes an operator-facing machine result that external automation may consume; the Before merge
Agent review detailsSecurityNone. PR surfaceSource -1, Tests +140. Total +139 across 2 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep one deduplicated plugin-owned warning set as the doctor command's source of truth, then merge after the CLI owner accepts the intentional truthful Do we have a high-confidence way to reproduce the issue? Yes—source establishes the current-main path: plugin validation warnings exist in the snapshot but are not added to the doctor warning collection that controls terminal cleanliness and JSON Is this the best way to solve the issue? Yes—the patch keeps ownership at the existing plugin-doctor boundary and derives both output modes from one terminal-safe, deduplicated warning set rather than adding a new configuration path or downstream workaround. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8e35fb496379. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Merged via squash.
|
Co-authored-by: Peter Steinberger <[email protected]>
What Problem This Solves
openclaw plugins doctorcan incorrectly report a completely healthy plugin configuration even when canonical configuration validation has already recorded a plugin warning. For example, configuring a disabled plugin produces a realplugins.entries.googlewarning, but the doctor previously discarded that validated fact: human output falsely said all checks passed, and--jsonfalsely returnedok: truewith no configuration warnings.Why This Change Was Made
Keep warning ownership at the existing plugin-doctor boundary and reuse the facts already produced by canonical configuration validation. Combine plugin-owned validated, stale-configuration, and runtime warnings in one ordered, deduplicated set; format validated warnings with the existing terminal-safe issue formatter; and derive both human and JSON outcomes from that same authoritative set.
Only exact
pluginsandplugins.*validation paths are included, so unrelated configuration warnings and lookalike paths remain excluded. The refactor also removes a redundant private collector parameter and unnecessary fallback/cast layering. It changes two existing files, adds no configuration surface, dependency, public API, migration, persistence, or compatibility path, and removes one net production line.User Impact
Operators now see the actual plugin configuration problem and can act on it instead of receiving a false clean bill of health. Automation receives truthful existing
ok: falseandconfigurationWarningsfields. Human and machine-readable output agree, duplicate warnings appear once, and untrusted terminal control characters are sanitized by the established formatter.Evidence
Actual unchanged-parent behavior
Both failures were reproduced through the real installed Commander 15.0.0 implementation, actual
registerPluginsCli, and actual.parseAsyncdispatch against the exact unchanged parent production owner with the final committed regression tests:{ "ok": true, "configurationWarnings": [] }Actual reviewed-head behavior
{ "ok": false, "configurationWarnings": [ "- plugins.entries.google: plugin disabled (not in allowlist) but config is present" ] }Verification
gpt-5.6-solhigh-reasoning review passed at 0.90 confidence; authenticated TruffleHog 3.96.0 was clean.tbx_01kz32s5rscgb6d2c50bqzs8jscompleted successfully and was stopped.Maintainer decision and ClawSweeper follow-through
plugins doctor --jsoncontract already reportsok: falsefor plugin-owned stale-configuration and runtime warnings. Canonical validator warnings identify the same unhealthy plugin configuration, so returningok: falsefor them is an intentional correction of the previously false-clean result, not a new field, configuration shape, or compatibility shim. Automation should surface the existing remediation instead of continuing after a known plugin warning.Real behavior proof
{ "status": "PASS", "head": "7963af016fc5da22d5bf40ded13bc81ff4916944", "parent": "c1cbcf047bbe2b7cafde4a25b15729ab2db86c8c", "surface": "openclaw plugins doctor", "distinctRootCauses": 1, "actualCommanderVersion": "15.0.0", "baselineFalseCleanReproductions": 2, "humanBefore": "configuration checks passed despite an existing plugin-owned validation warning", "humanAfter": "plugin-owned configuration warning shown and false clean outcome removed", "jsonBefore": { "ok": true, "configurationWarnings": [] }, "jsonAfter": { "ok": false, "configurationWarnings": [ "- plugins.entries.google: plugin disabled (not in allowlist) but config is present" ] }, "targetedWarningCasesPassed": 7, "ownerTestsPassed": 31, "siblingTestsPassed": 115, "testsPassed": 146, "targetedCasesIncludedInOwnerTests": true, "changedGate": "PASS: complete exact-two-path changed gate", "productionLinesAdded": 20, "productionLinesDeleted": 21, "productionLinesAddedNet": -1, "testLinesAdded": 141, "testLinesDeleted": 1, "independentNonAuthorApprovals": 4, "officialReview": { "engine": "gpt-5.6-sol", "reasoning": "high", "confidence": 0.90, "actionableFindings": 0 }, "secretScan": "PASS: checksum-verified TruffleHog 3.96.0", "docsChanged": false, "providerRunner": "blacksmith-testbox", "lease": "tbx_01kz32s5rscgb6d2c50bqzs8js", "leaseStatus": "stopped", "run": "https://github.com/openclaw/openclaw/actions/runs/30788300973" }