Expand description
SHA-validated ahead/behind memo store.
One JSON file per git common-dir lives at
~/.open-loops/inventory/<fnv64hex>.json. The heavy git phase
(rev-list) is memoised per (branch, head_sha, ab_base_sha) pair.
Reads are tolerant; writes are atomic (tmp → rename).
Structs§
- Inventory
File - Per-repo inventory file serialised to JSON.
- Inventory
Store - Thin wrapper around the inventory directory.
- Loop
Memo - One memoised ahead/behind entry for a branch.
Functions§
- common_
dir_ hash - FNV-1a 64-bit hash of the absolute common-dir path, returned as 16 hex chars.
- lookup_
ahead_ behind - Looks up the cached ahead/behind for a branch, validating SHA keys and TTL.