diff --git a/tools/verify.py b/tools/verify.py index 79540bf..18ffa71 100644 --- a/tools/verify.py +++ b/tools/verify.py @@ -132,7 +132,7 @@ TOOLS ARE RESOLVED FROM --repo, NOT FROM THIS FILE'S DIRECTORY The path must still be the ROOT: a subdirectory is rc 2 naming the root, because widening `--repo` silently would grade a tree nobody named. -`--selftest` fixture corpus, 50 cells +`--selftest` fixture corpus, 51 cells """ import argparse @@ -184,6 +184,13 @@ WEAK_HINTS = ("FAIL", "not a ") # summaries -- they are axis lines inside a tool's report. SUMMARY_RE = re.compile(r"^[a-z][a-z0-9_]*: ") +# The selftest size this file's docstring claims. Cell 27 grades that claim +# against the count that actually ran, because on 2026-10-19 the count left +# this exact defect behind: the docstring and the run said 50 while the +# argparse help string still said 42, and nothing failed. +_DOC_CLAIM = re.search(r"fixture corpus, (\d+) cells", __doc__ or "") +DOC_CELLS = int(_DOC_CLAIM.group(1)) if _DOC_CLAIM else 0 + def pick_detail(text, limit=150, summary=False): """First line that names a reason, else the last line that says anything. @@ -449,7 +456,8 @@ def main(argv=None): help="per-leg timeout in seconds (default 300)") ap.add_argument("--json", metavar="PATH", help="write the rows here") ap.add_argument("--quiet", action="store_true") - ap.add_argument("--selftest", action="store_true", help="fixture corpus, 42 cells") + ap.add_argument("--selftest", action="store_true", + help="run the fixture corpus (the run prints its cell count)") a = ap.parse_args(argv) if a.selftest: @@ -853,6 +861,14 @@ def selftest(): rc, out = _verify("--repo", bare, "--fast") check("26 a bare repository -> rc 2", rc, 2) + # 27. the count in this file's own docstring is a CLAIM, so it is graded + # against the count that actually ran. On 2026-10-19 the docstring and + # the run said 50 while the argparse help string still said 42 and + # nothing failed -- the same count-word defect this repo keeps finding in + # documents, closed in the document that prints the number. + check("27 the docstring's cell count is the count that ran", + DOC_CELLS, cells + 1) + print("selftest: %d cells, %d passed, %d failed" % (cells, passed, len(failures))) for f in failures: print(" FAIL %s" % f)