Skip to content

fix(cli): surface validated plugin doctor warnings - #118526

Merged
steipete merged 1 commit into
mainfrom
codex/auto-qa-plugin-doctor-warning-owner-c1c
Aug 3, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/auto-qa-plugin-doctor-warning-owner-c1c

Conversation

@steipete

@steipete steipete commented Aug 3, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

openclaw plugins doctor can 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 real plugins.entries.google warning, but the doctor previously discarded that validated fact: human output falsely said all checks passed, and --json falsely returned ok: true with 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 plugins and plugins.* 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: false and configurationWarnings fields. 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 .parseAsync dispatch against the exact unchanged parent production owner with the final committed regression tests:

Plugin discovery, module loading, compatibility, and configuration checks passed. Run "openclaw health" to check the running Gateway, including runtime quarantines and fallbacks.
{
  "ok": true,
  "configurationWarnings": []
}

Actual reviewed-head behavior

Plugin configuration:
- plugins.entries.google: plugin disabled (not in allowlist) but config is present

No plugin install-tree issues detected; configuration warnings remain.
{
  "ok": false,
  "configurationWarnings": [
    "- plugins.entries.google: plugin disabled (not in allowlist) but config is present"
  ]
}

Verification

  • Four independent nonauthor hostile exact-head reviews found no actionable P0–P3 issue. A fifth genuine official gpt-5.6-sol high-reasoning review passed at 0.90 confidence; authenticated TruffleHog 3.96.0 was clean.
  • The authoritative Blacksmith Testbox run completed with exit 0 after reproducing two authentic unchanged-parent failures: the false-clean human command and the false-clean JSON command.
  • 146 distinct tests passed: the complete 31-test plugin CLI/doctor owner suite and 115 tests across canonical plugin configuration validation, shared issue formatting, lazy CLI registration, stale plugin configuration, and terminal sanitization. The seven targeted warning, owner-filter, deduplication, and hostile-terminal regressions are included in the 31 owner tests and are not counted twice.
  • The complete exact-two-path changed gate passed, including production-core and core-test typechecks, type-aware lint, formatting, and repository guards.
  • Production change: 20 lines added, 21 removed; net −1. Test change: 141 lines added, 1 removed; net +140. Documentation is unchanged; a full build is not required for an existing private runtime/test refactor without packaging, module-boundary, or published-surface changes.
  • Testbox workflow: https://github.com/openclaw/openclaw/actions/runs/30788300973. Lease tbx_01kz32s5rscgb6d2c50bqzs8js completed successfully and was stopped.

Maintainer decision and ClawSweeper follow-through

  • Accepted existing JSON health-result correction: The existing plugins doctor --json contract already reports ok: false for plugin-owned stale-configuration and runtime warnings. Canonical validator warnings identify the same unhealthy plugin configuration, so returning ok: false for 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.
  • Owner-delegated maintainer review completed: The repository owner explicitly requested autonomous root-cause fixes, review, and landing. Four independent nonauthor reviewers, one genuine official Sol review, the completed exact-head ClawSweeper review, authoritative real Commander CLI proof, all 146 focused tests, and the required hosted checks support accepting this narrowly scoped correction.
  • No persistent-state or migration change: Both changed files are an existing CLI runtime owner and its existing tests. The patch only reads the already-validated in-memory configuration snapshot and changes no database, persisted data, schema, migration, configuration surface, provider contract, or plugin SDK.

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"
}

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Aug 3, 2026
@steipete
steipete marked this pull request as ready for review August 3, 2026 06:03
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. labels Aug 3, 2026
@clawsweeper

clawsweeper Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 3, 2026, 2:09 AM ET / 06:09 UTC.

ClawSweeper review

What this changes

This PR makes openclaw plugins doctor include validated plugin configuration warnings in both terminal output and the existing JSON health result.

Merge readiness

⚠️ Ready for maintainer review - 3 items remain

Keep this PR open: current main still drops canonical plugin validation warnings from openclaw plugins doctor, producing a false-clean terminal result and ok: true JSON outcome. The patch restores that fact at the existing plugin-doctor boundary, includes focused regression coverage, and has no actionable patch defect; the protected maintainer label and an intentional JSON-status semantic change require normal owner review before merge.

Priority: P2
Reviewed head: 7963af016fc5da22d5bf40ded13bc81ff4916944
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🦞 diamond lobster (5/6) A focused, source-aligned repair with strong terminal proof and targeted regression coverage; only the intentional JSON semantic change needs owner acceptance.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The PR body provides before-and-after real CLI terminal and JSON output for the unchanged parent and reviewed head, and the supplied check context records a successful real-behavior-proof run; no private values are shown in the evidence.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (terminal): The PR body provides before-and-after real CLI terminal and JSON output for the unchanged parent and reviewed head, and the supplied check context records a successful real-behavior-proof run; no private values are shown in the evidence.
Evidence reviewed 6 items Current-main false-clean path: Current main reads the configuration snapshot but constructs pluginConfigWarnings only from stale-config and configured-runtime collectors; validated snapshot warnings are absent, so ok and the clean terminal branch can ignore a plugin validation warning.
Canonical warning producer: Canonical plugin configuration validation records the reported disabled-plugin condition as a warning at plugins.entries.google, establishing that this is an existing validation fact rather than a new policy.
Single authoritative warning set: The proposed runtime change filters only plugins and plugins.* validation paths, formats them through the existing terminal-safe formatter, and deduplicates validated, stale, and runtime warning strings before deriving both JSON and human outcomes.
Findings None None.
Security None None.

How this fits together

The 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]
Loading

Decision needed

