mirror of https://github.com/openclaw/openclaw.git
fix(config): avoid failing startup on implicit memory slot (#47494)
* fix(config): avoid failing on implicit memory slot * fix(config): satisfy build for memory slot guard * docs(changelog): note implicit memory slot startup fix (#47494)
This commit is contained in:
parent
f0202264d0
commit
d88da9f5f8
|
|
@ -57,6 +57,7 @@ Docs: https://docs.openclaw.ai
|
|||
- CLI: avoid loading provider discovery during startup model normalization. (#46522) Thanks @ItsAditya-xyz and @vincentkoc.
|
||||
- Tlon: honor explicit empty allowlists and defer cite expansion. (#46788) Thanks @zpbrent and @vincentkoc.
|
||||
- ACP: require admin scope for mutating internal actions. (#46789) Thanks @tdjackey and @vincentkoc.
|
||||
- Gateway/config validation: stop treating the implicit default memory slot as a required explicit plugin config, so startup no longer fails with `plugins.slots.memory: plugin not found: memory-core` when `memory-core` was only inferred. (#47494) Thanks @ngutman.
|
||||
|
||||
## 2026.3.13
|
||||
|
||||
|
|
|
|||
|
|
@ -173,6 +173,24 @@ describe("config plugin validation", () => {
|
|||
}
|
||||
});
|
||||
|
||||
it("does not fail validation for the implicit default memory slot when plugins config is explicit", async () => {
|
||||
const res = validateConfigObjectWithPlugins(
|
||||
{
|
||||
agents: { list: [{ id: "pi" }] },
|
||||
plugins: {
|
||||
entries: { acpx: { enabled: true } },
|
||||
},
|
||||
},
|
||||
{
|
||||
env: {
|
||||
...suiteEnv(),
|
||||
OPENCLAW_BUNDLED_PLUGINS_DIR: path.join(suiteHome, "missing-bundled-plugins"),
|
||||
},
|
||||
},
|
||||
);
|
||||
expect(res.ok).toBe(true);
|
||||
});
|
||||
|
||||
it("warns for removed legacy plugin ids instead of failing validation", async () => {
|
||||
const removedId = "google-antigravity-auth";
|
||||
const res = validateInSuite({
|
||||
|
|
|
|||
|
|
@ -528,8 +528,17 @@ function validateConfigObjectWithPluginsBase(
|
|||
}
|
||||
}
|
||||
|
||||
// The default memory slot is inferred; only a user-configured slot should block startup.
|
||||
const pluginSlots = pluginsConfig?.slots;
|
||||
const hasExplicitMemorySlot =
|
||||
pluginSlots !== undefined && Object.prototype.hasOwnProperty.call(pluginSlots, "memory");
|
||||
const memorySlot = normalizedPlugins.slots.memory;
|
||||
if (typeof memorySlot === "string" && memorySlot.trim() && !knownIds.has(memorySlot)) {
|
||||
if (
|
||||
hasExplicitMemorySlot &&
|
||||
typeof memorySlot === "string" &&
|
||||
memorySlot.trim() &&
|
||||
!knownIds.has(memorySlot)
|
||||
) {
|
||||
pushMissingPluginIssue("plugins.slots.memory", memorySlot);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue