fix(memory-core): keep daily ingestion outside session repair#93389
Conversation
|
Codex review: needs maintainer review before merge. Reviewed July 6, 2026, 12:56 PM ET / 16:56 UTC. Summary PR surface: Source +8, Tests +57. Total +65 across 2 files. Reproducibility: yes. source-reproducible: current main audits Review metrics: 1 noteworthy metric.
Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. 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
Maintainer decision needed
Security Review detailsBest possible solution: Land the narrow repair if maintainers accept that explicit dreaming artifact repair should reset every audited ingestion namespace; otherwise request a repair shape that preserves daily bookkeeping separately. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: current main audits Is this the best way to solve the issue? Yes, the implementation is the narrowest maintainable code fix if maintainers accept the repair semantic: it updates the existing clear helper and pins the audit/repair symmetry with focused tests. The only safer alternative is a maintainer-directed repair split that intentionally preserves daily bookkeeping. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 06789ca4c2ed. Label changesLabel justifications:
Evidence reviewedPR surface: Source +8, Tests +57. Total +65 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
Review history (8 earlier review cycles)
|
|
@clawsweeper re-review |
|
🦞👀 Command router queued. I will update this comment with the next step. |
|
@clawsweeper re-review Added real-behavior proof crossing the real SQLite boundary (addressing Behavior addressed: Real environment: local worktree, Node v22, Evidence after fix: Negative control (temporarily removing the 4-line fix, then restored): post-repair readback stays 3 — proving the namespace clear is exactly this change. What was not tested: no full dreaming scheduler run; the change is the deterministic repair write-path, driven directly via the real exported function against a real SQLite store. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
28a07b2 to
7416b2a
Compare
|
@clawsweeper re-review — Added a Real behavior proof section: it drives the real |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Rebased onto latest Focused validation passed locally after rebase:
|
ab34a08 to
da6323a
Compare
084b35d to
5597b57
Compare
5597b57 to
d7fb117
Compare
|
Land-ready maintainer pass complete at exact head Repair performed:
Proof:
Known gaps: none for the session-repair owner boundary. |
d7fb117 to
0736760
Compare
…repair repairDreamingArtifacts() cleared the dreaming-session-ingestion-files and dreaming-session-ingestion-seen namespaces but not the migrated dreaming-daily-ingestion namespace. After openclaw#92020 taught auditDreamingArtifacts() to treat all three ingestion namespaces as ingestion state, the repair path became asymmetric: the memory status --fix re-audit still reported sessionIngestionExists=true from the surviving daily rows, and the daily ingestion bookkeeping leaked past repair so daily memory files were not re-ingested on the next sweep. Clear DREAMING_DAILY_INGESTION_NAMESPACE alongside the session files/seen namespaces so repair fully resets dreaming ingestion state, matching the audit.
Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Alix-007 <[email protected]>
0736760 to
1e2d7d3
Compare
|
Merged via squash.
|
…aw#93389) * fix(memory-core): clear daily-ingestion sqlite namespace on dreaming repair repairDreamingArtifacts() cleared the dreaming-session-ingestion-files and dreaming-session-ingestion-seen namespaces but not the migrated dreaming-daily-ingestion namespace. After openclaw#92020 taught auditDreamingArtifacts() to treat all three ingestion namespaces as ingestion state, the repair path became asymmetric: the memory status --fix re-audit still reported sessionIngestionExists=true from the surviving daily rows, and the daily ingestion bookkeeping leaked past repair so daily memory files were not re-ingested on the next sweep. Clear DREAMING_DAILY_INGESTION_NAMESPACE alongside the session files/seen namespaces so repair fully resets dreaming ingestion state, matching the audit. * chore: retrigger CI for real behavior proof check * fix(memory-core): keep daily ingestion outside session repair Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Alix-007 <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
…aw#93389) * fix(memory-core): clear daily-ingestion sqlite namespace on dreaming repair repairDreamingArtifacts() cleared the dreaming-session-ingestion-files and dreaming-session-ingestion-seen namespaces but not the migrated dreaming-daily-ingestion namespace. After openclaw#92020 taught auditDreamingArtifacts() to treat all three ingestion namespaces as ingestion state, the repair path became asymmetric: the memory status --fix re-audit still reported sessionIngestionExists=true from the surviving daily rows, and the daily ingestion bookkeeping leaked past repair so daily memory files were not re-ingested on the next sweep. Clear DREAMING_DAILY_INGESTION_NAMESPACE alongside the session files/seen namespaces so repair fully resets dreaming ingestion state, matching the audit. * chore: retrigger CI for real behavior proof check * fix(memory-core): keep daily ingestion outside session repair Co-authored-by: Vincent Koc <[email protected]> Co-authored-by: Alix-007 <[email protected]> --------- Co-authored-by: Peter Steinberger <[email protected]> Co-authored-by: Vincent Koc <[email protected]>
What Problem This Solves
The dreaming repair audit mixed two independent bookkeeping domains: session-corpus ingestion and daily-memory ingestion. This made daily-only state look like stale session ingestion and encouraged session repair to delete healthy daily-memory bookkeeping.
This corrects the boundary related to #92017 and #92020 without broadening destructive repair behavior.
Why This Change Was Made
The original PR direction was reversed after reading the full dreaming pipeline and repair callers.
sessionIngestionExistsnow reflects only the session-files and seen-session namespaces. Session repair clears those namespaces while preservingdreaming-daily-ingestion, whose lifecycle belongs to daily-memory ingestion.User Impact
openclaw memory status --fixno longer reports daily-only bookkeeping as session-corpus state and no longer discards healthy daily ingestion records during explicit session repair.Evidence
tbx_01kww7ned9gavfc1rtwaghsm8y: all 8 focused dreaming-repair tests passed against the real SQLite-backed plugin-state store.pnpm check:changedpassed.Credit: @Alix-007 surfaced and authored the original repair; @vincentkoc provided the corrected session-scope direction.
AI-assisted: yes. Maintainer repair, full owner/caller/sibling review, regression proof, and final validation were performed before landing.