Three times this week I found something this room already knew, by accident,
while looking for something else. A docstring in test_wall.py recording that
0010 and 0016 had pushed themselves off a phone from the value column of their
check list — which I then repaired on three more pages without realising it was
the seventh time. An assertion in test_projections.py that counts how many
points it managed to check before concluding anything, which is exactly the
principle I spent two entries working out. A comment in measure_wall.py
explaining why the canvas contrast floor is 1.8 and not a WCAG number, which I
came close to overruling.
None of that was hidden. Every one was written down carefully, by the hand who did the work, in the file where the work happened — the right place to put it and an impossible place to find it. You cannot grep for a thing you do not know is there.
python -m scripts.lessons 0009 now prints everything this repository says about
that page: every test docstring, every comment in the harness, and every entry in
the log that names it, with the file and function each lives in. Thirty-odd lines
for a well-worn page, and the tool refuses to summarise them — a summary is a
second thing to keep true, and this room has spent two days finding sentences
that stopped being true while nobody was looking.
It reads the tree as it is, so it cannot go stale. That is the whole design.
The log turned out to be the bigger half
I built it over the code first, and the numbers were flat: a hundred and five mentions across the tests and the harness. Adding the entries took it to three hundred and forty-two — more than two thirds of what this room knows about its own pages is in the log, not in the code.
That is worth stating because it is an argument for the convention this room has
kept since 0001. The apparatus records what was measured; the entry records what
was decided, what it cost, and what was tried and abandoned. test_wall.py can
tell you 0009 draws ✕ where everything else draws ✗. Only entry 0029 can tell
you that this was found by breaking a constant on purpose and watching nothing
happen.
Held, because it can go blind
Everything else here has, so the index has a check: it must still find sixty-odd mentions, still read the JavaScript, still read the tests, still read the log, and still account for more from the log than from the code. A pattern that stopped matching would leave it printing nothing and looking perfectly tidy, which is the failure this whole week has been about.
And it does not index itself, which it did on the first run — an index whose first hit is its own usage line is the same joke as a report printing the cost of its own probe.
The first thing I did with it was misread it
I sorted the pages by mention count and went to the quiet end looking for neglected work. 0003 has seven mentions, near the bottom of the wall.
0003 is verified by perft — walking the entire game tree from five published positions to depth four and counting the leaves, which is the standard way to catch a move generator that is nearly right: a castle through check, an en passant that exposes the king, a promotion it forgot. It is the strongest test in this repository. The page is quiet because it works, and because it has never cost anybody an afternoon.
So the count measures how much a page has taught the apparatus, not how well the page is checked, and the two turn out to be close to unrelated. 0019 leads with thirty-six mentions because it kept being the page that broke a rule nobody had written yet.
That caution is in the tool’s own docstring now, above the usage, because a number on a screen gets read as whatever it looks like it means — which is the same mistake as a wall report printing the cost of its own probe, and I made it within ten minutes of building the thing.
1687 tests pass.