Skip to content

fix #83830: [Bug]: Dreaming diary repeats "first day" narrative every sweep — same early memories dominate snippets#91225

Merged
steipete merged 3 commits into
openclaw:mainfrom
mushuiyu886:feat/issue-83830
Jun 15, 2026
Merged

fix #83830: [Bug]: Dreaming diary repeats "first day" narrative every sweep — same early memories dominate snippets#91225
steipete merged 3 commits into
openclaw:mainfrom
mushuiyu886:feat/issue-83830

Conversation

@mushuiyu886

@mushuiyu886 mushuiyu886 commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Problem: light dreaming could keep sending the same high-recall first-day memory into the Dream Diary generator after that memory was already written, so repeated sweeps kept producing the same "first day" narrative.
  • Solution: make light dreaming read recent Dream Diary entries, expand the candidate pool before the phase limit, prefer snippets not already covered by recent diary history, and pass the current sweep day plus recent diary context into the narrative prompt.
  • Latest review follow-up: readRecentDreamDiaryEntries() now treats unreadable optional DREAMS.md context as empty history, including permission/safe-read failures such as EACCES and EPERM, so light dreaming does not abort before staging/reporting.
  • What did NOT change: public memory-core config, plugin SDK API, provider/model routing, DREAMS.md markers/file format, short-term recall store schema, append/dedupe cleanup commands, and the strict managed DREAMS.md write path are unchanged.
  • Why it matters / User impact: later memories can reach Dream Diary snippets after repeated sweeps instead of the same early memory monopolizing the one-page input, and optional diary history can no longer stop light dreaming just because DREAMS.md is unreadable.

Fixes #83830

Maintainer-ready notes

  • Fix classification: Root cause fix.
  • Maintainer-ready confidence: High for the Linux/source-level memory-core behavior exercised here; external provider prose quality, desktop/mobile, and live channel behavior are not claimed.
  • Patch quality notes: The latest follow-up is deliberately narrow: only optional diary prompt-context reads degrade to empty history on read/permission/safe-read errors. Managed DREAMS.md updates still go through the existing updateDreamsFile() path and still reject unreadable files.
  • Architecture / source-of-truth check: Light snippet selection remains owned by extensions/memory-core/src/dreaming-phases.ts; prompt/DREAMS.md context remains owned by extensions/memory-core/src/dreaming-narrative.ts; shared path/read/write safety remains owned by extensions/memory-core/src/dreaming-dreams-file.ts.
  • Out of scope: deleting or rewriting existing diary entries, semantic duplicate cleanup during append, provider/model output quality, recall persistence schema migration, public dreaming defaults, external channel behavior, and relaxing managed write safety checks.

Real behavior proof

  • Behavior or issue addressed: A high-recall first-day memory that was already present in DREAMS.md previously won the light phase's limited snippet slot because selection sorted by recent recall time and recall count before the phase limit. The latest review finding covered the follow-up path: recent diary history is optional prompt context, but an unreadable DREAMS.md could abort the required light-dreaming path before staging/reporting.
  • Real environment tested: Local Linux OpenClaw worktree at /media/vdc/code/ai/aispace/openclaw-worktrees/pr-91225, branch repair/pr-91225, latest HEAD 1eb48a6c6c311e2ba8325b0f7343a6ca3ebc5786. The latest proof uses real local filesystem permissions (chmod 000) through the production memory-core diary context reader and the production DREAMS.md update helper.
  • Exact steps or command run after this patch:
TASK_WORKTREE="/media/vdc/code/ai/aispace/openclaw-worktrees/pr-91225" PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false corepack [email protected] --dir "/media/vdc/code/ai/aispace/openclaw-worktrees/pr-91225" exec tsx "/media/vdc/code/ai/aispace/openclaw-pr-91225-evidence/latest-head-diary-context-proof.ts" 2>&1 | tee "/media/vdc/code/ai/aispace/openclaw-pr-91225-evidence/latest-head-diary-context-proof.log"
PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false corepack [email protected] --dir "/media/vdc/code/ai/aispace/openclaw-worktrees/pr-91225" exec vitest run extensions/memory-core/src/dreaming-narrative.test.ts --hookTimeout 300000 --testTimeout 300000 2>&1 | tee "/media/vdc/code/ai/aispace/openclaw-pr-91225-evidence/latest-head-focused-vitest.log"
  • Evidence after fix:
{
  "head": "1eb48a6c6c311e2ba8325b0f7343a6ca3ebc5786",
  "proofScope": "real local filesystem permissions through production memory-core diary context and DREAMS.md update helpers",
  "readableContext": {
    "returnedEntries": 1,
    "firstEntry": "The old routing memory stayed available for the next light sweep."
  },
  "unreadableOptionalContext": {
    "chmod": "000",
    "returnedEntries": 0,
    "lightDreamingContextContinuesAsEmptyHistory": true
  },
  "strictWritePath": {
    "chmod": "000",
    "rejectedCode": "EACCES",
    "writePathStillStrict": true
  }
}
RUN  v4.1.7 /media/vdc/code/ai/aispace/openclaw-worktrees/pr-91225

