test_admitting_a_submodule_leaves_first_party_coverage_identical¶
Tests › tests/test_external_provenance.py
What this test is for
Why it exists
THE LOAD-BEARING CONTROL, and the reason it is phrased as a comparison of two builds rather than as an expected number: it holds whatever the matcher does. If a first-party figure moves when a nested tree is admitted, the tagging is wrong, and no assertion about the matcher's internals would have caught it.
Verifies REQ-DDB-PIPE-014
Given
alone_db, alone_root = _indexed(tmp_path / "alone", _ours())
When
stamp_external_provenance(alone_db, alone_root)alone = measure_index_coverage(alone_db, alone_root)both_db, both_root = _indexed( tmp_path / "both", [*_ours(), *_theirs()], nested=("vendor/theirs",) )
2 more
stamp_external_provenance(both_db, both_root)both = measure_index_coverage(both_db, both_root)
Then
- ✓ both.indexed_files equals alone.indexed_files
- ✓ both.substantive_files equals alone.substantive_files
- ✓ both.barren_files equals alone.barren_files
- ✓ both.barren_ratio equals alone.barren_ratio
- ✓ both.undocumented_files equals alone.undocumented_files
- ✓ both.external_files equals 12
- ✓ both.external_roots equals ("vendor/theirs",)
- ✓ alone.external_files equals 0
What it exercises
The parts of the system's flows this test ran, measured by per-test coverage: lit steps ran in this test, dimmed ones did not, and ▶ marks where the test called in. Each title opens the whole flow with these steps lit.
thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 6 of 142 steps
… 2 earlier steps
… 126 later steps
4 more
- Build, refresh and check the index · 6 of 153 steps
- clew — `main` (clew/cli.py) · 6 of 400 steps
- Build this wiki from the index · 2 of 400 steps
- `main` (clew/guard/main.py) · 2 of 357 steps
tests/test_external_provenance.py:218 · its file's page
What it checks (8)
assert both.indexed_files == alone.indexed_filesobservesmeasure_index_coverageviaaloneassert both.substantive_files == alone.substantive_filesobservesmeasure_index_coverageviaaloneassert both.barren_files == alone.barren_filesobservesmeasure_index_coverageviaaloneassert both.barren_ratio == alone.barren_ratioobservesmeasure_index_coverageviaaloneassert both.undocumented_files == alone.undocumented_filesobservesmeasure_index_coverageviaaloneassert both.external_files == 12observesmeasure_index_coverageviabothassert both.external_roots == ("vendor/theirs",)observesmeasure_index_coverageviabothassert alone.external_files == 0observesmeasure_index_coverageviaalone
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
test_admitting_a_submodule_leaves_first_party_coverage_identical→_indexed→_ours→stamp_external_provenance→measure_index_coverage→_theirsWhat 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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-014 | catalog | unknown |
Also reaches 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-INDEX-002 measured
- REQ-DDB-INDEX-003 measured
- REQ-DDB-INDEX-004 measured
- REQ-DDB-INDEX-005 measured