test_by_default_inference_is_the_full_transitive_closure¶
Tests › tests/test_wiki_imports.py
What this test is for
Why it exists
OWNER 2026-11-17: tests are linked to source by what they reach, transitively — "we should EXPLICITLY know which tests are related to which requirements by transitive linkage". A fixed hop cap was a guess: clew's REQ-DDB-GUARD-021 implementer sits 4 calls under its tests, so the demo read it MISSING. With no `infer_depth` declared, every test whose calls reach an implementer at ANY depth is linked; the cap stays available, and 0 still turns it off. The link's extent names the implementers each inferred test reaches.
Verifies REQ-DDB-WIKI-009
Given
db = _with_calls(traced, tmp_path)
When
rows = { r.req_id: r for r in requirement_evidence(db, junit=[], inputs=EvidenceInputs(), repo_root=tmp_path) }
Then
- ✓ rows["R-A"].inferred_tests equals ("test_far", "test_infer")
- ✓ dict(rows["R-A"].extent) equals {"test_far": ("impl",), "test_infer": ("impl",)}
- ✓ dict(rows["R-A"].distance) equals {"test_far": 3, "test_infer": 2}
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.
Build this wiki from the index · 2 of 400 steps
… 344 earlier steps
… 50 later steps
tests/test_wiki_imports.py:528 · its file's page
What it checks (3)
assert rows["R-A"].inferred_tests == ("test_far", "test_infer")observesrequirement_evidenceviarowsassert dict(rows["R-A"].extent) == {"test_far": ("impl",), "test_infer": ("impl",)}observesrequirement_evidenceviarowsassert dict(rows["R-A"].distance) == {"test_far": 3, "test_infer": 2}observesrequirement_evidenceviarows
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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-009 | catalog | unknown |
Also reaches 10 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-SCHEMA-006 measured
- REQ-DDB-WIKI-002 measured
- REQ-DDB-WIKI-010 measured
- REQ-DDB-WIKI-015 measured
- REQ-DDB-WIKI-016 measured
- REQ-DDB-WIKI-017 measured
- REQ-DDB-WIKI-054 inferred