fix(memory): skip markdown placeholder snippets during short-term promotion#95571
fix(memory): skip markdown placeholder snippets during short-term promotion#95571lsr911 wants to merge 1 commit into
Conversation
…motion 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 openclaw#80582
|
Thanks for the context here. I swept through the related work, and this is now duplicate or superseded. Close as superseded: the open canonical issue still owns the memory-core placeholder promotion bug, and maintainer review already rejected this heuristic filter family in favor of typed/source-shape-aware normalization. This PR is narrower than the previously closed same-issue attempts and does not cover the linked issue’s skeleton-range or relocation paths. Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Canonical path: Keep #80582 as the canonical tracker and replace this regex-only branch with the maintainer-requested typed/source-shape-aware short-term promotion normalization repair. So I’m closing this here and keeping the remaining discussion on #80582. Review detailsBest possible solution: Keep #80582 as the canonical tracker and replace this regex-only branch with the maintainer-requested typed/source-shape-aware short-term promotion normalization repair. Do we have a high-confidence way to reproduce the issue? Yes. Current main is source-reproducible because non-empty markdown placeholder ranges pass the existing empty/dreaming-contamination gates into recording, ranking, relocation, and apply; the canonical issue also includes a sanitized field cleanup signal. Is this the best way to solve the issue? No. This PR is a plausible partial filter, but prior maintainer review rejected this heuristic family and the current patch still misses skeleton ranges plus relocation matching. Security review: Security review cleared: The diff changes one memory-core TypeScript filtering path only, with no dependency, workflow, package metadata, secret-handling, or code-execution surface changes. AGENTS.md: found and applied where relevant. What I checked:
Likely related people:
Codex review notes: model internal, reasoning high; reviewed against b84665222c0e. |
|
ClawSweeper applied the proposed close for this PR.
|
What Problem This Solves
Short-term memory promotion treats markdown skeleton placeholders — such as a
bare
-under a daily-note heading — as promotable snippets. In the affectedcase, promotion appends empty or near-empty blocks into MEMORY.md because a
grounded candidate can be rehydrated onto a placeholder line.
Why This Change Was Made
isContaminatedDreamingSnippetfilters out unwanted dreaming output but didnot check for structural placeholder lines. Daily notes commonly contain
bootstrap sections with empty bullets:
These are scaffolding, not promotable content.
Changes
extensions/memory-core/src/short-term-promotion.ts— treat barebullet items (
-,*,+) and whitespace-only lines as contaminated inisContaminatedDreamingSnippetso they are skipped during promotionEvidence
/^\s*[-*+]\s*$/matches standard Markdown list markers with nocontent, and
/^\s*$/matches blank linesRelated
Closes #80582