No description
Find a file
ProofOfConcept c7e7cfb7af store: always replay from capnp log, remove stale cache optimization
The mtime-based cache (state.bin) was causing data loss under
concurrent writes. Multiple processes (dream loop journal writes,
link audit agents, journal enrichment agents) would each:
1. Load state.bin (stale - missing other processes' recent writes)
2. Make their own changes
3. Save state.bin, overwriting entries from other processes

This caused 48 nodes to be lost from tonight's dream session -
entries were in the append-only capnp log but invisible to the
index because a later writer's state.bin overwrote the version
that contained them.

Fix: always replay from the capnp log (the source of truth).
Cost: ~10ms extra at 2K nodes (36ms vs 26ms). The cache saved
10ms but introduced a correctness bug that lost real data.

The append-only log design was correct - the cache layer violated
its invariant by allowing stale reads to silently discard writes.
2026-03-01 05:46:35 -05:00
prompts show suggested link targets in agent prompts 2026-03-01 00:37:03 -05:00
schema add position field to capnp schema 2026-02-28 23:15:10 -05:00
scripts delete superseded Python scripts 2026-03-01 00:13:03 -05:00
src store: always replay from capnp log, remove stale cache optimization 2026-03-01 05:46:35 -05:00
.gitignore poc-memory v0.4.0: graph-structured memory with consolidation pipeline 2026-02-28 22:17:00 -05:00
build.rs poc-memory v0.4.0: graph-structured memory with consolidation pipeline 2026-02-28 22:17:00 -05:00
Cargo.lock digest: native Rust implementation replacing Python scripts 2026-02-28 23:58:05 -05:00
Cargo.toml remove unused rand dependency (uuid uses getrandom directly) 2026-02-28 23:51:59 -05:00