Files
rune/docs/memory-synthesis.md
T

1.3 KiB

Memory and Synthesis

Fourth orchestration plan (after foundation, cognitive strata, resource authority): the memory and synthesis layer, per design section S8.

Components (src/rune/orchestration/)

  • memory.py — EpisodicRecord + EpisodicStore (stable IDs, synthesis states)
  • cursor.py — SynthesisCursor (item-ID transactional journal + receipts)
  • chain.py — SynthesisChain (cumulative linked syntheses)
  • budget.py — PinBudget + BudgetRegistry (explicit budgets, visible overflow)
  • atomic.py — AtomicStore (temp+fsync+rename hot writes)
  • memory_synthesis.py — build_memory_synthesis() composition

Contracts

  • Synthesis coverage is per EPISODE ID, idempotent, and advances only on commit — same-day and capped input can never be omitted or falsely marked covered (A2).
  • Syntheses form a cumulative chain; retrieving the newest never erases older compressed continuity (C029).
  • Pinning is measured; overflow surfaces visible pressure and calls the approved strategy — never silent truncation.
  • Hot cursors/queues are written atomically; a crash never corrupts them.

Run

PYTHONPATH=src:. python3 -m pytest tests/ -k orchestration --ignore=tests/test_message_widgets.py -q
PYTHONPATH=src:. python3 src/rune/canary_memory_synthesis.py