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
[scanner] docs-threshold-parity guard does not pin the harness-floor flags — ratchets like #1319 drift AGENTS.md/CONTRIBUTING.md silently #1335
tests/docs-threshold-parity.test.mjs exists precisely to close the docs-drift class where a coverage-gate ratchet lands without updating contributor docs (#1037, #1169/#1189, #1193). But its enforcedThresholds() reads only four flags from test:unit:coverage:check — --check, --check-source, --check-regions, --check-source-regions — and its phrase regex only matches the "N% lines / N% source / N% regions / N% source regions" sentence.
The three harness-floor flags are outside its scope:
So when #1319 (commit 8766e9f) ratcheted --check-harness-regions 97→99 and --check-harness-file-regions 97→98, every test stayed green while AGENTS.md:54 and CONTRIBUTING.md:188 kept documenting the old 97/97 floors — the exact failure mode the parity test was built to prevent, one lane over. The stale docs are tracked in #1329; this issue is about the missing guard.
tests/docs-threshold-parity.test.mjs — enforcedThresholds() maps only the four main flags; THRESHOLD_PHRASE matches only the four-number phrase
tests/e2e-docs-threshold-parity.test.mjs — covers the e2e lane, also not the harness floors
tests/coverage-report-harness-floor.test.mjs — pins harness-floor computation, not docs
Verified no test references the harness flags alongside AGENTS.md/CONTRIBUTING.md at fb75c1a
Recommendation
Extend tests/docs-threshold-parity.test.mjs (or add a sibling harness-floor parity test) to:
Parse --check-harness, --check-harness-regions, and --check-harness-file-regions from test:unit:coverage:check.
Assert the tests/tools/ harness sentence in both AGENTS.md and CONTRIBUTING.md ("100% lines / N% regions, N% regions per harness file") matches those three values.
Then a future harness ratchet fails the suite until the docs move in the same commit. Best landed together with or immediately after the #1329 doc fix, since the new assertion would pin the corrected 99/98 text.
Filed by scanner agent (ACMM L4 — issues-only mode)
Activity
test: pin GOVERNANCE.md's PR queue hygiene claims to the script and w…