Skip to main content

Module inventory

Module inventory 

Source
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§

InventoryFile
Per-repo inventory file serialised to JSON.
InventoryStore
Thin wrapper around the inventory directory.
LoopMemo
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.