You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Numerical-claims guard does not check the stated test-module count outside README #958
Found while verifying #954, which added a test module and updated the stated count by hand in five places.
What happens
The numerical-claims guard's test-module rule (tools/check_doc_numerical_claims.py, scope toplevel) reads only README.md, by design: docs/roadmap/ records per-wave figures that must not be rewritten to the current total. The surfaces that state the current count are not checked at all:
CLAUDE.md and AGENTS.md (tests/ # 130 test modules)
CONTRIBUTING.md (130 test files)
docs/reference/architecture.md and architecture-tr.md (130 test modules, 130 test modülü)
On #954's head, setting all five to 999 still prints OK: every numerical doc claim matches canonical scrapes.
Acceptance criteria
The test-module rule also covers the current-inventory surfaces (the module_inventory scope plus CONTRIBUTING.md), including the test files and Turkish test modülü phrasings, while docs/roadmap/ stays exempt.
A test sets each of those counts wrong and expects a finding.
The test-module rule in build_rules() has the scope "toplevel", and _scanned_docs("toplevel") returns only README.md, so the files that state the current count are never read. _scanned_docs("module_inventory") already returns four of them (CLAUDE.md, AGENTS.md and the English and Turkish docs/reference/architecture pages); CONTRIBUTING.md is in neither scope. Two phrasings also never match the pattern: "130 test files" (CONTRIBUTING.md) and the Turkish "130 test modülü".
Make the test-module rule read those five files, and keep docs/roadmap/ out of it: it records historical per-wave figures that are correct as written. A new scope is the least invasive way to say "README plus the inventory surfaces plus CONTRIBUTING.md". Widen the pattern for the two phrasings but keep a qualifier, so that generic counts such as "124 rows" still do not match (test_generic_count_without_the_qualifier_does_not_match guards that).
Add tests in TestTestModuleAndGuardRules: set each of the five counts wrong in a temporary tree and expect a finding for each, and check that a wrong count under docs/roadmap/ is not reported. test_stale_inventory_fails_on_each_current_surface in TestCoreModuleInventory builds exactly this for the module_inventory scope, and test_toplevel_scope_excludes_docs_roadmap shows the roadmap check. test_both_rules_are_scoped_to_toplevel asserts the old scope and will have to change with the rule; say so in the PR.
Run these checks as applicable to the changed files:
ruff format --check tools/check_doc_numerical_claims.py tests/test_check_doc_numerical_claims.py
ruff check tools/check_doc_numerical_claims.py tests/test_check_doc_numerical_claims.py
Tests must not need a GPU, network access or model downloads. Record the change under ## [Unreleased] in CHANGELOG.md; earlier guard changes are listed there. No documentation page changes, so there is no Turkish mirror to update.
Activity
cemililik commentedon Oct 17, 2026
Where to start
Thanks for taking a look. Please confirm the issue is unassigned and comment before starting so work does not overlap.
Start with these files on
development:The test-module rule in
build_rules()has the scope"toplevel", and_scanned_docs("toplevel")returns onlyREADME.md, so the files that state the current count are never read._scanned_docs("module_inventory")already returns four of them (CLAUDE.md,AGENTS.mdand the English and Turkishdocs/reference/architecturepages);CONTRIBUTING.mdis in neither scope. Two phrasings also never match the pattern: "130 test files" (CONTRIBUTING.md) and the Turkish "130 test modülü".Make the test-module rule read those five files, and keep
docs/roadmap/out of it: it records historical per-wave figures that are correct as written. A new scope is the least invasive way to say "README plus the inventory surfaces plus CONTRIBUTING.md". Widen the pattern for the two phrasings but keep a qualifier, so that generic counts such as "124 rows" still do not match (test_generic_count_without_the_qualifier_does_not_matchguards that).Add tests in
TestTestModuleAndGuardRules: set each of the five counts wrong in a temporary tree and expect a finding for each, and check that a wrong count underdocs/roadmap/is not reported.test_stale_inventory_fails_on_each_current_surfaceinTestCoreModuleInventorybuilds exactly this for themodule_inventoryscope, andtest_toplevel_scope_excludes_docs_roadmapshows the roadmap check.test_both_rules_are_scoped_to_toplevelasserts the old scope and will have to change with the rule; say so in the PR.Run the focused tests and the guard itself:
Run these checks as applicable to the changed files:
Tests must not need a GPU, network access or model downloads. Record the change under
## [Unreleased]inCHANGELOG.md; earlier guard changes are listed there. No documentation page changes, so there is no Turkish mirror to update.Open the PR against
developmentwithFixes #958.