THE FOLD / BOSS / THE GAUNTLET / THE CODE COVERAGE
THE CODE COVERAGE
the correct answer to the wrong question
1 WHAT IT IS · WHAT IT DOES · FACT OR FICTION
Coverage counts what ran. A line runs when any path through it runs, so a single test can execute every line of a function while leaving most of its behaviour untried.
LIT verified live. A 4-line function, one test. Statement coverage 100.0% — every line executes. Branch coverage 50.0%: 2 of the 4 condition outcomes are taken, both of them the true side. Of the 4 input combinations, 1 divides by zero. The suite catches 0. A green run at 100% coverage, over code that fails on a quarter of its inputs.
LIT verified live. A 4-line function, one test. Statement coverage 100.0% — every line executes. Branch coverage 50.0%: 2 of the 4 condition outcomes are taken, both of them the true side. Of the 4 input combinations, 1 divides by zero. The suite catches 0. A green run at 100% coverage, over code that fails on a quarter of its inputs.
2 HOW IT WAS WEAVED · AI + HUMAN
Statement coverage is the number that gets reported because it is the one that is easy to reach; branch, condition and path coverage all get harder and all get quieter.
AVAN (AI) built this wrong first. The original construction claimed 100% coverage and measured 75%, because no test in the suite ever reached the buggy line — the headline was simply false as written. Rebuilt on the canonical shape: the fault lives in the branch combination nobody took, and every line still runs.
AVAN (AI) built this wrong first. The original construction claimed 100% coverage and measured 75%, because no test in the suite ever reached the buggy line — the headline was simply false as written. Rebuilt on the canonical shape: the fault lives in the branch combination nobody took, and every line still runs.
3 ONE DIMENSION
Four lines, all green. Four outcomes, two taken.
4 TWO DIMENSIONS · INTERACTIVE
Add tests and watch which number moves.
5 THREE DIMENSIONS + AVAN’S INVERSE
The green forward object: every line lit, one path walked.
AVAN’s addition (the inverse-companion): the forward reading is that coverage overstates how well a suite tests the code. The inverse is that coverage is not a measure of testing at all — it is a measure of reaching. It answers “did this line execute”, which is a true and useful fact, and no version of that question can tell you whether anybody checked the result. Read backwards, the metric is not lying; it is being asked a question it never claimed to answer, and the 100% is the correct answer to the wrong one.
LIT a 4-line function under one test reaches 100.0% statement coverage - every line executes - against 50.0% branch coverage, with 2 of the 4 condition outcomes taken and both of them the true side, while of the 4 input combinations 1 divides by zero and the suite catches 0: a green run at 100% coverage over code that fails on a quarter of its inputs
FIG Statement coverage is the number that gets reported because it is the one that is easy to reach; branch, condition and path coverage all get harder and all get quieter. AVAN built this wrong first - the original claimed 100% coverage and measured 75%, because no test ever reached the buggy line, so the headline was false as written. Rebuilt on the canonical shape: the fault lives in the branch combination nobody took.
FIG Statement coverage is the number that gets reported because it is the one that is easy to reach; branch, condition and path coverage all get harder and all get quieter. AVAN built this wrong first - the original claimed 100% coverage and measured 75%, because no test ever reached the buggy line, so the headline was false as written. Rebuilt on the canonical shape: the fault lives in the branch combination nobody took.
◆ sealed .dlw.fold → folded to ROOT_0 · a sphere of THE GAUNTLET · David Lee Wise (ROOT0), with AVAN