T-019: Lineage log and genome store
Goal
Record who was born to whom, so species can be measured afterwards without the sim ever
storing a species. See docs/DESIGN.md section 10.
Scope
- An append-only event log in the run folder: births (id, parents, step, place, genome hash) and deaths (id, step, place, cause, lifetime energy sources).
- A genome store keyed by content hash, each genome saved once.
- Periodic census records: counts, biomass and energy sources by region.
- Compact, streamable, and readable from the browser as well as natively.
- Logging must cost little. Measure it.
- A reader API in
crates/analysis.
Done when
- ☐ A long run's log can rebuild the full family tree of any living organism.
- ☐ Logging slows the run by less than 5%, measured.
- ☐ Format documented in
docs/RUNS.md.
Added 2026-12-02: where the runner expects you (from T-012)
drain_world_logsincrates/runner/src/run.rsis the empty hook where the world's birth and death records leave the sim each step. Fill it in.- Open the lineage log with
Logs::open, so it is cut back to the right length when a run resumes from a checkpoint. A resumed run must write byte-identical logs to one that never stopped. The runner's tests show how to check that, including a realkill -9. - The run folder already has an empty
lineage/for you.docs/RUNS.mdexplains the layout and the rules for adding to it.