Test Files  1 passed (1)
     Tests  58 passed (58)
Duration  7.18s

Existing broader source-runtime proof from the earlier revision also showed the original diary-repeat fix: with light.limit=1, the old limit-first ranking selected the already-written first-day snippet with recallCount=4; after the patch, the production light sweep selected the later routing snippet as the memory fragment, kept the first-day text only as recent diary context, wrote the fresh candidate into the light block, and appended a new diary entry while preserving the existing first-day entry as history.

  • Observed result after fix: Readable diary history is still returned for prompt continuity. When DREAMS.md exists but is unreadable on the local filesystem, readRecentDreamDiaryEntries() returns empty history instead of throwing, so light dreaming can continue. The same unreadable file still causes the managed write path to reject with EACCES, proving the optional prompt-context fallback did not loosen updateDreamsFile() safety.
  • What was not tested: No long-running HTTP gateway listener, external provider/model prose-quality run, desktop/mobile environment, external channel, live transport, Windows ACL, WSL ownership, or Docker bind-mount ownership behavior was exercised. The latest proof is Linux/source-level and local-filesystem-level only.

Main sync conflict verification

  • Conflict addressed: origin/main moved DREAMS.md path and locking helpers into dreaming-dreams-file.ts; this update keeps readRecentDreamDiaryEntries() on that source-of-truth by importing resolveDreamsPath() and readDreamsFile() instead of reintroducing private path/file helpers.
  • Latest synced base: the branch was rebased onto current main before the latest follow-up fix; the current local PR head is 1eb48a6c6c311e2ba8325b0f7343a6ca3ebc5786.
  • Observed result: focused memory-core narrative tests pass at latest head: Test Files 1 passed (1); Tests 58 passed (58).

Review findings addressed

  • RF-001: The earlier ClawSweeper/Codex review did not complete and did not provide a source-level close action. This update refreshes the PR with current-head local proof and keeps the remaining decision to the next ClawSweeper/maintainer review rather than treating the incomplete bot run as a code finding.
  • RF-002: The earlier ClawSweeper/Codex review did not complete and did not make a work-lane recommendation. The PR now supplies current-head focused tests and real local filesystem proof for the latest reviewer finding so the next review has concrete evidence to evaluate.
  • RF-003: Addressed the reviewer finding from sallyom: unreadable optional DREAMS.md history now degrades to empty recent diary context for light dreaming, while the strict managed DREAMS.md write path remains unchanged and still rejects unreadable files.
  • Earlier security-boundary follow-up: The recent diary prompt-context read uses the shared DREAMS.md helper and safe file-read boundary; symlinked and non-file DREAMS.md paths return empty recent diary context before target contents can reach buildNarrativePrompt().
  • Earlier original-behavior follow-up: The light-dreaming selection fix is still covered by the existing production-path proof and regression tests for diary-history-aware snippet selection.

Regression Test Plan

  • Target test file: extensions/memory-core/src/dreaming-narrative.test.ts, extensions/memory-core/src/dreaming-phases.test.ts, extensions/memory-core/src/short-term-promotion.test.ts.
  • Scenario locked in: a real short-term recall store contains a high-count first-day snippet and a lower-count newer snippet, DREAMS.md already contains the first-day snippet, and a light dreaming sweep with limit=1 sends the newer snippet to the narrative prompt while keeping the first-day text only as diary history. The latest follow-up adds coverage that unreadable DREAMS.md prompt context resolves to empty history.
  • Why this is the smallest reliable guardrail: the tests and local proof cover the owner selection boundary, prompt context boundary, real DREAMS.md read path, unreadable optional context, and unchanged strict write path without changing config/schema or relying on provider-specific prose output.

