Expand description
Per-memory revision chain (V8 S11c) — tamper-evident content history.
Every memory.update that changes content appends one revision entry
to the revisions DBI, keyed rev:{galaxy}:{memory_id}:{seq}. The
chain is self-verifying by construction:
seqis continuous (gaps prove deletion);entry[n].new_hash == entry[n+1].old_hash(breaks prove splicing);- the last
new_hashmust equal the memory’s currentcontent_hash(mismatch proves an out-of-band rewrite).
Entries carry hashes, not full content — cheap local tamper-evidence
(recovery of old text rides wm backup). The chain hashes nothing of
its own; it needs no keys and no crypto infrastructure, and it detects
the exact rewrite class the write-audit journal cannot see: edits that
are declared, journaled, and still leave no record of what was there
before.
Structs§
- Memory
Revision - One content revision of a memory — appended on every content change.
- Revision
Actor - Who performed a revision — snapshotted from the dispatch context.
- Revision
Chain Report - Result of walking one memory’s revision chain.
Functions§
- revision_
key - LMDB key for one revision:
rev:{galaxy}:{memory_id}:{seq:010}. Zero-padded seq keeps lexicographic order == numeric order. - revision_
prefix - Key prefix covering every revision of one memory (for range scans).
- verify_
chain - Verify a revision chain against the memory’s current content hash.