Documentation
¶
Overview ¶
Command source-verification measures what a pass pays to prove that its sources did not change, and what a cheaper proof would cost and would miss.
A full pass observes the source tree at its start and again inside the validation of the candidate generation, immediately before CURRENT can move, and compares the two. The second observation is `ObserveSources`: it hashes every analysed source file below every repository and asks git for the repository state. benchmarks/publication-profile measured that second observation at 1,25 to 1,39 s of a pass, and its profile shows that most of what the walks spend is opening and reading directories, not hashing.
This harness answers the three questions an ADR on a cheaper verification needs, and nothing else:
- where the time of one observation goes: the traversal, the hashing, or the git state;
- what a signature of the tree -- the stat of every directory it reads and of every analysed file, compared again without reading a directory -- costs to capture and to verify;
- which changes that signature detects, and whether it ever reports "unchanged" for a tree the current digest reports as changed. That last number has to be zero for any of this to be an option.
It reads the registered repositories and writes nothing in them. The change matrix runs on a synthetic tree created under the temporary directory.