test_search_finds_a_gating_symbol_by_name¶
Tests › tests/test_kconfig.py
What this test is for
Why it exists
gh#394, THE DISCOVERY HALF. After gh#390 stored the rows, `dossier` answered for a config symbol and `search` still returned NOTHING — so a caller who did not already know the name could not find it, which is the common case for "what turns this on". The graded agent searched for these symbols BY NAME nine times in one run and was refused every time.
Verifies REQ-DDB-CONFIG-005 REQ-DDB-PIPE-014 REQ-DDB-QUERY-006
Given
root, db = _no_kconfig_repo(tmp_path)
When
import_kconfig_gates(db, root)hits = search(db, "PROJ_THREADING_PTHREAD")
Then
- ✓ hits holds
- ✓ hits[0].name equals "PROJ_THREADING_PTHREAD"
- ✓ hits[0].kind equals CONFIG_SYMBOL_KIND
- ✓ len([h for h in hits if h.kind == CONFIG_SYMBOL_KIND]) equals 1
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) · 30 of 400 steps
… 70 earlier steps
… 124 steps between
… 7 steps between
… 147 later steps
2 more
- `main` (scripts/export_parity.py) · 23 of 203 steps
- Look up one name: everything the index holds about it · 1 of 226 steps
tests/test_kconfig.py:643 · its file's page
What it checks (4)
assert hits, "a stored gating symbol must be discoverable"not attributedassert hits[0].name == "PROJ_THREADING_PTHREAD"not attributedassert hits[0].kind == CONFIG_SYMBOL_KINDnot attributedassert len([h for h in hits if h.kind == CONFIG_SYMBOL_KIND]) == 1not attributed
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
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 (3)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-CONFIG-005 | catalog | unknown |
| REQ-DDB-PIPE-014 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
Also reaches 11 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-004 measured
- REQ-DDB-PIPE-003 measured
- REQ-DDB-PIPE-007 measured
- REQ-DDB-PIPE-011 measured
- REQ-DDB-PIPE-012 inferred
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-007 measured
- REQ-DDB-QUERY-012 measured
- REQ-DDB-SCHEMA-012 measured
- REQ-DDB-SCHEMA-013 measured