test_markdown_that_yielded_no_prose_is_still_not_barren¶
Tests › tests/test_coverage.py
What this test is for
Why it exists
`supplementary_docs` membership is a PROXY for "this file is prose", and it holds only while every indexed markdown file is also ingested. Ingestion has its own file set, so a wide INPUT indexes markdown that never reaches it — measured on this repo's own whole-repo index, where 894 `.md` files took `barren_ratio` from 0.015 to 0.795 and tripped `alarming` on a build whose code coverage had not moved.
Given
docs = [(f"evidence/cell_{n}.md", BIG, 0) for n in range(MIN_SUBSTANTIVE_FILES + 5)]db_path, root = _coverage_db(tmp_path, docs, prose=())
When
coverage = measure_index_coverage(db_path, root)
Then
- ✓ coverage.indexed_files equals 0
- ✓ coverage.barren_files equals 0
- ✓ coverage.alarming is false
tests/test_coverage.py:245 · its file's page
What it checks (3)
assert coverage.indexed_files == 0, "markdown is not code, ingested or not"observesmeasure_index_coverageviacoverageassert coverage.barren_files == 0observesmeasure_index_coverageviacoverageassert not coverage.alarmingobservesmeasure_index_coverageviacoverage
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-INDEX-002 inferred
- REQ-DDB-INDEX-003 measured