test_requirement_traceability_state_is_known¶
Tests › tests/integration/test_richness.py
What this test is for
Why it exists
THE HALF THIS TEST USED TO PIN IS RETIRED, and it retired itself exactly as designed. It asserted `implementers == []` because the package carried ZERO `@req` tags (task #62), with an escape hatch saying that if implementers ever appeared the limitation should be removed rather than the assertion loosened. They appeared: the package now tags itself, and `REQ-DDB-CONFIG-001` alone resolves to ~80 live implementers on a fresh self-index. The CHANGELOG had already been updated to say implementation traceability works; only this test lagged, which is why it failed (gh#362) — a STALE EXPECTATION, not a regression.
Given
- —
When
trace = q.req_trace(self_index_db, "REQ-DDB-CONFIG-001")all(imp.name and imp.liveness for imp in trace.implementers)covered = q.req_trace(self_index_db, "REQ-DDB-MCP-003")
Then
- ✓ trace.implementers holds
- ✓ all(imp.name and imp.liveness for imp in trace.implementers) holds
- ✓ trace.title holds
- ✓ covered.tests holds
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.
Look up one name: everything the index holds about it · 4 of 226 steps
… 17 earlier steps
… 25 steps between
… 156 steps between
… 11 later steps
3 more
- Build this wiki from the index · 1 of 400 steps
- clew — `main` (clew/cli.py) · 1 of 400 steps
- `main` (scripts/export_parity.py) · 1 of 203 steps
tests/integration/test_richness.py:178 · its file's page
What it checks (4)
assert trace.implementers, ( "REQ-DDB-CONFIG-001 resolves to no implementers. The package tags itself, so " "this is a req_edges regression, not the old task #62 gap — check that the " "declared id pattern in .clew.yaml's guard: section still matches the tags." )observesreq_traceviatraceassert all(imp.name and imp.liveness for imp in trace.implementers), ( "an implementer with no name or no liveness verdict is an unusable row" )observesallassert trace.title, ( "the catalog metadata did not come through — req_edges populate from TAGS and " "the catalog is read separately, so titles can be NULL while coverage looks fine" )observesreq_traceviatraceassert covered.tests, ( "REQ-DDB-MCP-003 reports no covering tests — req_test_edges regressed. Two " "test functions in tests/test_mcp_server.py tag it; if the tags are still " "there, the edge builder stopped reading them." )observesreq_traceviacovered
Where the product reaches it
dossier→_rank_enum_over_mirror→_class_side_is_only_enum_mirrors→all(flow)
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 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-010 measured
- REQ-DDB-SCHEMA-006 measured
- REQ-DDB-SCHEMA-015 measured
- REQ-DDB-WIKI-054 inferred