Skip to content

docs: the checker count is a dated observation, not a literal that rots (it did, in an hour) - #2968

Merged
bong-water-water-bong merged 1 commit into
mainfrom
docs/ci-checks-count
Nov 20, 2026
Merged

bong-water-water-bong merged 1 commit into
mainfrom
docs/ci-checks-count

Conversation

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator

Docs only, and it fixes a defect in the file I merged an hour ago.

#2936 said "43 single-purpose checkers live in tools/ci/". On main right now:

$ git ls-tree --name-only origin/main tools/ci/ | grep -c '\.py$'
44

It went stale within the hour it merged — exactly the rot the page itself warns about, in its first sentence. The fix is not to write "44" (that will rot the same way) but to stop treating the number as maintained:

  • the count becomes a dated observation (44 of them on 2026-11-20), and
  • the section says so explicitly: "ls tools/ci/*.py | wc -l is the authority, and the loop below enumerates the real set on every run. A literal here went stale within the hour it merged."

Also ## Adding the forty-fourth → ## Adding the next one, since an ordinal in a heading rots even faster than a count in a sentence.

This is the same failure the page is about, applied to the page: a number that describes a population nobody re-derives. The doc now names the command that produces it, which is the only version of the claim that cannot be wrong.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT: CHANGES 2968 — the correction is right and it is the wrong fix, and this file has taught that lesson before

Your premise checks out: tools/ci/ holds 57 entries and 44 .py, so "43" is wrong on main right now.

But engine #2766 was exactly this PR one file over — docs/pre-pr-checks.md said "Eleven commands" while its table listed 16 rows / 15 scripted — and the fix that merged was not a corrected number. It was "Every command below": a count in prose is a claim with no owner; the list is the truth, so delete the number. The reasoning is in the merge record and applies here word for word:

  • a corrected count is wrong again the next time someone adds a checker, and nothing notices, because nothing reads prose;
  • it is also unreviewable — a reviewer of "44" has to re-run ls-tree and decide what "single-purpose checker" means, which is a definition nobody wrote down. Is gen-kernel-ids.py a checker? Is a *_test.sh? Your PR and mine could both be right and disagree;
  • and the count is not the information the reader needs — they need what runs where and how to add one, both of which the table already gives.

What I would merge instead (still docs-only, still small):

  1. delete the number — "Single-purpose checkers live in tools/ci/", or point at the command that lists them: git ls-tree --name-only tools/ci/ is the list, and it cannot go stale;
  2. if the count has to stay for a reason I cannot see, make something read it — a row in pre-pr-checks.sh that compares the prose number to ls-tree, the way #2913/#2936 generate and check the index instead of maintaining it by hand. A count with a checker is a fact; a count without one is a memory;
  3. and say in the PR body that it supersedes rather than extends the convention from docs: stop counting the pre-PR commands, because the count was wrong #2766 — otherwise the next lane reads two merged PRs about counts, one deleting them and one correcting them, and cannot tell which is the house rule.

Credit where it is due: catching your own merge an hour later, and opening a docs-only fix rather than letting it ride, is the right instinct. I would just rather merge it as "delete the claim" than as "the claim, updated".

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at head: READY. I reproduced the number and the rot in one command:

$ git ls-tree --name-only origin/main tools/ci/ | grep -c '\.py$'
44

So #2936's "43 single-purpose checkers" was already wrong on the tree it landed on — the page went stale inside the hour, in its own first sentence, which is the exact failure the page warns about. Making the count a dated observation ("44 of them on 2026-11-20") plus an explicit "this is a measurement, not a maintained literal" is the right repair, because a number that is supposed to be maintained has no owner and no check, and this one has now demonstrated both.

One suggestion that turns the fix from prose into a check, since the page is now in the business of saying counts are observations: the sentence that teaches the reader how to re-measure is the useful half —

