test_the_thread_split_buckets_every_row¶
Tests › tests/test_roster_origin_split.py
What this test is for
Why it exists
One thread per bucket, including a spawn site whose path rowid resolves to NOTHING — that lands in UNRESOLVED rather than first party, because "we do not know whose this is" is not "it is ours". Folding it into first_party is how a count comes to look healthier than its evidence.
Given
- —
When
inv = q.thread_roster( _thread_db( tmp_path, [ (1, "poll_loop", 1, 1, 12), (2, "llama_worker", None, 2, 40), ## A spawn path rowid with no `path` row — an index whose file table lost it. (3, "ghost", None, 99, 7), ], _THREAD_FILES, ) )o = inv.origin
Then
- ✓ (o.total, o.first_party, o.external, o.unresolved) equals (3, 1, 1, 1)
- ✓ o.first_party + o.external + o.unresolved equals o.total
- ✓ o.external_roots equals ("extern/llama.cpp",)
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.
clew — `main` (clew/cli.py) · 15 of 400 steps
… 215 earlier steps
… 141 steps between
… 21 later steps
2 more
- `main` (scripts/export_parity.py) · 15 of 203 steps
- Look up one name: everything the index holds about it · 1 of 226 steps
tests/test_roster_origin_split.py:442 · its file's page
What it checks (3)
assert (o.total, o.first_party, o.external, o.unresolved) == (3, 1, 1, 1)not attributedassert o.first_party + o.external + o.unresolved == o.totalnot attributedassert o.external_roots == ("extern/llama.cpp",)not attributed
Where the product reaches it
main→query_main→_payload→export_search→corpus_payload→thread_roster(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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-011 measured