test_lock_roster_on_an_index_without_the_layer_says_so

Tests › tests/test_mcp_server.py

passed Passed in the packaged run.

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

  1. db = tmp_path / "bare.db"
  2. conn = sqlite3.connect(str(db))
3 more
  1. conn.executescript("CREATE TABLE path (name TEXT);")
  2. conn.commit()
  3. conn.close()
→

When

  1. inv = q.lock_roster(db)
→

Then

  1. ✓ inv.locks equals ()
  2. ✓ inv.rows equals 0
  3. ✓ inv.row_meaning contains "predates the lock layer"
  4. ✓ 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

command-line usercommand-line usercommand-line usercommand-line userclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesmain346. _files_corpus → files_miss346files_miss347. corpus_payload → lock_roster347lock_roster348. lock_roster → connect348connect▶ test enters349. lock_roster → table_exists349table_exists350–351. lock_roster → _entries350_entries +1 more

… 49 later steps

1 more

tests/test_mcp_server.py:3189 · its file's page

What it checks (4)

  1. assert inv.locks == () observes lock_roster via inv
  2. assert inv.rows == 0 observes lock_roster via inv
  3. assert "predates the lock layer" in inv.row_meaning observes lock_roster via inv
  4. assert "NOT evidence" in inv.row_meaning, "absence of a table is not absence of mutexes" observes lock_roster via inv

Where the product reaches it

  • main → query_main → _payload → export_search → corpus_payload → lock_roster (flow)

Call flow

test_lock_roster_on_an_index_without_the_layer_says_so→lock_roster

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_lock_roster_on_an_index_without_the_layer_says_so · 4 checkslock_rosterREQ-DDB-QUERY-001 · measuredlock_rostertable_existsREQ-DDB-QUERY-003 · measuredlock_rosterREQ-DDB-QUERY-011 · measuredlock_rosternestings_onREQ-DDB-SCHEMA-011 · inferred

Requirements it verifies (5)

requirementlinked byimplementers exercised
REQ-DDB-MCP-001catalogunknown
REQ-DDB-MCP-003catalogunknown
REQ-DDB-QUERY-006catalogunknown
REQ-DDB-QUERY-008catalogunknown
REQ-DDB-QUERY-009catalogunknown
Also reaches 4 requirements

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