Skip to the content.

MEMORY-DREAM-CLEANUP-RESULTS - offline cleanup for finished context

Companion to RECALL-RESULTS.md and CDB-RESULTS.md. Those lanes made a finished session durable and debuggable as a core image. This lane adds the “human dream” pass: while the session is asleep, the kernel re-checks and tidies its memory image without replaying the transcript or asking a model to summarize it.

The claim

A finished session can be auto-cleaned as a page-table-over-CAS image: re-screen resident pages against today’s gate, strand pages whose external witness was later refuted, repair sealed descriptors from metadata only, surface duplicate page aliases, and prune unreferenced swap bytes. The cleaned image still loads through recall.Load, so later page-ins keep the same witness gate and fresh content re-screen.

This leans into FAK-specific features:

What shipped

fak dream --dir cdb-image --out-dir dream-image --out dream-report.json
fak dream --dry-run --dir cdb-image

If --dir does not exist, the command seeds a deterministic demo image with a duplicate benign page, one page admitted under a witness that is then revoked, and one already-sealed injection page.

Witnesses

Honest residue

This is deterministic memory hygiene, not generated consolidation. It does not write model summaries, merge semantic memories, or improve the detector itself. Its value is that the cleaned output is a smaller and safer core image under the same mechanical trust gate. A future higher-level “dream” tier can add extractive decision summaries, but those summaries must themselves be admitted as pages and re-screened like any other result.