mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 12:10:42 +00:00
fix(dreaming): default storage.mode to "separate" so phase blocks stop polluting daily memory files (#66412)
Merged via squash.
Prepared head SHA: 4b1c8ac4ec
Co-authored-by: mjamiv <142179942+mjamiv@users.noreply.github.com>
Co-authored-by: jalehman <550978+jalehman@users.noreply.github.com>
Reviewed-by: @jalehman
This commit is contained in:
@@ -20,6 +20,8 @@ Docs: https://docs.openclaw.ai
|
||||
- Agents/context + Memory: trim default startup/skills prompt budgets, cap `memory_get` excerpts by default with explicit continuation metadata, and keep QMD reads aligned with the same bounded excerpt contract so long sessions pull less context by default without losing deterministic follow-up reads.
|
||||
- Matrix/commands: skip DM pairing-store reads on room traffic now that room control-command authorization ignores pairing-store entries, keeping the room path narrower without changing room auth behavior. (#67325) Thanks @gumadeiras.
|
||||
- Memory-core/dreaming: skip dreaming narrative transcripts from session-store metadata before bootstrap records land so dream diary prompt/prose lines do not pollute session ingestion. (#67315) thanks @jalehman.
|
||||
- Agents/local models: clarify low-context preflight hints for self-hosted models, point config-backed caps at the relevant OpenClaw setting, and stop suggesting larger models when `agents.defaults.contextTokens` is the real limit. (#66236) Thanks @ImLukeF.
|
||||
- Dreaming/memory-core: change the default `dreaming.storage.mode` from `inline` to `separate` so Dreaming phase blocks (`## Light Sleep`, `## REM Sleep`) land in `memory/dreaming/{phase}/YYYY-MM-DD.md` instead of being injected into `memory/YYYY-MM-DD.md`. Daily memory files no longer get dominated by structured candidate output, and the daily-ingestion scanner that already strips dream marker blocks no longer has to compete with hundreds of phase-block lines on every run. Operators who want the previous behavior can opt in by setting `plugins.entries.memory-core.config.dreaming.storage.mode: "inline"`. (#66412) Thanks @mjamiv.
|
||||
|
||||
## 2026.4.15-beta.1
|
||||
|
||||
|
||||
@@ -27,6 +27,11 @@ const LIGHT_DREAMING_TEST_CONFIG: OpenClawConfig = {
|
||||
dreaming: {
|
||||
enabled: true,
|
||||
timezone: "UTC",
|
||||
// The existing tests in this file were written when "inline" was the
|
||||
// default storage mode and assert against `memory/<day>.md` directly.
|
||||
// Pin the storage mode explicitly so they keep covering inline mode
|
||||
// after the default flipped to "separate" in #66328.
|
||||
storage: { mode: "inline", separateReports: false },
|
||||
phases: {
|
||||
light: {
|
||||
enabled: true,
|
||||
@@ -305,6 +310,10 @@ describe("memory-core dreaming phases", () => {
|
||||
config: {
|
||||
dreaming: {
|
||||
enabled: true,
|
||||
// This test asserts inline-mode side effects on the daily
|
||||
// file; pin storage explicitly after the default flipped to
|
||||
// "separate" in #66328.
|
||||
storage: { mode: "inline", separateReports: false },
|
||||
phases: {
|
||||
light: {
|
||||
enabled: true,
|
||||
|
||||
@@ -184,7 +184,7 @@ describe("short-term dreaming config", () => {
|
||||
maxAgeDays: 30,
|
||||
verboseLogging: false,
|
||||
storage: {
|
||||
mode: "inline",
|
||||
mode: "separate",
|
||||
separateReports: false,
|
||||
},
|
||||
});
|
||||
@@ -223,7 +223,7 @@ describe("short-term dreaming config", () => {
|
||||
maxAgeDays: 30,
|
||||
verboseLogging: true,
|
||||
storage: {
|
||||
mode: "inline",
|
||||
mode: "separate",
|
||||
separateReports: false,
|
||||
},
|
||||
});
|
||||
@@ -259,7 +259,7 @@ describe("short-term dreaming config", () => {
|
||||
maxAgeDays: 45,
|
||||
verboseLogging: false,
|
||||
storage: {
|
||||
mode: "inline",
|
||||
mode: "separate",
|
||||
separateReports: false,
|
||||
},
|
||||
});
|
||||
@@ -294,7 +294,7 @@ describe("short-term dreaming config", () => {
|
||||
maxAgeDays: 30,
|
||||
verboseLogging: false,
|
||||
storage: {
|
||||
mode: "inline",
|
||||
mode: "separate",
|
||||
separateReports: false,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -615,7 +615,7 @@ export async function runShortTermDreamingPromotionIfTriggered(params: {
|
||||
bodyLines: reportLines,
|
||||
nowMs: sweepNowMs,
|
||||
timezone: params.config.timezone,
|
||||
storage: params.config.storage ?? { mode: "inline", separateReports: false },
|
||||
storage: params.config.storage ?? { mode: "separate", separateReports: false },
|
||||
});
|
||||
// Generate dream diary narrative from promoted memories.
|
||||
if (params.subagent && (candidates.length > 0 || applied.applied > 0)) {
|
||||
|
||||
@@ -90,6 +90,31 @@ describe("memory dreaming host helpers", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("defaults storage mode to separate so phase blocks do not pollute daily memory files", () => {
|
||||
const resolved = resolveMemoryDreamingConfig({
|
||||
pluginConfig: {},
|
||||
});
|
||||
|
||||
expect(resolved.storage).toEqual({
|
||||
mode: "separate",
|
||||
separateReports: false,
|
||||
});
|
||||
});
|
||||
|
||||
it("preserves explicit inline storage mode for callers that opt in", () => {
|
||||
const resolved = resolveMemoryDreamingConfig({
|
||||
pluginConfig: {
|
||||
dreaming: {
|
||||
storage: {
|
||||
mode: "inline",
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(resolved.storage.mode).toBe("inline");
|
||||
});
|
||||
|
||||
it("applies top-level dreaming frequency across all phases", () => {
|
||||
const resolved = resolveMemoryDreamingConfig({
|
||||
pluginConfig: {
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
export const DEFAULT_MEMORY_DREAMING_ENABLED = false;
|
||||
export const DEFAULT_MEMORY_DREAMING_TIMEZONE = undefined;
|
||||
export const DEFAULT_MEMORY_DREAMING_VERBOSE_LOGGING = false;
|
||||
export const DEFAULT_MEMORY_DREAMING_STORAGE_MODE = "inline";
|
||||
export const DEFAULT_MEMORY_DREAMING_STORAGE_MODE = "separate";
|
||||
export const DEFAULT_MEMORY_DREAMING_SEPARATE_REPORTS = false;
|
||||
export const DEFAULT_MEMORY_DREAMING_FREQUENCY = "0 3 * * *";
|
||||
export const DEFAULT_MEMORY_DREAMING_PLUGIN_ID = "memory-core";
|
||||
|
||||
Reference in New Issue
Block a user