test_a_limitation_documented_only_in_help_is_searchable

Tests › tests/test_kconfig.py

passed Passed in the packaged run.

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

  1. 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") ]
  2. db = tmp_path / "clew.db"
  3. _db_with_paths(db, ())
→

When

  1. ingest_supplementary_docs(db, repo)
  2. search_prose(db, HELP_ONLY_PHRASE)
  3. import_kconfig(db, repo, None)
  4. hits = search_prose(db, HELP_ONLY_PHRASE)
→

Then

  1. ✓ others equals []
  2. ✓ search_prose(db, HELP_ONLY_PHRASE) equals []
  3. ✓ hits holds
  4. ✓ 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

command-line usercommand-line usercommand-line usercommand-line usercommand-line userclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyclew/query/corpus.pyother filesother filesother filesother filesother filesopt (line 1012)optmain294. corpus_payload → _prose_corpus294_prose_corpus295. _prose_corpus → search_prose_graded295search_prose_graded296. search_prose_graded → _query_tokens296_query_tokens▶ test enters297. search_prose_graded → connect297connect298. search_prose_graded → table_exists298table_exists299–300. search_prose_graded → _fts_match299_fts_match +1 more301. search_prose_graded → strip_xml301strip_xml302. search_prose_graded → list302list303. search_prose_graded → member_doc_rows303member_doc_rows304. member_doc_rows → table_exists304table_exists305. member_doc_rows → has_columns305has_columns306. search_prose_graded → _collapse306_collapse307. _prose_corpus → prose_emptiness307prose_emptiness308. prose_emptiness → has_prose_corpus308has_prose_corpus

… 92 later steps

1 more

tests/test_kconfig.py:264 · its file's page

What it checks (4)

  1. assert others == [], f"the phrase is not help-only any more — also in {others}" not attributed
  2. assert 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" ) observes search_prose
  3. assert hits, "a limitation documented only in a help block is still unreachable" observes search_prose via hits
  4. assert any("MOTOR_BETA" in hit.heading for hit in hits), ( "the hit must name the symbol the limitation belongs to" ) observes search_prose via hits

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_kconfig

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_a_limitation_documented_only_in_help_is_searchable · 4 checksimport_kconfigREQ-DDB-CONFIG-005 · measuredingest_supplementary_docs_ingest_one_doc_filememoizedREQ-DDB-INDEX-002 · inferredingest_supplementary_docsREQ-DDB-PIPE-001 · measuredingest_supplementary_docswithin_repoREQ-DDB-PIPE-014 · measuredsearch_proseREQ-DDB-QUERY-001 · measuredsearch_prosesearch_prose_gradedtable_existsREQ-DDB-QUERY-003 · measuredsearch_prosesearch_prose_gradedmember_doc_rowsREQ-DDB-QUERY-007 · measuredimport_kconfigstore_kconfigensure_kconfig_tablesREQ-DDB-SCHEMA-013 · measured

Requirements it verifies (2)

requirementlinked byimplementers exercised
REQ-DDB-PIPE-007catalogunknown
REQ-DDB-QUERY-006catalogunknown
Also reaches 9 requirements

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