test_the_query_layer_serves_what_the_build_stamped

Tests › tests/test_not_indexed_report.py

passed Passed in the packaged run.

What this test is for

Why it exists

`IndexScope.not_indexed` carries the stamped row.

Given

  1. db = tmp_path / "clew.db"
  2. conn = sqlite3.connect(str(db))
  3. 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

  1. scope = index_scope(db)
→

Then

  1. ✓ scope.not_indexed equals (".sh=3", ".yml=1")
  2. ✓ 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

command-line usercommand-line usercommand-line usercommand-line userclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyother filesother filesother filesother filesmain252. _symbol_corpus → search_emptiness252search_emptiness253. search_emptiness → index_scope253index_scope254. index_scope → connect254connect▶ test enters255. index_scope → _scope_provenance255_scope_provenance256. _scope_provenance → table_exists256table_exists257. index_scope → _indexed_paths257_indexed_paths258. _indexed_paths → table_exists258table_exists259–260. index_scope → _extensions259_extensions +1 more261–262. search_emptiness → _scope_payload261_scope_payload +1 more

… 138 later steps

1 more

tests/test_not_indexed_report.py:134 · its file's page

What it checks (2)

  1. assert scope.not_indexed == (".sh=3", ".yml=1") observes index_scope via scope
  2. assert scope.not_indexed_count == 4 observes index_scope via scope

Where the product reaches it

  • main → query_main → _payload → export_search → corpus_payload → _symbol_corpus → search_emptiness → index_scope (flow)

Call flow

test_the_query_layer_serves_what_the_build_stamped→index_scope

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_the_query_layer_serves_what_the_build_stamped · 2 checksindex_scopeconnectREQ-DDB-QUERY-001 · measuredindex_scope_indexed_pathstable_existsREQ-DDB-QUERY-003 · measuredindex_scopeREQ-DDB-QUERY-007 · measured
Also reaches 3 requirements

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