The gate had six legs and none of them read a docstring's own command line.
doc_command_check.py existed since 838750c but only as a tool: nothing on the
gate ran it, so a documented flag its parser never learned could land and
nobody read it. This is that leg.
doc-commands tools/doc_command_check.py --rev WORKTREE --fail
WORKTREE, not HEAD: the commit window is where a docstring is
edited. Measured at the worktree this lands in: 67 commands
over 19 oracle tools, 67 OK, rc 0.
doc_command_check.py learns --rev WORKTREE: tracked paths from `git ls-files`
(an untracked tools/x.py is not part of the commit this mode grades), bytes
from disk. Outside a work tree it is rc 2, not an empty clean run. Selftest
15 -> 18 cells: one document edited on disk but not committed is rc 0 at HEAD
and rc 1 at WORKTREE, and the flag it names is the edited one.
Three tools stopped defaulting to a fixed path on this host. verify.py,
selftest_sweep.py, write_probe.py, citation_resolve_check.py,
path_claim_check.py and doc_census_check.py now resolve DEFAULT_REPO from the
file's own location, so a bare run in a clone grades the clone.
Three selftests refuse unreadable input at rc 2 instead of reporting it as
failed content: tool_map (not a work tree), write_probe (no table), and
citation_resolve_check (no corpus). Each cell below them graded `repo`, so an
absent tree read as "your table is wrong".
Evidence, all measured on this tree before the commit:
verify.py --selftest 55 cells, 55 passed (docstring says 55)
doc_command_check.py --selftest 18 cells, 18 passed (baseline pinned 18)
tool_map.py --repo . --rev WORKTREE --check docs/TOOLS.md rc 0
verify.py --repo . 7 legs, 6 pass, 1 fault -- selftest-sweep,
tool_map's drift cell, which renders HEAD
and so cannot pass inside a commit window
tools/selftest_baseline.tsv re-pins doc_command_check.py 15 -> 18 cells.
1.2 KiB
1.2 KiB
| 1 | # selftest_baseline.tsv -- the cell count each tool's selftest prints, pinned. | ||
|---|---|---|---|
| 2 | # Written by: python3 tools/selftest_sweep.py --repo . --write-baseline tools/selftest_baseline.tsv | ||
| 3 | # | ||
| 4 | # WHY THIS FILE EXISTS: the count a tool advertises lives in its own docstring, | ||
| 5 | # so a commit that deletes fixtures and decrements that number agrees with | ||
| 6 | # itself and every leg stays green. This ledger is the outside witness. | ||
| 7 | # `selftest_sweep.py` reads it on every run: a printed count that differs is | ||
| 8 | # PIN_DRIFT and fatal; a tool with no row is PIN_UNPINNED and fatal; a row | ||
| 9 | # whose tool is gone is PIN_ORPHAN and fatal. Re-pin on purpose, in the diff. | ||
| 10 | # | ||
| 11 | # tool<TAB>count<TAB>unit | ||
| 12 | append_only_audit.py | 18 | cells |
| 13 | append_only_owners.py | 15 | cells |
| 14 | census_row_delta.py | 33 | cells |
| 15 | check_lint.py | 37 | cells |
| 16 | checkin_check.py | 36 | cells |
| 17 | citation_hash_class.py | 19 | fixtures |
| 18 | citation_resolve_check.py | 14 | fixtures |
| 19 | doc_census_check.py | 104 | cells |
| 20 | doc_command_check.py | 18 | cells |
| 21 | gate_blame.py | 21 | cells |
| 22 | landing_check.py | 26 | cells |
| 23 | path_claim_check.py | 27 | cells |
| 24 | queue_append_audit.py | 25 | cells |
| 25 | queue_claim_check.py | 24 | fixtures |
| 26 | queue_index.py | 58 | cells |
| 27 | reply_check.py | 49 | cells |
| 28 | selftest_sweep.py | 39 | cells |
| 29 | served_drift_check.py | 25 | cells |
| 30 | tool_map.py | 20 | cells |
| 31 | verify.py | 51 | cells |
| 32 | write_probe.py | 15 | cells |