Skip to main content

Module lock

Module lock 

Source
Expand description

The lockfile: a snapshot of node content hashes and per-node outbound edge target hashes, keyed by path. Lock is infrastructure, not a graph — the graph carries current observations only; drft check joins this snapshot to derive staleness.

The on-disk form (drft.lock) is deterministic TOML with no timestamps and no version field. A parse failure warns and points at drft lock rather than failing the command.

Structs§

Lock
The locked snapshot, keyed by path.
LockedNode
A locked node: its content hash and the target hash of each outbound edge at lock time.

Functions§

read
Read drft.lock from root. Returns Ok(None) when the file is absent or cannot be parsed (a parse failure warns and points at drft lock).
write
Write drft.lock atomically (temp file + rename).