THE FOLD / RESPAWN / SECOND WIND / THE BUILD CACHE
THE BUILD CACHE
it stores a claim about what a build depends on
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A build cache is a lookup keyed on everything that affects the answer. Leave something out and it returns the wrong artifact. Put something extra in and it never returns anything.
LIT verified live. 200 builds over three keys. The correct key — source, flags, toolchain — gives 155 hits, 77.5%, and 0 wrong. Dropping the toolchain gives 176 hits, more than correct, of which 90 are wrong artifacts served as if fresh. Adding the hostname gives 9 hits, 4.5%, and 191 cache entries for 200 builds.
LIT verified live. 200 builds over three keys. The correct key — source, flags, toolchain — gives 155 hits, 77.5%, and 0 wrong. Dropping the toolchain gives 176 hits, more than correct, of which 90 are wrong artifacts served as if fresh. Adding the hostname gives 9 hits, 4.5%, and 191 cache entries for 200 builds.
2 HOW IT WAS WEAVED · AI + HUMAN
Bazel, ccache and Nix all live or die on this: the key is the definition of “the same build”, and it is the only thing that is.
AVAN (AI) put the too-coarse key’s hit rate above the correct one on purpose. 176 beats 155, and a dashboard reporting cache hit rate would show the broken configuration winning. The failure is invisible in the metric you would naturally watch.
AVAN (AI) put the too-coarse key’s hit rate above the correct one on purpose. 176 beats 155, and a dashboard reporting cache hit rate would show the broken configuration winning. The failure is invisible in the metric you would naturally watch.
3 ONE DIMENSION
Three keys, and what each one returns.
4 TWO DIMENSIONS · INTERACTIVE
Add and remove fields from the key.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: a key that is the whole definition.
AVAN’s addition (the inverse-companion): the forward reading is that the cache key must include everything that affects the output. The inverse is that nobody knows what that is. The key is a hypothesis about which parts of the world matter, written by someone who cannot enumerate the world; every wrong hit is that hypothesis being falsified silently, months later, in a way that looks like a compiler bug. Read backwards, a build cache does not store builds — it stores a claim about what a build depends on, and serves that claim as an artifact.
LIT 200 builds over three keys give the correct key - source, flags, toolchain - 155 hits at 77.5% with 0 wrong, while dropping the toolchain gives 176 hits, MORE than correct, of which 90 are wrong artifacts served as if fresh, and adding the hostname gives 9 hits at 4.5% across 191 cache entries
FIG Bazel, ccache and Nix all live or die on this: the key is the definition of the same build, and it is the only thing that is. AVAN put the too-coarse key's hit rate ABOVE the correct one on purpose. 176 beats 155, and a dashboard reporting cache hit rate would show the broken configuration winning - the failure is invisible in the metric you would naturally watch.
FIG Bazel, ccache and Nix all live or die on this: the key is the definition of the same build, and it is the only thing that is. AVAN put the too-coarse key's hit rate ABOVE the correct one on purpose. 176 beats 155, and a dashboard reporting cache hit rate would show the broken configuration winning - the failure is invisible in the metric you would naturally watch.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of SECOND WIND · David Lee Wise (ROOT0), with AVAN