test_the_config_inventory_lists_symbols_and_honours_text

Tests › tests/test_kconfig.py

passed Passed in the packaged run.

What this test is for

Why it exists

A 2.1 MB REPLY ON THE AXIS UNDER TEST. `search(corpus='config', text='MBEDTLS_THREADING_C')` returned 2,149,463 characters on mbedtls 2026-08-14 — all 12,096 gate SITES, because inventory corpora ignored `text` — while reporting `found: false` for a symbol whose name sits in `configured_macros` in the same reply. In a graded cell that is a budget-destroying reply or a bail-out.

Verifies REQ-DDB-CONFIG-005 REQ-DDB-PIPE-007 REQ-DDB-PIPE-014

Given

  1. db = tmp_path / "clew.db"
  2. conn = sqlite3.connect(str(db))
3 more
  1. conn.executescript( """ CREATE TABLE kconfig_gates ( symbol TEXT, macro TEXT, form TEXT, file_path TEXT, line INTEGER, origin TEXT, end_line INTEGER ); INSERT INTO kconfig_gates VALUES ('MBEDTLS_THREADING_C','MBEDTLS_THREADING_C','if_expr','a.c',1,'declared',3); INSERT INTO kconfig_gates VALUES ('MBEDTLS_THREADING_C','MBEDTLS_THREADING_C','if_expr','b.c',9,'declared',11); INSERT INTO kconfig_gates VALUES ('MBEDTLS_SSL_PROTO_TLS1_3','MBEDTLS_SSL_PROTO_TLS1_3','ifdef','c.c',4,'undeclared',6); """ )
  2. conn.commit()
  3. conn.close()
→

When

  1. inventory = kconfig_space(db, None, include_gates=False)
  2. filtered = kconfig_space(db, "MBEDTLS_THREADING_C", include_gates=False)
  3. kconfig_space(db, "CONFIG_MBEDTLS_THREADING_C", include_gates=False)
4 more
  1. sites = kconfig_space(db, "MBEDTLS_THREADING_C")
  2. gates_meaning(_NAME_CAP, _NAME_CAP + 7, False)
  3. gates_meaning(3, 3, False)
  4. gates_meaning(0, 0, False)
→

Then

  1. ✓ inventory.gate_symbol_names equals ("MBEDTLS_SSL_PROTO_TLS1_3", "MBEDTLS_THREADING_C")
  2. ✓ inventory.gates equals ()
  3. ✓ inventory.gates_meaning contains "omitted"
  4. ✓ inventory.gates_meaning contains "dossier"
  5. ✓ filtered.gate_symbol_names equals ("MBEDTLS_THREADING_C",)
  6. ✓ kconfig_space(db, "CONFIG_MBEDTLS_THREADING_C", include_gates=False).gate_symbol_names holds
  7. ✓ len(sites.gates) equals 2
  8. ✓ sites.gates_meaning equals ""
  9. ✓ gates_meaning(_NAME_CAP, _NAME_CAP + 7, False) contains f"{_NAME_CAP}"
  10. ✓ gates_meaning(_NAME_CAP, _NAME_CAP + 7, False) contains "7 are not shown"
  11. ✓ gates_meaning(3, 3, False) holds
  12. ✓ gates_meaning(3, 3, False) does not contain "not shown"
  13. ✓ gates_meaning(0, 0, False) equals ""

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.

`main` (scripts/export_parity.py) · 19 of 203 steps

… 13 earlier steps

program launcherprogram launcherprogram launcherprogram launcherclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/symbols.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyloop (line 1576)loopmain14. _memberdef_corpora → _expansion_sql14_expansion_sql15. _expansion_sql → has_columns15has_columns16. has_columns → table_exists16table_exists17. _memberdef_corpora → _memberdef_candidates17_memberdef_candidates18. _memberdef_candidates → table_exists18table_exists

… 159 steps between

