test_an_absent_lock_layer_still_carries_a_split¶
Tests › tests/test_roster_origin_split.py
What this test is for
Why it exists
An index predating the layer must not answer "no split available" — a caller reading `origin.first_party` should get 0 with the buckets still summing, so the contract holds on every path rather than on the populated one only.
Given
db = tmp_path / "bare.db"conn = sqlite3.connect(str(db))
3 more
conn.executescript("CREATE TABLE path (name TEXT);")conn.commit()conn.close()
When
inv = q.lock_roster(db)
Then
- ✓ inv.origin.total equals 0
- ✓ inv.origin.first_party + inv.origin.external + inv.origin.unresolved equals 0
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) · 2 of 400 steps
… 345 earlier steps
… 49 later steps
1 more
- `main` (scripts/export_parity.py) · 2 of 203 steps
tests/test_roster_origin_split.py:317 · its file's page
What it checks (2)
assert inv.origin.total == 0observeslock_rosterviainvassert inv.origin.first_party + inv.origin.external + inv.origin.unresolved == 0observeslock_rosterviainv
Where the product reaches it
main→query_main→_payload→export_search→corpus_payload→lock_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 4 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
- REQ-DDB-SCHEMA-011 inferred