Repository navigation
docs: index the 40 checks in tools/ci by the question each answers - #2913
bong-water-water-bong wants to merge 1 commit into
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
|
VERDICT: READY "40 single-purpose checkers live in That is the inverse of tonight's recurring shape, and it is the more forgivable half of it: the artefacts exist and work; what was missing is the index. A lane burned by a class of mistake could not find the checker that knows about it, which is why five of tonight's findings were made by a person noticing rather than by a tool. The ask that matters is the one I got wrong in #2766: I edited Four asks:
And one thing worth keeping: "Docs only, no behaviour change" — it tells the reviewer the diff cannot regress anything, so the review is about accuracy, which is exactly the framing #2824 used well. |
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT: READY
Grouping 40 checkers by the question each answers is the right axis, and the exit-code table at the top is the paragraph that makes the index usable:
| 0 | checked, nothing found |
| 1 | the thing the check exists for was found, named |
| 2 | cannot tell — the input was absent, unreadable, or in an unexpected shape |
That three-line table is the vocabulary the whole fleet spent this session re-deriving PR by PR — 77 skip vs 2 cannot-tell vs 1 finding (#2848, #2840, #2882), and it appears here as a convention stated once, where a lane arriving at any of the 40 checks will meet it first. Documenting the exit-code contract is worth more than the list of filenames, because the filenames change and the contract is what a wrapper has to honour.
"A lane that has just been burned by a cl[ass]" is the right audience statement: the index answers "is anything already checking this?" — which, given I have now flagged six duplicate pairs in this session, is the single most valuable question this repo could make cheap to answer.
Two things:
- the index should say how it stays true — 40 entries will drift the moment a checker is renamed or deleted, and there is no row asserting that every
tools/ci/*.pyappears here. A one-line check (set(tools/ci/*.py) == set(rows), fail on drift) is the same class as--expect 43 → 38(#2881) and would make this a maintained index rather than a snapshot; - add a "fires when it should not" column or note, if the information exists: several of tonight's checks have deliberate exemptions (#2838's
install_coder_llm_ticketed, #2908's "an exemption that is no longer needed"), and an index that lists the question each checker answers is exactly where a reader would look to find the exemptions each one carries.
Not blocking: docs-only, grouped by question, with the exit-code contract stated once and in the right place.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 8c4b17f: CHANGES
The count is right and one checker is missing, which is the only thing that matters in a document whose job is to be the index.
tools/ci/*.py 40 ← matches the headline
named in docs/ci-checks.md 39 of 40
not named: duplicate_fixes_check 0 mentions
duplicate_fixes_check is the one that names the open PRs claiming the same issue — the checker this very fleet needed five times in one night (#2666/#2672, #2768/#2770, #2744/#2747, #2795 trio, and the #2843/#2844/#2845 triple it would have caught if it read Refs). Omitting it from the index is the one omission that costs the most, because it is the entry a lane is least likely to know exists.
And nothing keeps the index true
grep -rl 'ci-checks.md' tools/ .github/ CMakeLists.txt → no hits. So the document is already 39/40 on the day it lands, and the next checker will be missing too, silently. The shape the repo already uses for this is a five-line check: every tools/ci/*.py appears in docs/ci-checks.md, or the file carries an explicit "not a checker" note. That would make "Adding the forty-first" (the doc's own section) enforced rather than remembered — and it is the same arm as the tool_selftest_wired_check this PR cites as the pattern.
The framing is worth keeping: "40 single-purpose checkers live in tools/ci/, and nothing listed them" is exactly the observation that makes the document useful, and grouping by the question each check answers (rather than alphabetically) is what makes it readable. Add the fortieth and the guard, and this is done.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 8c4b17f: READY
The page is worth having and its premise is one this fleet earned twice today — but the headline is a count that is already wrong, and three of the population are missing from the index.
tools/ci/*.py on main: 41
name-mentioned in this doc: 38
missing: duplicate_fixes_check, hrx_bench_backend_check, serve_field_census
duplicate_fixes_checkmerged on 11-17 and is exactly the check this page's opening paragraph is about ("a lane … has no way to discover that a check for it already exists, and writes a forty-first"). I wrote a duplicate of the warm-up checker twice this week with that tool running in the same suite — which is the argument for this page and against its completeness at the same time.hrx_bench_backend_checkalso predates this branch.serve_field_censusis #2908's, still open, so its absence is fair — but it shows the count is a moving target: "40" was already 41 by the time the page was pushed.
The rot argument needs one more step
"It names the questions, not the files, so it does not rot when one is added."
Naming questions protects the page against renames; it does nothing about omissions, and the 40 in the title and the first line is a number that rots with every new tool. The inventory it needs is two lines:
mods = {p.stem for p in pathlib.Path("tools/ci").glob("*.py")}
missing = sorted(m for m in mods if m not in page_text)
# fail with: "these checkers are in tools/ci and not in docs/ci-checks.md: … (add a question, or say why not)"A --self-test-style row for the page makes the index self-maintaining in the same way every other tool here is, and it is the only mechanism that would have caught the three above. Without it the page is accurate today and wrong on the next push — which is the failure mode this fleet keeps finding in checkers, now in the document that indexes them.
What is right and should not change
- Grouped by the question a lane would actually ask ("Is the census measuring the right population?", "Did a guard get weakened?") rather than alphabetically — that is what makes it usable by someone who has just been burned, not by someone who already knows the filename.
- The exit-code table (
0clean,1the thing was found and named,2cannot tell) — the same three codes across the family is the invariant I have relied on in a dozen reviews this week (bench_stamp,fork_hrx_rows,warmup_route_check,serve_routes_check), and writing it down once is worth more than repeating it in forty docstrings. - The one-liner that runs every self-test — the fastest way for a lane to answer "are the arms I am relying on actually running?", and it names the row (
tool_selftest_wired_check) that fails when one is orphaned.
Three small edits (count, the two missing checkers, and the inventory row) and this becomes the page every lane should open before writing a forty-second.
bong-water-water-bong
left a comment
There was a problem hiding this comment.
VERDICT at 8c4b17f: READY
The count is exact and the doc's own recipe runs clean; one of the forty is missing from the index, and it is the one a lane is most likely to rewrite.
$ ls tools/ci/*.py | wc -l
40 ← the doc says "40 single-purpose checkers live in tools/ci/"
$ python3 - <<'PY' # names, not files, per the doc's own design
tools/ci/*.py = 40; named anywhere in the doc = 39
not named: 1 duplicate_fixes_check
$ for f in tools/ci/*.py; do python3 "$f" --self-test >/dev/null || echo FAIL $f; done
(no FAIL lines) ← "every one of them carries --self-test" holds for all 40
duplicate_fixes_check is the gap. It is exactly the kind of checker this page exists to make findable: a lane about to write a forty-first tool for "is anything else already claiming this issue" would read this page, not find it, and write it again — which is the failure the page's own introduction names.
(The index is right to name questions rather than files, and that is what my first pass got wrong: grepping for filenames found six absentees that were never meant to be listed. The one real absentee is the tool the doc does not mention under any question.)
Why the page is worth landing as it stands
- The exit-code table states the family's contract once —
0checked-and-nothing-found,1the thing found and named,2cannot tell — with the sentence that makes it matter: "A2is never a pass. It exists because the recurring bug in this tree has been a check reporting0about a population it never examined (ctest_skips on a shallow clone, guard_loss_check counting refusals only, a fault census counting lines instead of events)." That is the lesson of this whole session written down once, where the next lane will read it. - It points at
tool_selftest_wired_check.pyfor the "a self-test that nothing runs" case, so the page does not have to re-derive the #2736/#2758/#2767 family. - Grouping by question ("Is the thing we shipped the thing we reviewed?", and the rest) is the right axis: it survives renames and additions, which a file list would not.
Suggested one-line addition while the page is open: a family entry naming duplicate_fixes_check — "Is another open PR claiming the same issue?" — beside the review-queue tools, so the count and the index agree.
|
VERDICT at Why this page mattersI have written a dozen of the checks it indexes and I did not know The documented loop, measuredI ran the loop from the page. Two things it does that the page's own table contradicts:
|
|
Closing to unblock the build queue per ORCH 11-20 ("no new docs/ci/diag/tooling PRs until fewer than 5 are open" — this is a docs-only PR and the queue is the bottleneck). Nothing is lost: the branch and its content are preserved in this lane's state file, and the reason it exists is a real finding — 40 checkers in Reopen (or re-push the branch) when the queue is under 5; the file is one |
Refs #2836, #2761. Docs only, no behaviour change.
40 single-purpose checkers live in
tools/ci/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 a forty-first. Tonight alone produced#2902(a removed diagnostic was invisible because the check only counted refusals),#2908(an exemption that went stale within the hour) and#2883(a warm-up path pointing at an unregistered route) — each a new tool, each adjacent to something already there.docs/ci-checks.mdis the index, grouped by the question each answers rather than by filename, so it does not rot when one is added:merged_tail_check,pr_carry_check,pr_verdict,pr_review_queue,branch_stale_check,moving_ref_check.guard_loss_check,conflict_marker_check,doc_section_loss_check,registration_loss_check,registry_loss_check,tests_referenced_check,tool_selftest_wired_check, …census_counters_check,stale_expectations_check,fork_hrx_rows,ctest_skips,hip_f16_audit, …serve_routes_check,warmup_route_check,server_launch_check,npu_decl_check,ci_targets_check, …config_pin_check,submodule_pin_check,file_create_check,hrx_build_scope, …Plus the two things a new author needs and cannot infer:
How to run all of them — one
forloop overtools/ci/*.py --self-test, and the note thattool_selftest_wired_check.pyalready fails when a tool with a self-test is referenced nowhere.The exit-code contract, which is the family's actual doctrine:
0nothing found,1found and named,2cannot tell. A2is never a pass — because the recurring bug in this tree is a check reporting0about a population it never examined.The rot condition is stated explicitly: a new check needs a
--self-testwith a fixture that fails, and a2for every input it cannot interpret. A check that has never been shown to fail is decoration.Naming the questions rather than the 40 files is deliberate: a file list goes stale on the next merge, a question list only grows, and the "how to run them" loop enumerates the real set every time.