Skip to content

Commit b1be398

Browse files
committed
fix(memory): skip markdown placeholder snippets during short-term promotion
Bare bullet items (-, *, +) and whitespace-only lines in daily-note bootstrap sections (e.g. ## Tagesnotizen followed by -) were being promoted into MEMORY.md as empty or near-empty blocks. These are structural scaffolding, not promotable content. Fix: treat placeholder snippets as contaminated in isContaminatedDreamingSnippet so they are skipped during promotion. Closes #80582
1 parent 6441e56 commit b1be398

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

extensions/memory-core/src/short-term-promotion.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,12 @@ function isContaminatedDreamingSnippet(raw: string): boolean {
407407
if (!snippet) {
408408
return false;
409409
}
410+
// Skip markdown placeholder snippets: bare bullets, empty list items, and
411+
// whitespace-only lines that serve as structural scaffolding rather than
412+
// promotable content. These are common in daily-note bootstrap sections.
413+
if (/^\s*[-*+]\s*$/.test(snippet) || /^\s*$/.test(snippet)) {
414+
return true;
415+
}
410416
if (
411417
/<!--\s*openclaw-memory-promotion:/i.test(snippet) ||
412418
DREAMING_TRANSCRIPT_PROMPT_LINE_RE.test(snippet)

0 commit comments

Comments
 (0)