diff --git a/src/config/config.plugin-validation.test.ts b/src/config/config.plugin-validation.test.ts index f5344123944..6d43e9a28a7 100644 --- a/src/config/config.plugin-validation.test.ts +++ b/src/config/config.plugin-validation.test.ts @@ -357,6 +357,53 @@ describe("config plugin validation", () => { expectPathMessage(res.warnings, "plugins.entries.memory-lancedb", message); }); + it("keeps blocked official external memory slot plugins fatal", () => { + const res = validateConfigObjectWithPlugins( + { + agents: { list: [{ id: "pi" }] }, + plugins: { + slots: { memory: "memory-lancedb" }, + entries: { "memory-lancedb": { enabled: true } }, + }, + }, + { + env: suiteEnv(), + pluginMetadataSnapshot: { + manifestRegistry: { + plugins: [], + diagnostics: [ + { + level: "warn", + pluginId: "memory-lancedb", + message: "blocked plugin candidate: fixture safety block", + }, + ], + }, + }, + }, + ); + + expect(res.ok).toBe(false); + if (res.ok) { + return; + } + expectPathMessageIncludes( + res.issues, + "plugins.slots.memory", + "plugin present but blocked: memory-lancedb", + ); + expectPathMessageIncludes( + res.warnings, + "plugins.entries.memory-lancedb", + "plugin present but blocked: memory-lancedb", + ); + expect( + res.warnings?.some((warning) => + warning.message.includes("plugin not installed: memory-lancedb"), + ), + ).toBe(false); + }); + it.runIf(process.platform !== "win32")( "reports configured blocked plugins without stale not-found wording", async () => { diff --git a/src/config/validation.ts b/src/config/validation.ts index 6f7a8530b71..eb62fbbfad4 100644 --- a/src/config/validation.ts +++ b/src/config/validation.ts @@ -1557,8 +1557,11 @@ function validateConfigObjectWithPluginsBase( memorySlot.trim() && !knownIds.has(memorySlot) ) { + const isMissingOfficialExternalMemorySlot = Boolean( + formatMissingOfficialExternalPluginWarning(memorySlot), + ); pushMissingPluginIssue("plugins.slots.memory", memorySlot, { - warnOnly: Boolean(formatMissingOfficialExternalPluginWarning(memorySlot)), + warnOnly: isMissingOfficialExternalMemorySlot && !findBlockedPluginDiagnostic(memorySlot), }); }