test_lock_roster_on_an_index_without_the_layer_says_so¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
`row_meaning` must distinguish "no locks in this repo" from "no lock TABLE in this index". An absent table is a fact about the BUILD and never evidence about the code, and a caller that cannot tell them apart reports a threadless codebase and a pre-layer index identically.
Verifies REQ-DDB-MCP-001 REQ-DDB-MCP-003 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
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.locks equals ()
- ✓ inv.rows equals 0
- ✓ inv.row_meaning contains "predates the lock layer"
- ✓ inv.row_meaning contains "NOT evidence"
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_mcp_server.py:3189 · its file's page
What it checks (4)
assert inv.locks == ()observeslock_rosterviainvassert inv.rows == 0observeslock_rosterviainvassert "predates the lock layer" in inv.row_meaningobserveslock_rosterviainvassert "NOT evidence" in inv.row_meaning, "absence of a table is not absence of mutexes"observeslock_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.
Requirements it verifies (5)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-MCP-001 | catalog | unknown |
| REQ-DDB-MCP-003 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
| REQ-DDB-QUERY-008 | catalog | unknown |
| REQ-DDB-QUERY-009 | catalog | unknown |
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