Skip to content

fix(plugins): normal disablement is reported as an error - #129158

Merged
steipete merged 2 commits into
mainfrom
codex/disabled-plugin-false-errors-20260825
Aug 25, 2026
Merged

steipete merged 2 commits into
mainfrom
codex/disabled-plugin-false-errors-20260825

Conversation

@steipete

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where inspecting an intentionally disabled plugin displayed its ordinary disablement reason as a red failure, despite the plugin being disabled normally rather than broken.

Why This Change Was Made

Classify plugin error text using the existing authoritative plugin status at both human inspection and verbose formatting boundaries. Genuine failed plugins keep their error presentation, while intentionally disabled plugins retain their useful explanation under a neutral reason label.

User Impact

Operators can distinguish real plugin failures from normal disablement and still see why an intentional disablement occurred. Plugin JSON output, raw loader metadata, and enabled plugin behavior remain unchanged.

Evidence

  • Two authentic real CLI regressions failed before the fix: verbose formatting displayed a bogus error for ordinary disablement, and inspection displayed the disablement reason as Error: instead of Reason:.
  • Completed formatter and real CLI suites pass 63 tests; a broader unrelated plugin shard was deliberately interrupted under severe host load and is not claimed as passing.
  • Focused direct lint, formatting, independent owner-boundary review, and structured review are clean.

@clawsweeper

clawsweeper Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: S maintainer Maintainer-authored PR labels Aug 25, 2026
@steipete
steipete marked this pull request as ready for review August 25, 2026 08:23
@clawsweeper clawsweeper Bot added P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Aug 25, 2026
@clawsweeper

clawsweeper Bot commented Aug 25, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 25, 2026, 4:46 AM ET / 08:46 UTC.

ClawSweeper review

What this changes

Changes human-readable plugin list and inspect output so disabled-plugin explanations are neutral reasons while actual load failures remain errors.

Regression provenance

Possible regression — probable (reviewed change; reproduction). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 2 items remain

Keep open: this maintainer-authored, protected PR fixes a source-proven CLI presentation bug with a small, targeted patch and focused regression coverage. It still needs exact-head required checks and a merge-result refresh because GitHub reports it behind main.

Priority: P3
Reviewed head: 4eef96703a82cb7eecf51dccfd858497ccce0e3a

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) A focused, source-aligned repair with clear regression coverage; landing remains gated on exact-head merge and CI validation.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer PR includes focused CLI regression evidence in its body; the external-contributor proof gate does not apply.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer PR includes focused CLI regression evidence in its body; the external-contributor proof gate does not apply.
Evidence reviewed 6 items Disabled state retains a reason: The loader deliberately creates disabled records with status = "disabled", preserves the enablement reason in error, and records disabled activation state; therefore presentation must not treat every nonempty error field as a failure.
Current-main bug location: Current main shows a disabled record's error in verbose list output solely because the string is present, while compact list output already gates failure styling on status === "error".
Current-main inspect bug location: Current main always renders a nonempty plugin error with the red Error: label, including normal disabled-state reasons.
Findings None None.
Security None None.

Live Verification

Command: pnpm openclaw plugins inspect --help

Result: PASS (completed)

pnpm openclaw plugins inspect --help
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129158-NvCWt2/target$ pnpm openclaw plugins inspect --help
$ node scripts/run-node.mjs plugins inspect --help
pnpm openclaw plugins inspect --help
[openclaw] Building TypeScript (dist is stale: missing_build_stamp - build stamp missing).
[openclaw] Building bundled plugin assets.
[canvas] build: node scripts/bundle-a2ui.mjs
[log] ‹DIR›/a2ui.bundle.js  chunk │ size: 399.96 kB
[log] ‹DIR›/a2ui-v0.9.bundle.js  chunk │ size: 615.66 kB
[log]
[success] rolldown v1.2.0 Finished in 116.03 ms
[diffs] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts curated
[diffs-language-pack] build: node --import tsx ../../scripts/build-diffs-viewer-runtime.mts full
[discord] build: node --import tsx ../../scripts/build-discord-activity-sdk.mts
[tsdown-build] invocation 1/2 finished in 0.7s
node_modules/playwright-core/lib/coreBundle.js (65821:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65821:29 ]
       │
 65821 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/playwright-core/lib/coreBundle.js (65828:28) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
       ╭─[ node_modules/playwright-core/lib/coreBundle.js:65828:29 ]
       │
 65828 │               const value = eval(ˋ(${expr})ˋ);
       │                             ──┬─
       │                               ╰─── Use of direct ˋevalˋ here.
       │
       │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
───────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2343:30) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2343:31 ]
      │
 2343 │           ASM_CONSTS[start] = eval(func);
      │                               ──┬─
      │                                 ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

node_modules/web-tree-sitter/web-tree-sitter.js (2366:32) [EVAL] Use of direct ˋevalˋ function is strongly discouraged as it poses security risks and may cause
issues with minification.
      ╭─[ node_modules/web-tree-sitter/web-tree-sitter.js:2366:33 ]
      │
 2366 │           moduleExports[name] = eval(func);
      │                                 ──┬─
      │                                   ╰─── Use of direct ˋevalˋ here.
      │
      │ Help: Consider using indirect eval. For more information, check the documentation: https://rolldown.rs/guide/troubleshooting#avoiding-direct-eval
──────╯

[tsdown-build] invocation 2/2 finished in 13.1s
[plugin-control-plane-loads] verified 35 built modules with native require and checked doctor closures
runtime-postbuild: 11 phases completed in 4949ms (slowest: built plugin control-plane loads 2980ms)
│
◇

OpenClaw 2026.8.1 (4eef967) — All your chats, one OpenClaw.

Usage: openclaw plugins inspect|info [options] [id]

