test_a_master_flow_takes_the_subtree_a_test_trace_reaches¶
Tests › tests/test_wiki_tracerun.py
What this test is for
Why it exists
X-2 (owner review 2, 2026-11-22): "I don't see the dossier being built"; owner Q/A: real values, traced. A traced test's root span is the TEST, so its trace could light only the test's own flow, never the `dossier` master flow it calls. A flow with no trace rooted at its entry takes the subtree under the first span named after its entry, from any trace.
Verifies REQ-DDB-WIKI-049
Given
def span(i, name, parent, start): return {"spanId": i, "parentSpanId": parent, "name": name, "startTimeUnixNano": start}otlp = { "resourceSpans": [ { "scopeSpans": [ { "spans": [ span("1", "test_dossier_caps", "", 1), span("2", "dossier", "1", 2), span("3", "_answered", "2", 3), span("4", "other", "1", 9), ] } ] } ] }
When
traces = {root_name(otlp): ("build/traces/t.json", otlp)}rel, sub = trace_for("dossier", traces)root_name(sub)
3 more
spans_of(sub)trace_for("test_dossier_caps", traces)trace_for("absent", traces)
Then
- ✓ rel equals "build/traces/t.json"
- ✓ root_name(sub) equals "dossier"
- ✓ sorted(s["name"] for s in spans_of(sub)) equals ["_answered", "dossier"]
- ✓ trace_for("test_dossier_caps", traces) equals traces["test_dossier_caps"]
- ✓ trace_for("absent", traces) is None
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
… 83 earlier steps
… 160 steps between
… 147 later steps
tests/test_wiki_tracerun.py:506 · its file's page
What it checks (4)
assert rel == "build/traces/t.json" and root_name(sub) == "dossier"observesroot_nameassert sorted(s["name"] for s in spans_of(sub)) == ["_answered", "dossier"]observesspans_ofassert trace_for("test_dossier_caps", traces) == traces["test_dossier_caps"]observestrace_forassert trace_for("absent", traces) is Noneobservestrace_for
Where the product reaches it
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-049 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-035 measured
- REQ-DDB-WIKI-036 measured