test_a_dossier_reports_the_gates_covering_the_function¶
Tests › tests/integration/test_gate_coverage_integration.py
What this test is for
Why it exists
ONE REAL BUILD, THREE FUNCTIONS, TWO-SIDED THROUGHOUT.
Given
root = tmp_path / "gated"(root / "src").mkdir(parents=True)
8 more
(root / "src" / "fixture.c").write_text(SOURCE, encoding="utf-8")doxyfile = root / "Doxyfile"doxyfile.write_text(DOXYFILE, encoding="utf-8")db = tmp_path / "gates.db"build_index(output=db, repo_root=root, doxyfile=doxyfile)fast, fast_unplaceable = _gated_by(db, "fixture_fast")slow, _ = _gated_by(db, "fixture_slow")always, _ = _gated_by(db, "fixture_always")
When
- —
Then
- ✓ fast_unplaceable equals 0
- ✓ fast contains ("FIXTURE_FAST_PATH", KCONFIG_GATE_IFDEF)
- ✓ fast does not contain ("FIXTURE_FAST_PATH", KCONFIG_GATE_IFNDEF)
- ✓ slow contains ("FIXTURE_FAST_PATH", KCONFIG_GATE_IFNDEF)
- ✓ slow does not contain ("FIXTURE_FAST_PATH", KCONFIG_GATE_IFDEF)
- ✓ always is false
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) · 41 of 400 steps
… 10 earlier steps
… 26 steps between
… 4 steps between
… 23 steps between
… 57 steps between
… 27 steps between
… 5 steps between
… 125 steps between
… 8 steps between
… 21 steps between
8 more
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 27 of 142 steps
- Look up one name: everything the index holds about it · 26 of 226 steps
- Build, refresh and check the index · 21 of 153 steps
- Build this wiki from the index · 14 of 400 steps
- `main` (scripts/export_parity.py) · 10 of 203 steps
- `main` (clew/guard/main.py) · 3 of 357 steps
- clew-mcp — `main` (clew/mcp_server/server.py) · 1 of 17 steps
- `main` (scripts/incremental_probe.py) · 1 of 3 steps
tests/integration/test_gate_coverage_integration.py:99 · its file's page
What it checks (6)
assert fast_unplaceable == 0, ( "every gate in this file was harvested with an extent, so an empty gate list here would " "mean ungated rather than unknown — the count is what separates those two answers" )not attributedassert ("FIXTURE_FAST_PATH", KCONFIG_GATE_IFDEF) in fast, ( f"the true branch must report the symbol as required: {sorted(fast)}" )not attributedassert ("FIXTURE_FAST_PATH", KCONFIG_GATE_IFNDEF) not in fast, ( f"and must not ALSO report the inverse — that is the node-extent bug: {sorted(fast)}" )not attributedassert ("FIXTURE_FAST_PATH", KCONFIG_GATE_IFNDEF) in slow, ( f"the else branch is present when the symbol is NOT set: {sorted(slow)}" )not attributedassert ("FIXTURE_FAST_PATH", KCONFIG_GATE_IFDEF) not in slow, ( f"reporting the else branch as gated ON the symbol inverts the variant: {sorted(slow)}" )not attributedassert not always, ( f"a function outside every conditional must report no preconditions: {sorted(always)}" )not 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
test_a_dossier_reports_the_gates_covering_the_function→_gated_byWhat 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.
and 2 more requirement paths, listed below.
Also reaches 57 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CLI-001 measured
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-CONFIG-004 measured
- REQ-DDB-CONFIG-005 measured
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-CONFIG-009 measured
- REQ-DDB-INDEX-001 measured
- REQ-DDB-INDEX-002 measured
- REQ-DDB-INDEX-003 measured
- REQ-DDB-INDEX-004 measured
- REQ-DDB-INDEX-005 measured
- REQ-DDB-INDEX-006 measured
- REQ-DDB-INDEX-007 measured
- REQ-DDB-INDEX-008 measured
- REQ-DDB-INDEX-009 measured
- REQ-DDB-INDEX-010 measured
- REQ-DDB-INDEX-011 measured
- REQ-DDB-MCP-001 measured
- REQ-DDB-MCP-004 measured
- REQ-DDB-PIPE-001 measured
- REQ-DDB-PIPE-003 measured
- REQ-DDB-PIPE-004 measured
- REQ-DDB-PIPE-005 measured
- REQ-DDB-PIPE-006 measured
- REQ-DDB-PIPE-007 measured
- REQ-DDB-PIPE-008 measured
- REQ-DDB-PIPE-009 measured
- REQ-DDB-PIPE-010 measured
- REQ-DDB-PIPE-011 measured
- REQ-DDB-PIPE-012 measured
- REQ-DDB-PIPE-013 measured
- REQ-DDB-PIPE-014 measured
- REQ-DDB-PIPE-015 measured
- REQ-DDB-QUERY-001 measured
- REQ-DDB-QUERY-002 measured
- REQ-DDB-QUERY-003 measured
- REQ-DDB-QUERY-004 measured
- REQ-DDB-QUERY-006 measured
- REQ-DDB-QUERY-009 measured
- REQ-DDB-QUERY-010 measured
- REQ-DDB-QUERY-011 measured
- REQ-DDB-QUERY-012 measured
- REQ-DDB-QUERY-013 inferred
- REQ-DDB-SCHEMA-001 measured
- REQ-DDB-SCHEMA-002 measured
- REQ-DDB-SCHEMA-003 measured
- REQ-DDB-SCHEMA-004 measured
- REQ-DDB-SCHEMA-005 measured
- REQ-DDB-SCHEMA-006 measured
- REQ-DDB-SCHEMA-007 measured
- REQ-DDB-SCHEMA-009 measured
- REQ-DDB-SCHEMA-011 measured
- REQ-DDB-SCHEMA-012 measured
- REQ-DDB-SCHEMA-013 measured
- REQ-DDB-SCHEMA-014 measured
- REQ-DDB-SCHEMA-015 measured