fix(memory-lancedb): accept dreaming config for slot-owned memory (#63874)

Merged via squash.

Prepared head SHA: 9aaf29bd36
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Co-authored-by: mbelinky <132747814+mbelinky@users.noreply.github.com>
Reviewed-by: @mbelinky
This commit is contained in:
Mariano
2026-04-09 23:03:53 +02:00
committed by GitHub
parent 820dc38525
commit 4bd720527b
5 changed files with 120 additions and 1 deletions

View File

@@ -156,6 +156,9 @@ describe("memory dreaming host helpers", () => {
"America/Los_Angeles",
),
).toBe(true);
});
it("resolves the configured memory-slot plugin id", () => {
expect(
resolveMemoryDreamingPluginId({
plugins: {
@@ -165,6 +168,9 @@ describe("memory dreaming host helpers", () => {
},
} as OpenClawConfig),
).toBe("memos-local-openclaw-plugin");
});
it("reads dreaming config from the configured memory-slot owner", () => {
expect(
resolveMemoryDreamingPluginConfig({
plugins: {
@@ -187,6 +193,36 @@ describe("memory dreaming host helpers", () => {
enabled: true,
},
});
});
it("reads dreaming config from memory-lancedb when it owns the memory slot", () => {
expect(
resolveMemoryDreamingPluginConfig({
plugins: {
slots: {
memory: "memory-lancedb",
},
entries: {
"memory-lancedb": {
config: {
dreaming: {
enabled: true,
frequency: "0 */6 * * *",
},
},
},
},
},
} as OpenClawConfig),
).toEqual({
dreaming: {
enabled: true,
frequency: "0 */6 * * *",
},
});
});
it("falls back to memory-core when no memory slot override is configured", () => {
expect(
resolveMemoryDreamingPluginConfig({
plugins: {