By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Measure whether the fact layer is earning its keep It is not, at this size, and the numbers say so three ways. Facts are larger than the source they summarise: 1.22x to 1.88x across four nix-ci packages. levels.md named that exact threshold in advance and said crossing it means the serialisation is carrying the AST rather than a designed summary. Half of a fact file is spans, and a quarter of it is one path. nix-ci-leader's facts hold 8,345 spans over 248 distinct files, and every span inside a module writes out that module's own path again. That is 520 KB of 2,205 KB, and it is also a representable disagreement: nothing stops a span in one module's facts from naming another module's file. The unit of caching costs more to produce than the whole uncached job. Checking all of nix-ci in one process takes 4.1 seconds. Building one package's facts as a derivation takes 5.4, for about a third of the work. Written up in plan/corpus.md with the three things that could follow, since which one is a decision rather than a measurement.