test_a_limitation_documented_only_in_help_is_searchable¶
Tests › tests/test_kconfig.py
What this test is for
Why it exists
THE ISSUE'S OWN "DONE MEANS". A `help` block routinely carries the only statement of a known limitation in a repository, and until gh#18 not a word of it was indexed.
Verifies REQ-DDB-PIPE-007 REQ-DDB-QUERY-006
Given
others = [ path for path in repo.rglob("*") if path.is_file() and path.name != "Kconfig.motor" and HELP_ONLY_PHRASE in path.read_text(encoding="utf-8", errors="replace") ]db = tmp_path / "clew.db"_db_with_paths(db, ())
When
ingest_supplementary_docs(db, repo)search_prose(db, HELP_ONLY_PHRASE)import_kconfig(db, repo, None)hits = search_prose(db, HELP_ONLY_PHRASE)
Then
- ✓ others equals []
- ✓ search_prose(db, HELP_ONLY_PHRASE) equals []
- ✓ hits holds
- ✓ any("MOTOR_BETA" in hit.heading for hit in hits) holds
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) · 9 of 400 steps
… 293 earlier steps
… 92 later steps
1 more
- `main` (scripts/export_parity.py) · 9 of 203 steps
tests/test_kconfig.py:264 · its file's page
What it checks (4)
assert others == [], f"the phrase is not help-only any more — also in {others}"not attributedassert search_prose(db, HELP_ONLY_PHRASE) == [], ( "the markdown ingest alone must NOT find it — otherwise this test would pass " "without the Kconfig ingest doing anything" )observessearch_proseassert hits, "a limitation documented only in a help block is still unreachable"observessearch_proseviahitsassert any("MOTOR_BETA" in hit.heading for hit in hits), ( "the hit must name the symbol the limitation belongs to" )observessearch_proseviahits
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
test_a_limitation_documented_only_in_help_is_searchable→_db_with_paths→ingest_supplementary_docs→search_prose→import_kconfigWhat 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 (2)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-007 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
Also reaches 9 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-005 measured
- REQ-DDB-INDEX-002 inferred
- REQ-DDB-PIPE-001 measured
- REQ-DDB-PIPE-014 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-007 measured
- REQ-DDB-SCHEMA-012 measured
- REQ-DDB-SCHEMA-013 measured