◀ THE FOLD0ROOT.AI // WORLD II · GLITCH · OFF BY ONE◆ .dlw.fold
THE FOLD / GLITCH / OFF BY ONE / THE ZERO THAT COUNTED

THE ZERO THAT COUNTED

a counter that walked the wrong field
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
A counter walked prog.funcs. The code lives in prog.regions. It returned 0 / 0 for every program it was ever given, and looked exactly like a working counter — it ran without error, returned a well-formed result, and reported that there was nothing to count. Zero is the one answer a broken counter and an empty input agree on, and nothing downstream can tell them apart.

LIT verified live over 500 generated programs, all of them non-empty. The counter that walks the wrong field returns zero on 500 of 500; the one that walks the right field returns zero on 0 of 500. A test that only asks “did it return something?” passes both, 500 and 500. A counter that throws when it has walked zero instructions catches the broken walk 500 of 500 times and never fires on the working one.
2 HOW IT WAS WEAVED · AI + HUMAN
David (human) found this in his own code and kept it in the audit rather than quietly fixing it. His note reads: “the first countOps walked prog.funcs. the code lives in prog.REGIONS. it returned 0/0 for every program and looked like a working counter. it now throws if it walks zero instructions rather than reporting a zero.” A second note admits the test accepted nulls and therefore passed on the broken counter — “a check that cannot fail is not a check.” Dropped 5 August 2026.

AVAN (AI) restaged both halves to make the cost countable. The arithmetic in the fixed counter is identical to the broken one — same loop, same increments. The only change is that the empty case is refused instead of reported, and that single line is the whole difference between a counter and a decoration. It is worth being precise about the limit: refusing zero catches a counter that found nothing, not a counter that found the wrong things.
3 ONE DIMENSION
Five hundred programs, and what each counter says about them.
4 TWO DIMENSIONS · INTERACTIVE
One program, three counters, and which of them notices.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: the space of programs, and the counter that sees none of it.
AVAN’s addition (the inverse-companion): the forward reading is “refuse to report a zero.” The inverse is that zero was a perfectly good answer right up until it was the only answer. A counter that returns zero on an empty input is correct; the defect is not the value but its constancy, and constancy is invisible from inside a single call. Read backwards, the fix is not really about zeros at all — it is that a measurement with no variation carries no information, and the cheapest way to notice is to make the degenerate case loud. Any statistic that comes back the same every time should be suspected before it is believed.
LIT over 500 generated programs all of them non-empty, the counter that walks the wrong field returns zero on 500 of 500 while the one that walks the right field returns zero on 0 of 500; a test that only asks 'did it return something' passes BOTH at 500 and 500; and a counter that THROWS when it has walked zero instructions catches the broken walk 500 of 500 times and never fires on the working one

FIG From David's JOTF drop, 2026-08-05. He found this in his own code and kept it in the audit: 'the first countOps walked prog.funcs. the code lives in prog.REGIONS. it returned 0/0 for every program and looked like a working counter. it now throws if it walks zero instructions rather than reporting a zero.' A second note admits the test accepted nulls and therefore passed on the broken counter - 'a check that cannot fail is not a check.' AVAN restaged both halves to make the cost countable: the arithmetic in the fixed counter is IDENTICAL - same loop, same increments - and the only change is that the empty case is refused rather than reported. The limit is worth naming: refusing zero catches a counter that found nothing, not one that found the WRONG things.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of OFF BY ONE · David Lee Wise (ROOT0), with AVAN