Question Recommendation
Should the plugin CLI owner accept that existing plugins doctor --json.ok becomes false whenever canonical plugin configuration validation reports a plugin-owned warning? Accept truthful warning semantics: Merge after the refreshed exact head passes required checks, treating canonical plugin validation warnings as unhealthy plugin configuration.

Why: The source and regression tests support the correction, but it intentionally changes an operator-facing machine result that external automation may consume; the maintainer label requires explicit human handling.

Before merge

  • Resolve merge risk (P1) - This deliberately changes existing openclaw plugins doctor --json semantics from a false ok: true to ok: false when canonical plugin validation has warnings; automation that incorrectly relied on the prior clean result may now stop and surface remediation.
  • Complete next step (P2) - The patch has no mechanical repair blocker, but the protected maintainer label, intended JSON-status correction, and still-running exact-head checks require normal owner review rather than automated action.
Agent review details

Security

None.

PR surface

Source -1, Tests +140. Total +139 across 2 files.

View PR surface stats
Area Files Added Removed Net
Source 1 20 21 -1
Tests 1 141 1 +140
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 2 161 22 +139

Review metrics

Metric Value Why it matters
Production vs. regression delta production −1 net, tests +140 net The implementation consolidates existing warning facts while adding coverage for both output modes, filtering, deduplication, and terminal sanitization.

Stored data model

Persistent data-model change detected: migration/backfill/repair: src/cli/plugins-cli.runtime.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Accept the corrected JSON contract (recommended)
    Merge after exact-head CI completes, acknowledging that automation will now receive ok: false for an already-recorded plugin configuration warning.
  2. Pause for contract clarification
    Hold the PR if maintainers intend warning-only plugin validation to remain successful in the doctor JSON contract, then specify the alternative semantics before changing output.

Technical review

Best 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 ok: false behavior and the refreshed merge head completes required checks.

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 ok. The PR body also supplies parent-versus-head terminal and JSON output from the real command dispatch, but this review did not execute that command locally.

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.

Labels

Label changes:

  • add P2: The PR corrects misleading plugin-health diagnostics with a limited but real operator and automation impact.
  • add merge-risk: 🚨 compatibility: Existing machine consumers can observe ok: false where a validated plugin warning was previously hidden behind ok: true.
  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides before-and-after real CLI terminal and JSON output for the unchanged parent and reviewed head, and the supplied check context records a successful real-behavior-proof run; no private values are shown in the evidence.
  • add rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body provides before-and-after real CLI terminal and JSON output for the unchanged parent and reviewed head, and the supplied check context records a successful real-behavior-proof run; no private values are shown in the evidence.

Label justifications:

  • P2: The PR corrects misleading plugin-health diagnostics with a limited but real operator and automation impact.
  • merge-risk: 🚨 compatibility: Existing machine consumers can observe ok: false where a validated plugin warning was previously hidden behind ok: true.
  • rating: 🦞 diamond lobster: Overall readiness is 🦞 diamond lobster; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (terminal): The PR body provides before-and-after real CLI terminal and JSON output for the unchanged parent and reviewed head, and the supplied check context records a successful real-behavior-proof run; no private values are shown in the evidence.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides before-and-after real CLI terminal and JSON output for the unchanged parent and reviewed head, and the supplied check context records a successful real-behavior-proof run; no private values are shown in the evidence.

Evidence

What I checked:

  • Current-main false-clean path: Current main reads the configuration snapshot but constructs pluginConfigWarnings only from stale-config and configured-runtime collectors; validated snapshot warnings are absent, so ok and the clean terminal branch can ignore a plugin validation warning. (src/cli/plugins-cli.runtime.ts:370, 8e35fb496379)
  • Canonical warning producer: Canonical plugin configuration validation records the reported disabled-plugin condition as a warning at plugins.entries.google, establishing that this is an existing validation fact rather than a new policy. (src/config/config.plugin-validation.test.ts:1928, 8e35fb496379)
  • Single authoritative warning set: The proposed runtime change filters only plugins and plugins.* validation paths, formats them through the existing terminal-safe formatter, and deduplicates validated, stale, and runtime warning strings before deriving both JSON and human outcomes. (src/cli/plugins-cli.runtime.ts:382, 7963af016fc5)
  • Focused regression coverage: The branch tests human and JSON reporting, plugin-path filtering, deduplication, and terminal-control sanitization through the plugins CLI command seam. (src/cli/plugins-cli.list.test.ts:140, 7963af016fc5)
  • Current-path provenance: Current main's runtime and owner test files were introduced together by the recent CLI-path commit; blame over the doctor implementation attributes the relevant current lines to the same author, making this a well-routed owner-boundary repair. (src/cli/plugins-cli.runtime.ts:370, e3e07138d9b6)
  • Read-only patch hygiene check: The proposed two-file diff is production net-negative and passes Git whitespace validation. (src/cli/plugins-cli.runtime.ts:382, 7963af016fc5)

Likely related people:

  • steipete: Peter Steinberger authored the current-main commit that introduced the plugin CLI runtime and its owner test file, and authored the proposed focused repair. (role: current CLI-path author and recent contributor; confidence: high; commits: e3e07138d9b6, 7963af016fc5; files: src/cli/plugins-cli.runtime.ts, src/cli/plugins-cli.list.test.ts)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete merged commit b65cc59 into main Aug 3, 2026
194 of 206 checks passed
@steipete
steipete deleted the codex/auto-qa-plugin-doctor-warning-owner-c1c branch August 3, 2026 06:23
@steipete

steipete commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Merged via squash.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes maintainer Maintainer-authored PR merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦞 diamond lobster Very strong PR readiness with only minor maintainer review expected. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant