test_the_query_layer_serves_what_the_build_stamped¶
Tests › tests/test_not_indexed_report.py
What this test is for
Why it exists
`IndexScope.not_indexed` carries the stamped row.
Given
db = tmp_path / "clew.db"conn = sqlite3.connect(str(db))try: conn.execute("CREATE TABLE path (rowid INTEGER PRIMARY KEY, type INT, name TEXT)") conn.execute("INSERT INTO path (type, name) VALUES (1, 'src/main.c')") conn.execute("CREATE TABLE build_meta (key TEXT PRIMARY KEY, value TEXT)") conn.executemany( "INSERT INTO build_meta (key, value) VALUES (?, ?)", [("scope.not_indexed", ".sh=3, .yml=1"), ("scope.not_indexed_count", "4")], ) conn.commit() finally: conn.close()
When
scope = index_scope(db)
Then
- ✓ scope.not_indexed equals (".sh=3", ".yml=1")
- ✓ scope.not_indexed_count equals 4
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) · 7 of 400 steps
… 251 earlier steps
… 138 later steps
1 more
- `main` (scripts/export_parity.py) · 7 of 203 steps
tests/test_not_indexed_report.py:134 · its file's page
What it checks (2)
assert scope.not_indexed == (".sh=3", ".yml=1")observesindex_scopeviascopeassert scope.not_indexed_count == 4observesindex_scopeviascope
Where the product reaches it
main→query_main→_payload→export_search→corpus_payload→_symbol_corpus→search_emptiness→index_scope(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-007 measured