Merge risk

  • Risk labels considered: session-state; security-boundary; compatibility; availability.
  • Risk explanation: session-state applies because this changes which short-term memory snippets are staged into Dream Diary entries. Security-boundary applies because local DREAMS.md file shape and readability determine whether text may enter prompt context. Availability applies because unreadable optional diary history should not abort light dreaming. Compatibility risk is low because public config, file markers, store schema, plugin SDK API, provider routing, and append/dedupe commands are unchanged.
  • Why acceptable: the latest follow-up catches read/permission/safe-read failures only inside readRecentDreamDiaryEntries(), where diary history is optional context. It does not change readDreamsFile() globally and does not relax updateDreamsFile(); proof shows the write path still rejects an unreadable DREAMS.md with EACCES.
  • Out-of-scope boundary: this PR does not delete existing diary content, does not add semantic duplicate removal to appendNarrativeEntry(), does not change external provider/model behavior, does not migrate DREAMS.md or short-term recall state, does not change public dreaming defaults, and does not relax managed write safety checks.

Root Cause

  • Root cause: the original failing chain was in the light dreaming source-of-truth boundary: runLightDreaming() sorted live short-term recall entries by lastRecalledAt and recallCount, sliced to the phase limit, and only then generated the diary prompt. Because Dream Diary had no feedback into that selection step, an early first-day memory that was repeatedly recalled could keep winning the limited input slot even after DREAMS.md already contained that same memory. The latest reviewer finding exposed a separate optional-context availability boundary: readRecentDreamDiaryEntries() could let an unreadable DREAMS.md abort light dreaming even though diary history is only prompt continuity context.
  • Why this is root-cause fix: the selection fix moves the freshness decision to the source-of-truth phase selection boundary, before the limited snippet set is written and before the narrative prompt is built. The latest follow-up fixes the optional-context boundary at the only call site that needs degradation: readRecentDreamDiaryEntries() catches read/permission/safe-read failures and returns empty history, while leaving managed writes strict.
  • Architecture / source-of-truth check: the source-of-truth owner is extensions/memory-core/src/dreaming-phases.ts for light snippet selection, extensions/memory-core/src/dreaming-narrative.ts for prompt/DREAMS.md context, and extensions/memory-core/src/dreaming-dreams-file.ts for shared DREAMS.md path/read/write safety. Public contract scope is narrow: no SDK/API/config/protocol/schema/default migration changed.

@openclaw-barnacle openclaw-barnacle Bot added extensions: memory-core Extension: memory-core size: M proof: supplied External PR includes structured after-fix real behavior proof. labels Jun 7, 2026
@clawsweeper

clawsweeper Bot commented Jun 7, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed June 12, 2026, 12:00 PM ET / 16:00 UTC.

Summary
The PR expands the light-dream candidate pool, deprioritizes snippets represented in recent Dream Diary entries, adds date and recent-diary context to narrative prompts, and makes optional diary-context reads fail open without relaxing managed writes.

PR surface: Source +168, Tests +200. Total +368 across 5 files.

Reproducibility: yes. The current-main limit-first ranking is a deterministic reproduction path, and the supplied controlled production-path proof shows the high-recall first-day snippet winning before the patch and a later snippet winning afterward.

Review metrics: none identified.

Stored data model
Persistent data-model change detected: serialized state: extensions/memory-core/src/dreaming-dreams-file.ts, serialized state: extensions/memory-core/src/dreaming-phases.test.ts, unknown-data-model-change: extensions/memory-core/src/dreaming-dreams-file.ts, unknown-data-model-change: extensions/memory-core/src/dreaming-narrative.test.ts, unknown-data-model-change: extensions/memory-core/src/dreaming-narrative.ts, unknown-data-model-change: extensions/memory-core/src/dreaming-phases.test.ts, and 6 more. Confirm migration or upgrade compatibility proof before merge.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🦞 diamond lobster
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • none.

Risk before merge

  • [P1] Merging intentionally changes which short-term recall entries are staged and then persisted into Dream Diary entries; green CI cannot decide whether the chosen recent-diary similarity policy is the desired long-term memory product behavior.

