test_only_a_traced_test_gets_a_flow_of_its_own

Tests › tests/test_wiki_tracerun.py

passed Passed in the packaged run.

What this test is for

Why it exists

FOUND ON CLEW'S OWN WIKI (round 4): three runs were packaged, and the capped set of test flows held none of their tests, so every replay landed in "traces whose test has no flow". Round 5 (owner 2026-11-17) removed per-test flows and the cap: a test is a slice of the master flows, and only a test with a packaged trace keeps a flow, so its replay has a place to land.

Verifies REQ-DDB-WIKI-035 REQ-DDB-WIKI-036 REQ-DDB-WIKI-049

Given

  1. facts = { "test_a": TestFacts(verifies=[("R", "tag")]), "test_z": TestFacts(verifies=[("R", "tag")]), }
  2. keys = {("test_a", "tests/t.py"), ("test_z", "tests/t.py")}
→

When

  1. with mock.patch("clew.wiki.symbols.test_functions", return_value=keys): specs = build._test_flows(tmp_path / "x.db", facts, frozenset({"test_z"}))
→

Then

  1. ✓ {s.entry for s in specs} equals {"test_z"}

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

… 85 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.pyclew/wiki/symbols.pyclew/wiki/symbols.pyclew/wiki/symbols.pyclew/wiki/symbols.pyother filesother filesother filesother filesbuild_wiki86. root_name → spans_of86spans_of87. _build_site → _test_flows87_test_flows88. _test_flows → connect88connect▶ test enters89. _test_flows → test_functions89test_functions90. test_functions → table_exists90table_exists91. _build_site → _all_flows91_all_flows

… 309 later steps

tests/test_wiki_tracerun.py:374 · its file's page

What it checks (1)

  1. assert {s.entry for s in specs} == {"test_z"} observes _test_flows via specs

Where the product reaches it

  • build_wiki → _build_site → _test_flows (flow)

Call flow

test_only_a_traced_test_gets_a_flow_of_its_own→_test_flows

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_only_a_traced_test_gets_a_flow_of_its_own · 1 checks_test_flowsconnectREQ-DDB-QUERY-001 · measured_test_flowstest_functionstable_existsREQ-DDB-QUERY-003 · inferred_test_flowstest_functionsREQ-DDB-WIKI-026 · inferred_test_flowsREQ-DDB-WIKI-027 · measured

Requirements it verifies (3)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-035catalogunknown
REQ-DDB-WIKI-036catalogunknown
REQ-DDB-WIKI-049catalogunknown
Also reaches 4 requirements

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