fix(memory-core): keep Dream Diary to one entry per sweep#70403
fix(memory-core): keep Dream Diary to one entry per sweep#70403solomonneas wants to merge 1 commit into
Conversation
74c80ec to
b450f96
Compare
|
自动巡检路过:这个 PR 看起来是高性价比修复项。若 maintainer 需要,我可以继续补一轮最小验证(冲突/关键检查/回归点)并协助推进到可合并状态。 |
Greptile SummaryThis PR stops the light and REM dreaming phases from each independently appending a Confidence Score: 5/5Safe to merge — the change is internally consistent and the tests directly verify the new single-entry-per-sweep invariant. All remaining feedback is P2 style (value import vs. type-only import). No logic errors, missing cleanup, or broken contracts were found. No files require special attention. Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/memory-core/src/dreaming-phases.ts
Line: 22
Comment:
**Value import used only for type inference**
After this PR's removals, `generateAndAppendDreamNarrative` is never called in this file — it is only referenced via `Parameters<typeof generateAndAppendDreamNarrative>[0]["subagent"]` in type positions (lines 55, 1491, 1551, 1604). A `import type` satisfies `typeof` in type positions just as well, and signals intent clearly.
```suggestion
import type { generateAndAppendDreamNarrative } from "./dreaming-narrative.js";
```
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "fix(memory-core): keep Dream Diary to on..." | Re-trigger Greptile |
| generateAndAppendDreamNarrative, | ||
| type NarrativePhaseData, | ||
| } from "./dreaming-narrative.js"; | ||
| import { generateAndAppendDreamNarrative } from "./dreaming-narrative.js"; |
There was a problem hiding this comment.
Value import used only for type inference
After this PR's removals, generateAndAppendDreamNarrative is never called in this file — it is only referenced via Parameters<typeof generateAndAppendDreamNarrative>[0]["subagent"] in type positions (lines 55, 1491, 1551, 1604). A import type satisfies typeof in type positions just as well, and signals intent clearly.
| import { generateAndAppendDreamNarrative } from "./dreaming-narrative.js"; | |
| import type { generateAndAppendDreamNarrative } from "./dreaming-narrative.js"; |
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/memory-core/src/dreaming-phases.ts
Line: 22
Comment:
**Value import used only for type inference**
After this PR's removals, `generateAndAppendDreamNarrative` is never called in this file — it is only referenced via `Parameters<typeof generateAndAppendDreamNarrative>[0]["subagent"]` in type positions (lines 55, 1491, 1551, 1604). A `import type` satisfies `typeof` in type positions just as well, and signals intent clearly.
```suggestion
import type { generateAndAppendDreamNarrative } from "./dreaming-narrative.js";
```
How can I resolve this? If you propose a fix, please make it concise.|
Related work from PRtags group Title: Open PR candidate: Dream Diary duplicate/raw fallback cleanup
|
|
Closing as superseded by #65138 (merged 2026-04-12), which addressed the duplicate Dream Diary entries with |
Summary
DREAMS.mddiary entriesWhy
A single sweep was appending multiple diary entries with the same displayed timestamp because light, REM, and deep all used the same sweep time when calling the narrative append path. This keeps the diary readable without changing phase reporting or promotion behavior.
Validation
pnpm test extensions/memory-core/src/dreaming-phases.test.ts extensions/memory-core/src/dreaming-narrative.test.tspnpm exec tsc -p extensions/memory-core/tsconfig.json --noEmitNotes
Follow-up to #68774.
Also builds on the earlier dreaming-bloat cleanup in #68445.