Inspect plugin details

Arguments:
  id          Plugin id

Options:
  --all       Inspect all plugins
  -h, --help  Display help for command
  --json      Print JSON
  --runtime   Load plugin runtime for hooks/tools/diagnostics
runner@runnervm76f27:/tmp/clawsweeper-live-proof-129158-NvCWt2/target$ pnpm 
… output truncated …

Assertions:

  • PASS expect_output: Inspect plugin details

How this fits together

The plugins CLI turns registry snapshots into operator-facing list and inspect output. Plugin loading records whether a plugin is disabled or failed; these formatters now use that status to label the recorded detail correctly.

flowchart LR
  A[Plugin configuration] --> B[Plugin loader]
  B --> C[Plugin status record]
  C --> D[Plugin list output]
  C --> E[Plugin inspect output]
  D --> F[Operator terminal]
  E --> F
Loading

Before merge

  • Resolve merge risk (P1) - GitHub reports this PR behind main and its required-check rollup is still incomplete; validate the exact merge result and exact-head checks before landing.
  • Complete next step (P2) - The patch has no supported mechanical defect to repair; refresh its merge result and let exact-head CI gate landing.
Agent review details

Security

None.

PR surface

Source +2, Tests +63. Total +65 across 4 files.

View PR surface stats
Area Files Added Removed Net
Source 2 4 2 +2
Tests 2 246 183 +63
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 250 185 +65

Review metrics

Metric Value Why it matters
Production versus test delta production +2; tests net +63 (246 added, 183 moved/removed) The only production growth is the two status discriminators at human-output boundaries; the test movement adds focused inspect coverage without a new production seam.

Merge-risk options

Maintainer options:

  1. Decide the mitigation before merge
    Land the two status-based presentation guards after the branch is refreshed against current main and exact-head validation succeeds.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Technical review

Best possible solution:

Land the two status-based presentation guards after the branch is refreshed against current main and exact-head validation succeeds.

Do we have a high-confidence way to reproduce the issue?

Yes, from source: normal loader paths create status: "disabled" records with an explanatory error, and current main prints that field as an error in verbose list and inspect output.

Is this the best way to solve the issue?

Yes. The status field is the loader-owned discriminator already used by compact list output, so applying it at the two remaining human-formatting boundaries is narrower and safer than changing loader metadata.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against c697cf27dae2.

Labels

Label justifications:

  • P3: This is a low-blast-radius operator-output correction; plugin loading, JSON output, and enabled behavior are unchanged.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: This maintainer PR includes focused CLI regression evidence in its body; the external-contributor proof gate does not apply.

Evidence

What I checked:

  • Disabled state retains a reason: The loader deliberately creates disabled records with status = "disabled", preserves the enablement reason in error, and records disabled activation state; therefore presentation must not treat every nonempty error field as a failure. (src/plugins/loader-cli-registry.ts:174, c697cf27dae2)
  • Current-main bug location: Current main shows a disabled record's error in verbose list output solely because the string is present, while compact list output already gates failure styling on status === "error". (src/cli/plugins-list-format.ts:72, c697cf27dae2)
  • Current-main inspect bug location: Current main always renders a nonempty plugin error with the red Error: label, including normal disabled-state reasons. (src/cli/plugins-inspect-command.ts:417, c697cf27dae2)
  • Patch follows the owner contract: The PR uses the existing authoritative status discriminator at both human presentation boundaries and leaves JSON/raw records unchanged; its focused tests cover disabled and failed records. (src/cli/plugins-inspect-command.ts:417, 4eef96703a82)
  • History and ownership: History shows Peter Steinberger recently maintained the same formatter and plugin CLI path; the local shallow/promisor history cannot retrieve older objects without network, so older provenance was not claimed. (src/cli/plugins-list-format.ts:72, 1901ddaa819b)
  • Release status: The PR head is not contained by a release tag and is only present in this review checkout; this is unmerged work, not an implemented-on-main candidate. (4eef96703a82)

Likely related people:

  • steipete: Recent history includes the immediately adjacent CLI formatter work and the current plugin output repair. (role: recent CLI and plugin-area contributor; confidence: high; commits: 4eef96703a82, 1901ddaa819b, f4387b7a5eff; files: src/cli/plugins-list-format.ts, src/cli/plugins-inspect-command.ts)
  • Vincent Koc: History attributes the prior enabled-state formatter correction to Vincent Koc. (role: adjacent formatter contributor; confidence: medium; commits: feb8d3a4bda7; files: src/cli/plugins-list-format.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Refresh against current main and confirm GitHub's exact merge result plus required checks for the current head.

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.

History

Review history (1 earlier review cycle)
  • reviewed 2026-08-25T08:30:08.038Z sha 3992e94 :: needs maintainer review before merge. :: none

@steipete

Copy link
Copy Markdown
Contributor Author

Rank-up follow-through: exact-head GitHub merge-result CI run 32828093797 passed on commit 4eef967, including the previously failing core lint shard; required openclaw/ci-gate is green. The inspect owner test split preserves all existing assertions and focused list/inspect coverage passes 35 tests. Skipping an unrelated behind-main-only rebase because repository policy treats main drift as advisory and rebasing would discard the proven exact-head CI; native prepare will revalidate the current head and merge state.

@steipete
steipete merged commit e7dbd50 into main Aug 25, 2026
232 checks passed
@steipete

Copy link
Copy Markdown
Contributor Author

Merged via squash.

@steipete
steipete deleted the codex/disabled-plugin-false-errors-20260825 branch August 25, 2026 09:02
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 26, 2026
…9158)

* fix(plugins): stop labeling normal disablement as errors

* test(plugins): separate inspect command coverage
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 P3 Low-priority cleanup, docs, polish, ergonomics, or speculative work. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M 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