fix(cli): report stale plugin doctor config#81515
Conversation
|
Codex review: needs maintainer review before merge. Summary Reproducibility: yes. Current Real behavior proof Next step before merge Security Review detailsBest possible solution: Land the focused diagnostic fix if maintainers accept this remediation-summary route, and keep or adjust the linked issue handling if updater cleanup remains separate. Do we have a high-confidence way to reproduce the issue? Yes. Current Is this the best way to solve the issue? Yes for the PR's scoped bug. Reusing the existing source-config scanner is the narrow maintainable fix without changing updater rollback, config mutation, JSON, or exit-code behavior. What I checked:
Likely related people:
Remaining risk / open question:
Codex review notes: model gpt-5.5, reasoning high; reviewed against 7c4f60757204. |
600d33c to
b45a4be
Compare
9dc72d8 to
23bc849
Compare
|
Merged via squash.
Thanks @BKF-Gitty! |
Summary
openclaw plugins doctorcould print stale plugin config warnings and still end withNo plugin issues detected.plugins.allow,plugins.entries, orplugins.slots.*still referenced a missing plugin.plugins doctornow reuses the shared stale-plugin-config scanner, reports those findings underPlugin configuration:, and printsNo plugin install-tree issues detected; configuration warnings remain.when only config findings exist.Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
Real behavior proof (required for external PRs)
openclaw plugins doctor.No plugin issues detected.when warnings remain.plugins doctorhas no JSON mode.No plugin issues detected.Root Cause (if applicable)
plugins doctoronly counted runtime plugin load errors, manifest/discovery errors, source shadowing, and compatibility notices when deciding its final verdict.plugins doctordid not include them.Regression Test Plan (if applicable)
src/cli/plugins-cli.list.test.tsplugins.allow,plugins.entries.lossless-claw, andplugins.slots.contextEnginereference an unavailablelossless-clawplugin while runtime diagnostics are otherwise clean.plugins doctorcommand path and the real shared stale-config scanner without touching plugin install or cleanup behavior.src/commands/doctor/shared/stale-plugin-config.test.tscovers the scanner helper, but not theplugins doctorverdict.User-visible / Behavior Changes
openclaw plugins doctornow reports stale plugin config references and distinguishes a healthy install tree from remaining config warnings.Diagram (if applicable)
Security Impact (required)
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain risk + mitigation: N/ARepro + Verification
Environment
openclaw-shell{ "plugins": { "allow": ["lossless-claw"], "entries": { "lossless-claw": { "enabled": true } }, "slots": { "contextEngine": "lossless-claw" } } }Steps
pnpm openclaw plugins doctorwithOPENCLAW_CONFIG_PATHandOPENCLAW_STATE_DIRpointed at the isolated temp paths.Expected
No plugin issues detected.while config warnings remain.Actual
Evidence
Human Verification (required)
What you personally verified (not just CI), and how:
plugins doctor; realpnpm openclaw plugins doctoroutput with a stalelossless-clawconfig.No plugin issues detected.; source-config scanner catches stale refs even when runtime config is sanitized.Review Conversations
Compatibility / Migration
Yes/No): YesYes/No): NoYes/No): NoRisks and Mitigations
plugins doctornow does one additional config snapshot read and stale-config scan.Validation
pnpm run docs:list: passpnpm test src/cli/plugins-cli.list.test.ts src/commands/doctor/shared/stale-plugin-config.test.ts: passpnpm exec oxfmt --check src/cli/plugins-cli.ts src/cli/plugins-cli.list.test.ts docs/cli/plugins.md: passpnpm exec oxlint src/cli/plugins-cli.ts src/cli/plugins-cli.list.test.ts: passpnpm tsgo: passgit diff --check: passpnpm check:changed: fails in unrelated all-project typecheck onsrc/plugins/registry.runtime-config.test.ts:45and:46; those files are outside this PR diff.