Module ledger

Module ledger 

Source
Expand description

2026-09-26: Reading, appending and materialising a journey file.

Owner: metrale-governance. Invariants:

  • append only appends; it never truncates or rewrites a file.
  • read_all returns every non-blank line or an error; it never drops a line it cannot parse.

Structs§

Journey
2026-09-26: The events of one journey file, in file order.

Functions§

append
2026-09-26: Append one event as a JSON line, creating the file and its parent directories if needed. Callers pass path_for, one file per pull request.
materialize
2026-09-26: Build an in-memory graph from a journey: one node per distinct head sha plus one per event, and an observed edge from each commit node to each of its events. Nothing is written to disk.
path_for
2026-09-26: <root>/governance/pr-<pr>.jsonl.
read_all
2026-09-26: Read a journey, skipping blank lines. Does not deduplicate.