Maintainer options:

  1. Land after memory-core owner confirmation (recommended)
    Accept the bounded session-state change once an area owner confirms that recent diary coverage should deprioritize otherwise highly ranked recall entries.
  2. Refine the coverage policy before merge
    Adjust the threshold, history window, or matching rule only if owner review identifies a realistic case where unrelated memories would be incorrectly deprioritized.

Next step before merge

  • [P2] The patch has no concrete repair finding; the next action is memory-core owner review of the intentional persistent selection-policy change.

Security
Cleared: The diff reuses the existing safe regular-file API, keeps managed writes strict, and introduces no dependency, workflow, secret, permission, or supply-chain expansion.

Review details

Best possible solution:

Land this bounded memory-core fix after an area owner confirms the diary-coverage ranking policy; keep selection before the phase limit, optional context fail-open, and managed writes strict.

Do we have a high-confidence way to reproduce the issue?

Yes. The current-main limit-first ranking is a deterministic reproduction path, and the supplied controlled production-path proof shows the high-recall first-day snippet winning before the patch and a later snippet winning afterward.

Is this the best way to solve the issue?

Yes. The narrowest maintainable fix is to incorporate recent diary coverage at the light-dream selection owner boundary before the configured limit, while keeping prompt continuity and optional file-read degradation in their existing owners.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 8673c65c6bad.

Label changes

Label changes:

  • add proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix production-path output for the diary-selection bug and real Linux filesystem proof that optional reads degrade to empty context while strict writes still reject unreadable files.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix production-path output for the diary-selection bug and real Linux filesystem proof that optional reads degrade to empty context while strict writes still reject unreadable files.
  • remove rating: 🌊 off-meta tidepool: Current PR rating is rating: 🐚 platinum hermit, so this older rating label is no longer current.

Label justifications:

  • P2: This fixes a recurring but bounded Dream Diary content bug without causing a core outage or message-delivery failure.
  • merge-risk: 🚨 session-state: The new ranking directly changes which recalled memories are staged and persisted into Dream Diary state.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body provides after-fix production-path output for the diary-selection bug and real Linux filesystem proof that optional reads degrade to empty context while strict writes still reject unreadable files.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body provides after-fix production-path output for the diary-selection bug and real Linux filesystem proof that optional reads degrade to empty context while strict writes still reject unreadable files.
Evidence reviewed

PR surface:

Source +168, Tests +200. Total +368 across 5 files.

View PR surface stats
Area Files Added Removed Net
Source 3 176 8 +168
Tests 2 200 0 +200
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 5 376 8 +368

What I checked:

Likely related people:

  • abnershang: Current-file blame ties the Dream Diary narrative builder and surrounding memory-core dreaming implementation to the subsystem introduction commit. (role: introduced behavior; confidence: high; commits: 287b10a89507; files: extensions/memory-core/src/dreaming-narrative.ts, extensions/memory-core/src/dreaming-phases.ts, extensions/memory-core/src/dreaming-dreams-file.ts)
  • steipete: Git shortlog shows the largest number of subsequent commits touching the three central dreaming files, making this a strong routing candidate for current behavior review. (role: recent area contributor; confidence: medium; files: extensions/memory-core/src/dreaming-phases.ts, extensions/memory-core/src/dreaming-narrative.ts, extensions/memory-core/src/dreaming-dreams-file.ts)
  • Vincent Koc: Git shortlog shows repeated merged-history work on the central memory-core dreaming files, including current release-line integration around this subsystem. (role: recent area contributor; confidence: medium; commits: 8c802aa68351; files: extensions/memory-core/src/dreaming-phases.ts, extensions/memory-core/src/dreaming-narrative.ts, extensions/memory-core/src/dreaming-dreams-file.ts)
  • Vignesh Natarajan: Git shortlog shows multiple changes across the same dreaming modules, indicating relevant feature-history familiarity. (role: adjacent owner; confidence: medium; files: extensions/memory-core/src/dreaming-phases.ts, extensions/memory-core/src/dreaming-narrative.ts, extensions/memory-core/src/dreaming-dreams-file.ts)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

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 keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal backlog priority with limited blast radius. labels Jun 7, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 9, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 9, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 11, 2026
@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Jun 11, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 11, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 11, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 11, 2026
@clawsweeper clawsweeper Bot added the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 11, 2026
@sallyom

sallyom commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

