emrg: sync test counts to 484 + guard test against doc drift (recurs #426/#430/#510) - #511
Conversation
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-232437 (emrg-00c41753, author self-check, 1/3)
Verified on master 4058022: the #510 sync was correct as of its base (480), but #509 (+2 evolution_summary e2e tests) merged on top, so uv run pytest tests/ -q now reports 482. This PR syncs README.md + Agent.md to 482. Doc-only; GUI count (86) unchanged and still correct.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-233406 (emrg-00c41753, 2/3)
Independently verified in an isolated worktree at head 37543f7:
- Count consistency: master collects 482; #511 adds exactly 2 guard tests → 484 documented = 484 collected. Self-consistent (no off-by-2).
- Guard validated in BOTH states (per #455 lesson): positive (484=484) passes; negative (temporarily set README to 999) fails with a precise message 'documents 999 Python tests but 484 are collected'. GUI breakdown guard also passes (86 = 22+22+17+15+7+3).
- Full suite on head: 484 passed (482 + 2 new guard tests). Docs-only apart from the new test file; CI test workflow green.
- This guard directly kills the recurring #426→#430→#510→#511 drift pattern. Excellent — the count can no longer silently rot.
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle 20260806-233252 (emrg-00c41753, 2/3 — final state)
Final PR state verified (supersedes the 1/3 note about the pre-guard diff):
- README.md + Agent.md Python count 480→484; GUI breakdown (86) untouched
- tests/test_doc_counts.py guard: (1) test_python_count_matches_docs runs
pytest --collect-onlyand asserts README (currently N items) + Agent.md ((N)) match the real collection; (2) test_gui_breakdown_sums_to_headline asserts each documented npm-test breakdown sums to its headline (parses per-part leading numbers — avoids the 'i18n' digit trap, e.g. 15 i18n must not contribute '18') - Consistency check: 484 = 482 pre-existing + 2 guard tests; the guard caught the 482 vs 484 mismatch immediately when added, proving the detector works
- First CI run failed at 'Set up job' (runner infra, no code involved); re-run 31116216570 green
This structurally closes the #426→#430→#510→#511 doc-drift recurrence: any future test add/remove without doc sync now fails CI. Doc + test-only change.
Summary
The #510 doc sync fixed counts as of master before #509 merged. After #509 (evolution_summary e2e tests, +2 tests) landed, the Python suite is 484 — docs had drifted again (the recurring #426/#430/#510 pattern).
This PR not only re-syncs the numbers but adds a guard test to structurally stop the recurrence:
Changes
tests/test_doc_counts.py(new):test_python_count_matches_docs— runspytest --collect-onlyand asserts README.md (currently N items) and Agent.md ((N)) match the real collection counttest_gui_breakdown_sums_to_headline— asserts every documented GUInpm testbreakdown (README/Agent.md) sums to its headline numbercurrently 482 items→currently 484 items(482)→(484)Verification
uv run pytest tests/ -q→ 484 passed (includes the 2 new guard tests)