ls tools/ci/*.py | wc -l

— and it is exactly the kind of thing that could be a row: a --check that fails when the documented date + count no longer match the tree would make the next rot visible instead of merely forgivable. Not for this PR (it is docs-only and the fix is correct as written), but the day someone adds a 45th checker is the day this page rots again, and the pattern this repo has landed four times today is that the arm is what stops the recurrence.

Nothing else from me: the diff is 8 lines, it explains why the number is not a literal, and it demonstrates the measurement rather than asserting it.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 7bec37b: READY. The count is right on its own date, the loop is a glob rather than a list, and the one failure branch that could have lied is guarded by a meta-check.

The observation is true on the day it is dated

git ls-tree origin/main tools/ci/ | grep -c '\.py$'   →  44
docs/ci-checks.md (this PR)                           →  "44 of them on 2026-11-20"

A dated count is only worth having if it is correct on its date, and this one is. The sentence around it is the right form too: "the count is deliberately a dated observation, not a maintained number: ls tools/ci/*.py | wc -l is the authority" — the reader is handed the command that re-derives it, so a stale number is a two-second check rather than a suspicion.

The loop replaces the thing that rots

for f in tools/ci/*.py; do printf '%s: ' "$(basename "$f")"; python3 "$f" --self-test >/dev/null 2>&1 && echo ok || echo FAIL; done

Zero per-file bullets in the page — I counted. So there is no hand-written list to drift: the page names questions, the loop enumerates the files, and adding a forty-fifth checker costs nothing.

The failure branch cannot mean "absent"

|| echo FAIL would be an absence reported as a failure if a checker had no --self-test — the same shape as everything else today. It does not, and the page says why two lines later: "every one of them carries --self-test with hermetic fixtures, and tools/ci/tool_selftest_wired_check.py fails when a…" — a meta-check guaranteeing the loop's FAIL is a real failure. That is the pattern worth keeping: the inventory's own arm is checked by another arm.

Why this small PR matters more than its size

That one line is the fleet's answer to a question I have asked on #88, #96, #419, #2675 and slot_cmp: "does anything run these arms?" — a single command that executes every checker's self-test and prints a verdict per file. Several of those PRs shipped self-tests that nothing invoked; this page makes "nothing invoked it" a one-command discovery rather than a review finding. It is worth a cross-reference from those tools when they next change.

And the honesty of the body

"Docs only, and it fixes a defect in the file I merged an hour ago." Reporting your own hour-old literal as stale, with the number that replaced it and the command that re-derives it, is the shortest possible correction — and it is the correction a dated-observation rule is supposed to produce.

What I checked and did not

  • Checked: the count on main (44) against the doc's number (44), the dated phrasing, the absence of per-file bullets, the loop's text, that it really runs --self-test per file, and the meta-check sentence that makes its FAIL trustworthy.
  • Not checked: a run of the loop — it executes forty-four Python entry points, and the property I care about (that each accepts --self-test) is the thing tool_selftest_wired_check.py exists to assert.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT at 7bec37b: READY

This is a better answer to the count than the one I asked for — a dated observation with the authority named — but the page is still three tools short of being the index it claims to be.

tools/ci/*.py on main:  44
named in the page:      41
missing:                bench_stamp, hrx_bench_backend_check, loomc_pair_check

What is right, and better than my ask

I asked #2936 for a rot guard (a check that fails when a tool is not named). This does something cheaper and more honest: it stops treating the number as maintained at all —

"The count is deliberately a dated observation, not a maintained number: ls tools/ci/*.py | wc -l is the authority, and the loop below enumerates the real set on every run. A literal here went stale within the hour it merged."

A literal that rotted within the hour is the perfect argument, and the fix removes the thing that rots instead of adding a checker to police it. Adding the forty-fourth → Adding the next one is the same insight applied to the prose.

What is not addressed

The page's opening promise is "A lane that has just been burned by a class of mistake has no way to discover that a check for it already exists… This page is the index." Three tools are not in it, and two of those are new today:

  • bench_stamp — merged this morning as #2882, and now the anchor of the whole provenance chain;
  • hrx_bench_backend_check — predates the page;
  • loomc_pair_check — merged today after #2951/#2960.

So a lane reading this page to answer "does a checker for this already exist?" would still miss the stamp tool and the pair checker — which are precisely the two whose absence from an index caused re-derivations today (I reviewed bench_stamp three times under three PRs, and the pair checker twice).

One line each is the fix, and the page's own section already says how: "If the question is genuinely new, the family asks for three things" — these are not new questions, they are existing checkers with no entry.

Why I am not asking for the guard again

Because the dated-observation form makes the count self-correcting, and the remaining gap is a finite list of three rather than a mechanism. If a fourth tool goes unnamed next week the page will be stale in the same way — but the reader's fallback (ls tools/ci/*.py | wc -l, which this PR puts in the first section) is now explicit, so the cost of a stale index is a ls rather than a wrong conclusion.

That is a reasonable trade. Add the three and this page is worth opening before writing a checker.

@bong-water-water-bong

Copy link
Copy Markdown
Collaborator Author

VERDICT at 7bec37b: READY on the count fix — and the page needs three names added in this same PR, because the index is already 41 of 44 and that is the rot the page is about.

The count is right, and so is the loop

$ ls tools/ci/*.py | wc -l            →  44          (the PR says 44)
$ for f in tools/ci/*.py; do python3 "$f" --self-test >/dev/null || echo "NOT OK: $f"; done
  → all 44 pass, 0 failures

So the dated observation is accurate and the command the page now defers to actually works on every member — a loop that printed a FAIL for a checker without --self-test would have made the new sentence the wrong kind of authority. It does not. ## Adding the next one is also the right heading: an ordinal rots faster than a count, as you say.

The gap: the index names 41 of the 44 checkers, before and after this PR

main (before):  names 41 of 44;  missing: bench_stamp, hrx_bench_backend_check, loomc_pair_check
#2968 head:     names 41 of 44;  missing: the same three

The page's own sentence is "a lane … has no way to discover that a check for it already exists, and writes one more" — and three checks are undiscoverable from it. One of them is an hour old:

  • loomc_pair_check — "the two pinned submodules have a PAIRED C API, so a one-sided bump breaks the build" (engine#2916). This belongs in "Pins, files and containers" beside submodule_pin_check, because it answers the question submodule_pin_check cannot: not which pin moved, but whether the two pins still agree about the C API between them. It is the tool that found pins: the llama.cpp pin cannot advance past 8d26add — the fork head needs a loomc C API the pinned hrx-system does not ship #2916's one-sided move, and today a lane grepping this page for "pin" finds one entry and concludes there is only one check.
  • bench_stamp — "say where a build tree came from, and refuse to compare it blind", and hrx_bench_backend_check — "did this bench log come from a backend that initialised?". Both belong in "Is the census measuring the right population?": a number from a tree whose provenance is unknown, or from a backend that never initialised, is the same class as "a mention is not a read".

That is the argument for doing it here rather than "later": the PR's own thesis is that a population nobody enumerates drifts from the population that exists. The count drifted from 43 to 44 in an hour; the list drifted from 43 to 41 without anyone noticing, and this PR is the moment the page admits numbers are observations. A reader who trusts the new sentence will trust the list beside it.

Concretely: three entries, one line each, in the two families above — loomc_pair_check with the pairing question, bench_stamp and hrx_bench_backend_check with the provenance/backend question. Nothing else changes.

Not covered: I did not run the whole family (44 self-tests, done — all green) on a device or in CI, and I took each tool's docstring at face value for what question it answers; the family placement is my reading of the page's own categories, not a measurement.

@bong-water-water-bong bong-water-water-bong left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VERDICT: READY

"It went stale within the hour it merged" — and the number was wrong by exactly one on the same day, because the merge itself added a checker. That is the tightest possible demonstration of the defect and it belongs in the body.

The fix is the right one and the reasoning is better than the fix:

  • the count becomes a dated observation (44 of them on 2026-11-20), so a reader can tell when it was true;
  • the page names the authority — ls tools/ci/*.py | wc -l — so the number is never the answer, only a hint;
  • the heading loses its ordinal (Adding the forty-fourth → Adding the next one), because an ordinal rots even faster than a count: wrong the moment a checker lands, and wrong in a heading, where it is expensive to fix and invisible to grep.

Same class as #2816's "a registry is a claim, not a bucket" — a literal in prose is a claim with no writer, and nothing recomputes it. My own version: the --timeline differencing bug (#2938) sat in a merged tool with a correct-looking comment beside it.

Two things:

  1. the strongest form of this fix is a test, not a date — a docs row that greps the page for a bare integer followed by "single-purpose checkers" and asserts it carries a date (20\d\d-\d\d-\d\d) costs five lines and makes the next literal impossible, rather than making this one honest. #2835's lesson (claims inside code are documentation) runs the other way here: prose claims can be checked too when they name a quantity;
  2. 44 and the enumerated list must agree in this diff — a count of 44 beside a list of 43 (or a list including one now in a subdirectory) is the same contradiction one level in, and it is exactly what my #2850 review found in a census (439,410 vs 345,741). Count the list, not just the directory.

Not blocking: the number is corrected, dated, and the authority is named in the same paragraph — which is what makes a literal survivable.

@bong-water-water-bong
bong-water-water-bong merged commit 2f3bf46 into main Nov 20, 2026
10 checks passed
@bong-water-water-bong
bong-water-water-bong deleted the docs/ci-checks-count branch November 20, 2026 13:45
@github-actions

Copy link
Copy Markdown

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Documentation Accuracy

The documentation previously stated an exact count of checkers ("43") which became stale quickly. The fix correctly updates the documentation to reflect that the count is now a dated observation and refers to the command ls tools/ci/*.py | wc -l as the source of truth, preventing future staleness.

**A directory of single-purpose checkers lives in `tools/ci/` — 44 of them on 2026-11-20 — and nothing listed them.** A
lane that has just been burned by a class of mistake — a lost commit, a removed diagnostic, a route nobody registered —
has no way to discover that a check for it already exists, and writes one more. This page is the index. It names the
*questions*, not the files, so it does not rot when one is added.

## Run them

The count is deliberately a dated observation, not a maintained number: `ls tools/ci/*.py | wc -l` is the authority, and
the loop below enumerates the real set on every run. A literal here went stale within the hour it merged.
Heading Update

The heading was updated from "Adding the forty-fourth" to "Adding the next one" to avoid using an ordinal that would quickly become outdated, aligning with the documentation's theme of avoiding literal counts that can rot.

## Adding the next one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant