test: silence doctor manifest repair notes

This commit is contained in:
Peter Steinberger
2026-04-20 17:24:12 +01:00
parent 6e58da9750
commit 4bbd1dc0d5
2 changed files with 5 additions and 2 deletions

View File

@@ -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 {

View File

@@ -113,6 +113,7 @@ export async function maybeRepairLegacyPluginManifestContracts(params: {
env?: NodeJS.ProcessEnv;
runtime: RuntimeEnv;
prompter: DoctorPrompter;
note?: typeof note;
}): Promise<void> {
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");
}
}