test_index_scope_summarises_provenance_and_shape

Tests › tests/test_emptiness.py

passed Passed in the packaged run.

What this test is for

Why it exists

This is the information gh#21 says an empty result must carry, and which only `status` could produce — a separate call the caller had no reason to make.

Given

  1. —
→

When

  1. scope = index_scope(db)
→

Then

  1. ✓ scope.source equals "doxygen-guard"
  2. ✓ scope.reason contains "pre-commit-config"
  3. ✓ scope.file_count equals 3
  4. ✓ scope.top_levels equals ("app", "docs")
  5. ✓ scope.extensions equals (".md", ".py")

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_emptiness.py:115 · its file's page

What it checks (5)

  1. assert scope.source == "doxygen-guard" observes index_scope via scope
  2. assert "pre-commit-config" in scope.reason observes index_scope via scope
  3. assert scope.file_count == 3 observes index_scope via scope
  4. assert scope.top_levels == ("app", "docs") observes index_scope via scope
  5. assert scope.extensions == (".md", ".py") 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_index_scope_summarises_provenance_and_shape→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_index_scope_summarises_provenance_and_shape · 5 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.