test_requirement_traceability_state_is_known

Tests › tests/integration/test_richness.py

passed Passed in the packaged run.

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

  1. —
→

When

  1. trace = q.req_trace(self_index_db, "REQ-DDB-CONFIG-001")
  2. all(imp.name and imp.liveness for imp in trace.implementers)
  3. covered = q.req_trace(self_index_db, "REQ-DDB-MCP-003")
→

Then

  1. ✓ trace.implementers holds
  2. ✓ all(imp.name and imp.liveness for imp in trace.implementers) holds
  3. ✓ trace.title holds
  4. ✓ 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

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pyclew/query/recovery.pydossier18. _documentation_mentions → table_exists18table_exists19. _documentation_mentions → has_columns19has_columns20. has_columns → table_exists20table_exists▶ test enters21–22. _hint_from → _name_exists21_name_exists +1 more

… 25 steps between

callercallercallercallerclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pydossier48–49. function_candidates → table_exists48table_exists +1 more50. _test_scope_term → table_exists50table_exists51–52. function_candidates → matching_identity51matching_identity +1 more

… 156 steps between

callercallercallercallerclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyother filesother filesother filesother filesloop (line 558)looploop (line 570)loopopt (line 239)optopt (line 285)optdossier209. chain_trace → _expand_neighbor209_expand_neighbor210. _expand_neighbor → resolve_rowid210resolve_rowid211. resolve_rowid → table_exists211table_exists▶ test enters212. resolve_rowid → function_candidates212function_candidates213. resolve_rowid → _test_scope_term213_test_scope_term214. _expand_neighbor → _make_node214_make_node215. subject_payload → _flatten_subject215_flatten_subject

… 11 later steps

3 more

tests/integration/test_richness.py:178 · its file's page

What it checks (4)

  1. 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." ) observes req_trace via trace
  2. assert all(imp.name and imp.liveness for imp in trace.implementers), ( "an implementer with no name or no liveness verdict is an unusable row" ) observes all
  3. assert 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" ) observes req_trace via trace
  4. assert 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." ) observes req_trace via covered

Where the product reaches it

  • dossier → _rank_enum_over_mirror → _class_side_is_only_enum_mirrors → all (flow)

Call flow

test_requirement_traceability_state_is_known→req_trace→all

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.

test_requirement_traceability_state_is_known · 4 checksreq_traceREQ-DDB-QUERY-001 · measuredreq_tracetable_existsREQ-DDB-QUERY-003 · measuredreq_trace_req_implementersresolve_rowidREQ-DDB-QUERY-010 · measuredreq_trace_req_failure_modesREQ-DDB-SCHEMA-006 · measuredreq_trace_req_linksREQ-DDB-SCHEMA-015 · measuredallREQ-DDB-WIKI-054 · inferred
Also reaches 6 requirements

Its run touches their code; that is reach, not proof.