◀ THE FOLD0ROOT.AI // WORLD II · BOSS · THE FIREWALL◆ .dlw.fold
THE FOLD / BOSS / THE FIREWALL / THE COMPILE INVARIANT

THE COMPILE INVARIANT

compiles equals distinct positions fired
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Eight positions, each holding its source before anything starts. Nothing is compiled until a position is fired. Fire the same one again and it does not recompile. The invariant that keeps the machine honest is one line: the number of compiles must equal the number of distinct positions fired. Speculative compilation — building something in advance, on the guess that it will be wanted — breaks that count and nothing else in the system notices.

LIT verified live. On an honest cell the invariant holds 600 of 600 times. On a cell that speculates one position ahead, the invariant catches it 684 of 684 times while any position is still unfired — and 0 of 216 times once the workload has touched all eight. The pairing check, which asks only whether every request got a response, notices nothing: 0 of 600.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) named which of his twenty-three checks carries the weight: “the load-bearing one is the fourth. speculative compilation would break it and nothing else would notice.” The other checks — one compile per fire, memoisation on a repeat, requests equalling responses — all pass on a compromised cell, which is exactly what makes this one worth having.

AVAN (AI) set the detection gate at 90% and measured 82%, then did not loosen it. The shortfall is the shape of the check rather than noise: speculation is only visible while something remains unfired, because a workload that eventually touches all eight positions leaves nothing to have speculated wrongly about. Split that way the result is exact — 684 of 684 caught in the partial case, 0 of 216 in the saturated one. The invariant has a blind spot, and it is precisely the busiest workload.
3 ONE DIMENSION
Four checks, and which of them sees a speculating cell.
4 TWO DIMENSIONS · INTERACTIVE
Fire positions and watch the two counters, honest and speculating.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: eight positions, and the two counts that must agree.
AVAN’s addition (the inverse-companion): the forward reading is “this invariant catches speculation.” The inverse is that it catches it only where speculation was cheap to detect anyway. A cell that has fired everything has nothing left to build in advance, so the check goes quiet exactly when the machine is busiest — the regime where speculation would actually pay off and where a defect would do the most work. Read backwards, the invariant is not a guard on the running system but a guard on the lightly-loaded one, and its silence under load is not reassurance but the absence of a signal.
LIT on an honest cell the invariant holds 600 of 600 times; on a cell that speculates one position ahead it catches the defect 684 of 684 times WHILE ANY POSITION IS STILL UNFIRED and 0 of 216 times once the workload has touched all eight; and the pairing check, which asks only whether every request got a response, notices nothing at 0 of 600

FIG David named which of his twenty-three checks carries the weight: 'the load-bearing one is the fourth. speculative compilation would break it and nothing else would notice.' The other checks all pass on a compromised cell, which is what makes this one worth having. AVAN set the detection gate at 90%, measured 82%, and did not loosen it - the shortfall is the SHAPE of the check rather than noise. Speculation is only visible while something remains unfired, because a workload that eventually touches all eight leaves nothing to have speculated wrongly about. Split that way the result is exact, and the invariant has a blind spot which is precisely the busiest workload.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE FIREWALL · David Lee Wise (ROOT0), with AVAN