Skip to content

Commit 732c574

Browse files
fix(cli): update plugins doctor clean message (#115073) (#117160)
* fix(cli): update plugins doctor clean message (#115073) Root cause: plugins doctor reports 'No plugin issues detected.' even when a selected context-engine plugin is quarantined at runtime, because doctor is a fast static control-plane check. Architectural owner: plugins-cli.runtime.ts Canonical fix: Change clean status message to direct operators to 'openclaw health' for active runtime quarantine/fallback status. Production LOC delta: +2 LOC * fix(cli): update plugins doctor clean message wording (#115073) Root cause: Refine the diagnostic text message to run openclaw health directly. Architectural owner: src/cli/plugins-cli.runtime.ts * fix(cli): clarify plugin doctor scope --------- Co-authored-by: Vincent Koc <[email protected]>
1 parent 0cd33ba commit 732c574

3 files changed

Lines changed: 21 additions & 14 deletions

File tree

‎docs/cli/plugins.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ The `--json` flag outputs a machine-readable report suitable for scripting and a
508508
openclaw plugins doctor
509509
```
510510

511-
`doctor` reports plugin load errors, manifest/discovery diagnostics, compatibility notices, and stale plugin config references such as missing plugin slots. When the install tree and plugin config are clean it prints `No plugin issues detected.` If stale config remains but the install tree is otherwise healthy, the summary says so instead of implying full plugin health.
511+
`doctor` reports plugin load errors, manifest/discovery diagnostics, compatibility notices, and stale plugin config references such as missing plugin slots. It loads plugin modules without activating plugins and does not query the running Gateway. When these local checks pass, it prints `Plugin discovery, module loading, compatibility, and configuration checks passed. Run "openclaw health" to check the running Gateway, including runtime quarantines and fallbacks.` The [health command](/cli/health) reads current runtime quarantine and fallback state from the Gateway. If stale config remains but the install tree is otherwise healthy, the summary says so instead of implying full plugin health.
512512

513513
If a configured plugin is present on disk but blocked by the loader's path-safety checks, config validation keeps the plugin entry and reports it as `present but blocked`. Fix the preceding blocked-plugin diagnostic, such as path ownership or world-writable permissions, instead of removing the `plugins.entries.<id>` or `plugins.allow` config.
514514

‎src/cli/plugins-cli.list.test.ts‎

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ const workshopMocks = vi.hoisted(() => ({
2222
detectToolPolicyDiagnostic: vi.fn(),
2323
}));
2424

25+
const cleanDoctorMessage =
26+
"Plugin discovery, module loading, compatibility, and configuration checks passed. " +
27+
'Run "openclaw health" to check the running Gateway, including runtime quarantines and fallbacks.';
28+
2529
vi.mock("../skills/workshop/tool-policy-diagnostic.js", () => ({
2630
detectSkillWorkshopToolPolicyDiagnostic: workshopMocks.detectToolPolicyDiagnostic,
2731
}));
@@ -93,7 +97,7 @@ describe("plugins cli list", () => {
9397
await runPluginsCommand(["plugins", "doctor"]);
9498

9599
expect(buildPluginDiagnosticsReport).toHaveBeenCalledWith({ config: {}, effectiveOnly: true });
96-
expect(runtimeLogs).toContain("No plugin issues detected.");
100+
expect(runtimeLogs).toContain(cleanDoctorMessage);
97101
});
98102

99103
it("reports stale plugin config in doctor output without claiming full plugin health", async () => {
@@ -145,7 +149,7 @@ describe("plugins cli list", () => {
145149
expect(output).toContain(
146150
"No plugin install-tree issues detected; configuration warnings remain.",
147151
);
148-
expect(output).not.toContain("No plugin issues detected.");
152+
expect(output).not.toContain(cleanDoctorMessage);
149153
});
150154

151155
it("reports missing configured Codex runtime plugin in doctor output", async () => {
@@ -191,7 +195,7 @@ describe("plugins cli list", () => {
191195
expect(output).toContain(
192196
"No plugin install-tree issues detected; configuration warnings remain.",
193197
);
194-
expect(output).not.toContain("No plugin issues detected.");
198+
expect(output).not.toContain(cleanDoctorMessage);
195199
});
196200

197201
it("reports missing configured ACPX runtime plugin in doctor output", async () => {
@@ -213,7 +217,7 @@ describe("plugins cli list", () => {
213217
expect(output).toContain('Configured runtime "acpx" requires the ACPX Runtime plugin');
214218
expect(output).toContain("openclaw doctor --fix");
215219
expect(output).toContain("openclaw plugins install @openclaw/acpx");
216-
expect(output).not.toContain("No plugin issues detected.");
220+
expect(output).not.toContain(cleanDoctorMessage);
217221
});
218222

219223
it("reports blocked configured ACPX runtime with ACP-specific guidance", async () => {
@@ -241,7 +245,7 @@ describe("plugins cli list", () => {
241245
expect(output).toContain("disable ACP/acpx in acp config");
242246
expect(output).not.toContain('runtime policy to "openclaw"');
243247
expect(output).not.toContain("openclaw plugins install @openclaw/acpx");
244-
expect(output).not.toContain("No plugin issues detected.");
248+
expect(output).not.toContain(cleanDoctorMessage);
245249
});
246250

247251
it("reports disabled configured ACPX runtime with ACP-specific guidance", async () => {
@@ -264,7 +268,7 @@ describe("plugins cli list", () => {
264268
expect(output).toContain("disable ACP/acpx in acp config");
265269
expect(output).not.toContain('runtime policy to "openclaw"');
266270
expect(output).not.toContain("openclaw plugins install @openclaw/acpx");
267-
expect(output).not.toContain("No plugin issues detected.");
271+
expect(output).not.toContain(cleanDoctorMessage);
268272
});
269273

270274
it("does not report implicit OpenAI Codex preference as configured runtime", async () => {
@@ -285,7 +289,7 @@ describe("plugins cli list", () => {
285289

286290
const output = runtimeLogs.join("\n");
287291
expect(output).not.toContain('Configured runtime "codex"');
288-
expect(output).toContain("No plugin issues detected.");
292+
expect(output).toContain(cleanDoctorMessage);
289293
});
290294

291295
it("does not report configured Codex runtime when the plugin is enabled", async () => {
@@ -308,7 +312,7 @@ describe("plugins cli list", () => {
308312

309313
await runPluginsCommand(["plugins", "doctor"]);
310314

311-
expect(runtimeLogs).toContain("No plugin issues detected.");
315+
expect(runtimeLogs).toContain(cleanDoctorMessage);
312316
});
313317

314318
it("reports configured Codex runtime when the plugin record is disabled", async () => {
@@ -336,7 +340,7 @@ describe("plugins cli list", () => {
336340
expect(output).toContain('but "codex" is disabled');
337341
expect(output).toContain('Enable the "codex" plugin');
338342
expect(output).not.toContain("openclaw plugins install @openclaw/codex");
339-
expect(output).not.toContain("No plugin issues detected.");
343+
expect(output).not.toContain(cleanDoctorMessage);
340344
});
341345

342346
it("reports blocked configured Codex runtime without install advice", async () => {
@@ -368,7 +372,7 @@ describe("plugins cli list", () => {
368372
expect(output).toContain('Remove "codex" from plugins.deny');
369373
expect(output).not.toContain('Run "openclaw doctor --fix" to install');
370374
expect(output).not.toContain("openclaw plugins install @openclaw/codex");
371-
expect(output).not.toContain("No plugin issues detected.");
375+
expect(output).not.toContain(cleanDoctorMessage);
372376
});
373377

374378
it("reports disabled configured Codex runtime entry without install advice", async () => {
@@ -402,7 +406,7 @@ describe("plugins cli list", () => {
402406
expect(output).toContain("Set plugins.entries.codex.enabled=true");
403407
expect(output).not.toContain('Run "openclaw doctor --fix" to install');
404408
expect(output).not.toContain("openclaw plugins install @openclaw/codex");
405-
expect(output).not.toContain("No plugin issues detected.");
409+
expect(output).not.toContain(cleanDoctorMessage);
406410
});
407411

408412
it("reports config-selected plugin source shadowing in doctor output", async () => {
@@ -462,7 +466,7 @@ describe("plugins cli list", () => {
462466

463467
await runPluginsCommand(["plugins", "doctor"]);
464468

465-
expect(runtimeLogs).toContain("No plugin issues detected.");
469+
expect(runtimeLogs).toContain(cleanDoctorMessage);
466470
});
467471

468472
it("reports persisted plugin registry state without refreshing", async () => {

‎src/cli/plugins-cli.runtime.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,10 @@ export async function runPluginsDoctorCommand(): Promise<void> {
396396
const pluginConfigWarnings = [...stalePluginConfigWarnings, ...configuredRuntimePluginWarnings];
397397

398398
if (!hasInstallTreeIssues && pluginConfigWarnings.length === 0) {
399-
defaultRuntime.log("No plugin issues detected.");
399+
defaultRuntime.log(
400+
"Plugin discovery, module loading, compatibility, and configuration checks passed. " +
401+
'Run "openclaw health" to check the running Gateway, including runtime quarantines and fallbacks.',
402+
);
400403
return;
401404
}
402405

0 commit comments

Comments
 (0)