fix #80582: Memory: skip markdown placeholder snippets during short-term promotion#92698
fix #80582: Memory: skip markdown placeholder snippets during short-term promotion#92698mushuiyu886 wants to merge 4 commits into
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 13, 2026, 11:18 AM ET / 15:18 UTC. Summary PR surface: Source +46, Tests +262. Total +308 across 2 files. Reproducibility: yes. Current main is source-reproducible because non-empty markdown placeholders pass the existing empty/dreaming-contamination filters into recording, ranking, and apply; the linked issue also includes a sanitized workspace cleanup signal. Review metrics: 1 noteworthy metric.
Stored data model Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land the shared promotability guard once maintainers accept the intentional pruning of placeholder-only short-term recall entries and required checks remain green. Do we have a high-confidence way to reproduce the issue? Yes. Current main is source-reproducible because non-empty markdown placeholders pass the existing empty/dreaming-contamination filters into recording, ranking, and apply; the linked issue also includes a sanitized workspace cleanup signal. Is this the best way to solve the issue? Yes. Centralizing the guard in short-term-promotion.ts at each entry and reuse boundary is the best owner-boundary shape; downstream MEMORY.md cleanup alone would leave polluted recall state behind. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 45056a463ab2. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +46, Tests +262. Total +308 across 2 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
@clawsweeper re-review Addressed the two P2 findings in the latest head:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
@clawsweeper re-review Addressed the checked-empty checkbox finding in the latest head:
|
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
maintainer deep review confirmed placeholder-only short-term recall/promotion is a real bug, but this PR is not safe to land. After several canonical repair attempts and 130 focused passing tests, final autoreview still found the core heuristic is both over- and under-broad: meaningful headings are dropped when QMD includes adjacent formatting; standard empty ordered lists/tagged fences still pass; legacy flattened checkbox skeletons survive; and recall audit events report skipped hits as recorded. This is no longer a narrow regex fix. The canonical repair needs a typed/source-shape-aware normalization step that extracts meaningful content before storage/promotion and records accepted/skipped audit results truthfully, rather than continuing to grow ambiguous Markdown heuristics. I am closing this PR rather than landing silent memory loss or incomplete filtering. The linked issue should remain open for that bounded representation-level fix. Focused proof passed (130 tests and |
Summary
MEMORY.md.MEMORY.mdformat, or valid real-content promotion; external providers and channel semantics remain out of scope.Real behavior proof
-,*,>, fences, table separators, empty checkbox/bracket scaffolds such as[],- [ ],[x], or- [x], or## Tagesnotizen\n-\n\n## Entscheidungen\n-as useful memory candidates and write empty placeholders into long-termMEMORY.md.extensions/memory-core, using the memory-core plugin-state test runtime and the real short-term promotion record/rank/apply functions against local memory files.MEMORY.mdcontains the valid memories while excluding markdown skeleton, empty checkbox, bracket-only, and checked-empty checkbox sections.memory-coreshort-term promotion path and its localMEMORY.mdpromotion behavior.Review findings addressed
## API keys rotated; heading-only snippets with durable content now remain promotable and are proven to reachMEMORY.md.[ ],[], and- [ ], plus preserve coverage proving- [ ] rotate API keysand- [x] backups verifiedstill promote.[x],[X],- [x], and- [X]while keeping checked checkbox items with real text promotable.Regression Test Plan
extensions/memory-core/src/short-term-promotion.test.tsMEMORY.md, marker-only fragments and empty unchecked/checked checkbox or bracket scaffolds are rejected, and meaningful heading-only and checkbox-with-content snippets still promote.Merge risk
MEMORY.mdformat, or migration behavior. Related PR scan/issue initialization did not identify an open linked PR that already covers Memory: skip markdown placeholder snippets during short-term promotion #80582; changing external providers, channels, or long-term memory schema is out of scope.Root Cause
MEMORY.mdcleanup after pollution has already occurred.extensions/memory-coreshort-term promotion.short-term-promotion.tsowns the source-of-truth path for record, rank, rehydrate, and apply decisions before long-term memory is written, so the filter is placed before downstreamMEMORY.mdpersistence.