clew
  • Requirements
  • Flows
  • Tests
  • Change impact
  • Map
  • Architecture
  • Docs
  • SBOM

test_a_measured_link_carries_its_extent¶

Tests › tests/test_wiki_imports.py

passed Passed in the packaged run.

What this test is for

Why it exists

OWNER 2026-11-17: "a test could cover sections of multiple requirements, or one requirement in full". A measured link says WHICH of the requirement's implementers the test executed, so "ran 1 of 9" never reads like "ran all 9". Unmeasured (no contexts) is ABSENT, not empty.

Verifies REQ-DDB-WIKI-009

Given

  1. report = tmp_path / "coverage.json"
  2. report.write_text( json.dumps({"files": {"src/a.c": {"contexts": {"11": ["tests/t.py::test_cov|run"]}}}}) )
→

When

  1. measured = { r.req_id: r for r in requirement_evidence( traced, junit=[], inputs=EvidenceInputs(contexts="coverage.json", infer_depth=0), repo_root=tmp_path, ) }
  2. plain = requirement_evidence( traced, junit=[], inputs=EvidenceInputs(infer_depth=0), repo_root=tmp_path )
  3. all(r.extent is None for r in plain)
→

Then

  1. ✓ measured["R-A"].extent equals (("test_cov", ("impl",)),)
  2. ✓ measured["R-B"].extent equals ()
  3. ✓ all(r.extent is None for r in plain) 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.

Build this wiki from the index · 6 of 400 steps

… 131 earlier steps

callercallercallercallerclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesopt (line 200)optloop (line 259)loopelif (line 264)elifopt (line 202)optloop (line 204)loopbuild_wiki132–133. parse_contexts → _contexts_from_lcov132_contexts_from_lcov +1 more134. _text → check_report_size134check_report_size135. _contexts_from_lcov → _relative135_relative136–138. parse_contexts → _contexts_from_data_file136_contexts_from_data_file +2 more139. parse_contexts → _text139_text▶ test enters140–141. parse_contexts → _relative140_relative +1 more142. _build_site → build_graph142build_graph143. build_graph → connect143connect

… 201 steps between

callercallercallercallerclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyclew/wiki/build.pyother filesother filesother filesother filesbuild_wiki345. slice_svg → _hidden345_hidden346. _build_site → parse_junit346parse_junit347. parse_junit → fold_cases347fold_cases▶ test enters348. fold_cases → _folded348_folded349–350. parse_junit → _case_name349_case_name +1 more

… 50 later steps

tests/test_wiki_imports.py:500 · its file's page

What it checks (3)

  1. assert measured["R-A"].extent == (("test_cov", ("impl",)),) observes requirement_evidence via measured
  2. assert measured["R-B"].extent == () observes requirement_evidence via measured
  3. assert all(r.extent is None for r in plain) observes all

Where the product reaches it

  • dossier → _rank_enum_over_mirror → _class_side_is_only_enum_mirrors → all (flow)

Call flow

test_a_measured_link_carries_its_extent→requirement_evidence→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_a_measured_link_carries_its_extent · 3 checksrequirement_evidenceconnectREQ-DDB-QUERY-001 · measuredrequirement_evidence_implementer_spanstable_existsREQ-DDB-QUERY-003 · measuredrequirement_evidenceREQ-DDB-WIKI-002 · measuredallREQ-DDB-WIKI-054 · inferred

Requirements it verifies (1)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-009catalogunknown
Also reaches 11 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-041 measured
  • REQ-DDB-WIKI-054 inferred
clew Generated by clew wiki from the repository's index