From 4bbd1dc0d5d4738a17c332739e85c4edc04626c1 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 20 Apr 2026 17:24:12 +0100 Subject: [PATCH] test: silence doctor manifest repair notes --- src/commands/doctor-plugin-manifests.test.ts | 1 + src/commands/doctor-plugin-manifests.ts | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/commands/doctor-plugin-manifests.test.ts b/src/commands/doctor-plugin-manifests.test.ts index 8989535bd45..510f3ab6896 100644 --- a/src/commands/doctor-plugin-manifests.test.ts +++ b/src/commands/doctor-plugin-manifests.test.ts @@ -123,6 +123,7 @@ describe("doctor plugin manifest legacy contract repair", () => { }, runtime: createRuntime(), prompter: createPrompter(), + note: vi.fn(), }); const next = JSON.parse(fs.readFileSync(path.join(root, "openclaw.plugin.json"), "utf-8")) as { diff --git a/src/commands/doctor-plugin-manifests.ts b/src/commands/doctor-plugin-manifests.ts index bacb61f843a..f86d8e3ccb7 100644 --- a/src/commands/doctor-plugin-manifests.ts +++ b/src/commands/doctor-plugin-manifests.ts @@ -113,6 +113,7 @@ export async function maybeRepairLegacyPluginManifestContracts(params: { env?: NodeJS.ProcessEnv; runtime: RuntimeEnv; prompter: DoctorPrompter; + note?: typeof note; }): Promise { const migrations = collectLegacyPluginManifestContractMigrations( params.env ? { env: params.env } : undefined, @@ -121,7 +122,8 @@ export async function maybeRepairLegacyPluginManifestContracts(params: { return; } - note( + const emitNote = params.note ?? note; + emitNote( [ "Legacy plugin manifest capability keys detected.", ...migrations.flatMap((migration) => migration.changeLines), @@ -156,6 +158,6 @@ export async function maybeRepairLegacyPluginManifestContracts(params: { } if (applied.length > 0) { - note(applied.join("\n"), "Doctor changes"); + emitNote(applied.join("\n"), "Doctor changes"); } }