fix(memory-core): check SQLite plugin state for dreaming ingestion audit after JSON migration (fixes #92017)#92020
Conversation
…dit after JSON migration (fixes openclaw#92017)
|
Codex review: needs real behavior proof before merge. Reviewed June 10, 2026, 4:49 PM ET / 20:49 UTC. Summary PR surface: Source +25, Tests +39. Total +64 across 2 files. Reproducibility: yes. at source level: v2026.6.5 archives the legacy JSON ingestion files into migrated SQLite state, while current main checks only the missing file before projecting the boolean directly into the deep-status output. Review metrics: none identified. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Keep the plugin-state fallback and focused tests, but map SQLite inspection failures to the existing non-fixable ingestion-unreadable audit issue and verify the final status output on a real migrated workspace. Do we have a high-confidence way to reproduce the issue? Yes at source level: v2026.6.5 archives the legacy JSON ingestion files into migrated SQLite state, while current main checks only the missing file before projecting the boolean directly into the deep-status output. Is this the best way to solve the issue? No, not yet: the SQLite fallback is the narrow owner-correct fix, but its catch-all must preserve the audit’s distinction between absent state and state that could not be inspected. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: reasoning high; reviewed against 8042ec4cb89a. Label changesLabel justifications:
Evidence reviewedPR surface: Source +25, Tests +39. Total +64 across 2 files. View PR surface stats
Acceptance criteria:
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 |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer verification complete.
|
…dit after JSON migration (fixes openclaw#92017) (openclaw#92020) * fix(memory-core): check SQLite plugin state for dreaming ingestion audit after JSON migration (fixes openclaw#92017) * fix: add SQLite-only regression tests for dreaming ingestion audit (fixes openclaw#92017)
…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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
…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.
* 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 #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]>
…dit after JSON migration (fixes openclaw#92017) (openclaw#92020) * fix(memory-core): check SQLite plugin state for dreaming ingestion audit after JSON migration (fixes openclaw#92017) * fix: add SQLite-only regression tests for dreaming ingestion audit (fixes openclaw#92017)
…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]>
Summary
memory-core-dreams-json-to-sqlite),openclaw memory status --deepreportsingestion state absenteven though SQLite namespaces contain thousands of active ingestion rows.auditDreamingArtifacts()inextensions/memory-core/src/dreaming-repair.tsonly checks filesystem presence ofmemory/.dreams/session-ingestion.json. It does not consult the migrated SQLite plugin state namespaces (dreaming-session-ingestion-files,dreaming-session-ingestion-seen,dreaming-daily-ingestion).readMemoryCoreWorkspaceEntries. If any namespace has rows, report ingestion state as present.extensions/memory-core/src/dreaming-repair.ts— add imports and SQLite fallback check (+25 lines)Reproduction
memory-coredreaming enabledsession-ingestion.jsonis archived to.migrateddreaming-session-ingestion-files,dreaming-session-ingestion-seen,dreaming-daily-ingestion)openclaw memory status --deepingestion state absentReal behavior proof
Behavior or issue addressed (92017):
auditDreamingArtifacts()now falls back to SQLite plugin state namespaces when the legacy JSON ingestion file is absent, preventing false-negative "ingestion state absent" reports after migration.Real environment tested: Linux, Node 22 — colocated test suite
Exact steps or command run after this patch:
node scripts/run-vitest.mjs extensions/memory-core/src/dreaming-repair.test.tsEvidence after fix:
Observed result after fix: All 5 existing dreaming-repair tests pass. The SQLite fallback is exercised when the legacy JSON file is absent —
readMemoryCoreWorkspaceEntriesis called against the three ingestion namespaces in priority order, stopping at the first non-empty result.What was not tested: Live
openclaw memory status --deepon a macOS install with migrated SQLite state was not driven; the fix was validated via the colocated unit test suite.Repro confirmation: Before the patch,
auditDreamingArtifactsreturnssessionIngestionExists: falsewhen only SQLite state is present. After the patch, the SQLite fallback setssessionIngestionExists: truewhen any of the three ingestion namespaces contain entries.Risk / Mitigation
readMemoryCoreWorkspaceEntriesthrows if the plugin state store is unavailable.Mitigation: The SQLite check is wrapped in a try/catch that silently falls back to the filesystem-only result, matching the existing pattern for filesystem errors.
memory status --deep.Mitigation: The check short-circuits at the first non-empty namespace. In practice, only one namespace lookup occurs for healthy installs.
Change Type (select all)
Scope (select all touched areas)
Regression Test Plan
node scripts/run-vitest.mjs extensions/memory-core/src/dreaming-repair.test.tsReview Findings Addressed
N/A (initial submission)
Linked Issue/PR
Fixes #92017