One actionable finding from my local review before it goes to memory-core owner review: readRecentDreamDiaryEntries() now reads DREAMS.md on the required light-dreaming path. If that file exists but is unreadable, for example due to EACCES, EPERM, ACLs, WSL/Docker ownership, or another safe-read error, the whole light sweep can abort before staging/reporting. Since diary history is optional context, unreadable diary context should degrade to empty history rather than block light dreaming.

@clawsweeper clawsweeper Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 11, 2026
@clawsweeper clawsweeper Bot added rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. and removed rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. labels Jun 11, 2026
@mushuiyu886

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event repository_dispatch).
Result: the existing ClawSweeper review comment will be edited in place when the review finishes.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🌊 off-meta tidepool PR readiness rating does not apply to this item. labels Jun 12, 2026
@steipete steipete self-assigned this Jun 15, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the proof: sufficient ClawSweeper judged the real behavior proof convincing. label Jun 15, 2026
@steipete

Copy link
Copy Markdown
Contributor

Land-ready maintainer pass complete.

What changed:

  • Kept the contributor's diary-context and regular-file safety work.
  • Removed the arbitrary 3x preselection window. Light dreaming now prioritizes freshness across the full short-term recall store, which is already bounded to 512 normalized entries.
  • Strengthened the regression so four diary-covered memories rank ahead of a fresh fifth entry; the fresh entry must still be selected.

Verification:

  • pnpm format -- extensions/memory-core/src/dreaming-phases.ts extensions/memory-core/src/dreaming-phases.test.ts
  • pnpm test extensions/memory-core/src/dreaming-phases.test.ts extensions/memory-core/src/dreaming-narrative.test.ts (105 tests passed)
  • pnpm changed:lanes --json (memory-core extension lanes)
  • Fresh autoreview --mode local --base origin/main: clean, no actionable findings, confidence 0.94
  • GitHub CI for 62db365eabd7ba03193ada7f72e4e9793322638c: 150 non-routine checks completed successfully; merge state clean

Known proof gap: the pre-push remote check:changed fallback was blocked by runner tooling/checkout setup before repository validation. Post-push GitHub CI completed the full generated matrix successfully.

Best-fix judgment: yes. The bounded full-store stable partition removes the starvation case completely instead of tuning another candidate multiplier, while preserving the existing ranking order within fresh and diary-covered groups.

@steipete
steipete merged commit 04875ef into openclaw:main Jun 15, 2026
156 of 157 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Jun 15, 2026
Prevent repeated first-day Dream Diary narratives by prioritizing fresh recall snippets across the bounded short-term store and adding recent diary context to narrative generation. Keep diary reads best-effort and reject symlink/non-file inputs.

Fixes openclaw#83830.

Thanks @mushuiyu886.

Co-authored-by: 杨浩宇0668001029 <[email protected]>
wangmiao0668000666 pushed a commit to wangmiao0668000666/openclaw that referenced this pull request Jun 17, 2026
Prevent repeated first-day Dream Diary narratives by prioritizing fresh recall snippets across the bounded short-term store and adding recent diary context to narrative generation. Keep diary reads best-effort and reject symlink/non-file inputs.

Fixes openclaw#83830.

Thanks @mushuiyu886.

Co-authored-by: 杨浩宇0668001029 <[email protected]>
crh-code pushed a commit to crh-code/openclaw that referenced this pull request Jun 18, 2026
Prevent repeated first-day Dream Diary narratives by prioritizing fresh recall snippets across the bounded short-term store and adding recent diary context to narrative generation. Keep diary reads best-effort and reject symlink/non-file inputs.

Fixes openclaw#83830.

Thanks @mushuiyu886.

Co-authored-by: 杨浩宇0668001029 <[email protected]>
badgerbees pushed a commit to badgerbees/openclaw that referenced this pull request Jul 8, 2026
Prevent repeated first-day Dream Diary narratives by prioritizing fresh recall snippets across the bounded short-term store and adding recent diary context to narrative generation. Keep diary reads best-effort and reject symlink/non-file inputs.

Fixes openclaw#83830.

Thanks @mushuiyu886.

Co-authored-by: 杨浩宇0668001029 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

extensions: memory-core Extension: memory-core merge-risk: 🚨 session-state 🚨 May lose, corrupt, stale, or mis-associate session, agent, or context state. P2 Normal backlog priority with limited blast radius. proof: supplied External PR includes structured after-fix real behavior proof. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: M status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Dreaming diary repeats "first day" narrative every sweep — same early memories dominate snippets

3 participants