program launcherprogram launcherprogram launcherprogram launcherprogram launcherclew/query/export.pyclew/query/export.pyclew/query/export.pyclew/query/export.pyclew/query/export.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/kconfig.pyclew/query/kconfig.pyclew/query/kconfig.pyclew/query/kconfig.pyclew/query/kconfig.pyother filesother filesother filesother filesother filesloop (line 660)looploop ×2 (line 288)loop ×2main178. _config_found_on_the_wire → _compact_gate_panel178_compact_gate_panel179. corpus_payload → kconfig_space179kconfig_space180. kconfig_space → connect180connect▶ test enters181. kconfig_space → _meta181_meta182. _meta → table_exists182table_exists183. kconfig_space → _symbols183_symbols184. _symbols → table_exists184table_exists185. kconfig_space → table_exists185table_exists186. kconfig_space → _gate_layer_state186_gate_layer_state187. _gate_layer_state → table_exists187table_exists188. kconfig_space → _gate_symbol_names188_gate_symbol_names189. _gate_symbol_names → table_exists189table_exists190. kconfig_space → _gates190_gates191. _gates → table_exists191table_exists192. _gates → _gate_columns192_gate_columns193–194. _gate_columns → has_columns193has_columns ×2195. _gates → _with_defaults195_with_defaults196. _with_defaults → table_exists196table_exists197. _with_defaults → _defaults_for_macros197_defaults_for_macros198. _with_defaults → decided_default198decided_default199. decided_default → is_shipped_config199is_shipped_config200. _with_defaults → _in_default_build200_in_default_build201–202. kconfig_space → macros_meaning201macros_meaning +1 more203. corpus_payload → one203one
2 more

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

What it checks (11)

  1. assert inventory.gate_symbol_names == ("MBEDTLS_SSL_PROTO_TLS1_3", "MBEDTLS_THREADING_C") observes kconfig_space via inventory
  2. assert inventory.gates == (), "the inventory form must NOT carry the per-site rows" observes kconfig_space via inventory
  3. assert "omitted" in inventory.gates_meaning and "dossier" in inventory.gates_meaning, ( "an empty gates list must say it was omitted and where the sites are" ) observes kconfig_space via inventory
  4. assert filtered.gate_symbol_names == ("MBEDTLS_THREADING_C",) observes kconfig_space via filtered
  5. assert kconfig_space(db, "CONFIG_MBEDTLS_THREADING_C", include_gates=False).gate_symbol_names observes kconfig_space
  6. assert len(sites.gates) == 2, "naming a symbol must still return ITS sites" observes kconfig_space via sites
  7. assert sites.gates_meaning == "", "the site form has nothing omitted to explain" observes kconfig_space via sites
  8. assert f"{_NAME_CAP}" in gates_meaning(_NAME_CAP, _NAME_CAP + 7, False) observes gates_meaning
  9. assert "7 are not shown" in gates_meaning(_NAME_CAP, _NAME_CAP + 7, False) observes gates_meaning
  10. assert gates_meaning(3, 3, False) and "not shown" not in gates_meaning(3, 3, False) observes gates_meaning
  11. assert gates_meaning(0, 0, False) == "" observes gates_meaning

Where the product reaches it

  • main → query_main → _payload → export_search → corpus_payload → kconfig_space (flow)

Call flow

test_the_config_inventory_lists_symbols_and_honours_text→kconfig_space→gates_meaning

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_config_inventory_lists_symbols_and_honours_text · 11 checkskconfig_spaceconnectREQ-DDB-QUERY-001 · measuredkconfig_spacetable_existsREQ-DDB-QUERY-003 · measuredkconfig_space_gates_with_defaults_in_default_buildREQ-DDB-QUERY-004 · inferredkconfig_spaceREQ-DDB-QUERY-006 · measuredkconfig_space_gates_with_defaultsdecided_defaultREQ-DDB-QUERY-013 · inferred

Requirements it verifies (3)

requirementlinked byimplementers exercised
REQ-DDB-CONFIG-005catalogunknown
REQ-DDB-PIPE-007catalogunknown
REQ-DDB-PIPE-014catalogunknown
Also reaches 5 requirements

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