test_a_stated_configuration_survives_export_declare_rebuild¶
Tests › tests/integration/test_export_roundtrip.py
What this test is for
Why it exists
THREE BUILDS, TWO SHAPES, ASSERTED ON THE THIRD BUILD'S RECORDS.
Given
root = tmp_path / "target"doxyfile = _target(root)
2 more
first = tmp_path / "first.db"build_index( output=first, repo_root=root, doxyfile=doxyfile, options={"predefined": [GATED_MACRO], SECTION_SHARED_KEY: MANIFEST}, )
When
stated_first = stated_options(_options_meta(first))exported = stated_declaration(first)declaration = tmp_path / "exported.yaml"
5 more
declaration.write_text(render(exported, first), encoding="utf-8")second = tmp_path / "second.db"build_index(output=second, repo_root=root, doxyfile=doxyfile, declare=str(declaration))stated_second = stated_options(_options_meta(second))stated_declaration(second)
Then
- ✓ stated_first contains "predefined"
- ✓ stated_first contains SECTION_SHARED_KEY
- ✓ exported.get("predefined") equals [GATED_MACRO]
- ✓ exported.get(SECTION_SHARED_KEY) equals MANIFEST
- ✓ set(stated_second) equals set(stated_first)
- ✓ stated_declaration(second) equals exported
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) · 33 of 400 steps
… 10 earlier steps
… 19 steps between
… 1 step between
… 4 steps between
… 23 steps between
… 57 steps between
… 27 steps between
… 190 later steps
7 more
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 31 of 142 steps
- Build, refresh and check the index · 23 of 153 steps
- Build this wiki from the index · 7 of 400 steps
- `main` (clew/guard/main.py) · 3 of 357 steps
- `main` (scripts/stage_probe.py) · 2 of 37 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_export_roundtrip.py:117 · its file's page
What it checks (5)
assert "predefined" in stated_first and SECTION_SHARED_KEY in stated_first, ( f"the fixture must record BOTH shapes or the round trip proves half of it: {stated_first}" )observesstated_optionsviastated_firstassert exported.get("predefined") == [GATED_MACRO], ( f"the list shape must survive as a list, not a scalar: {exported}" )observesstated_declarationviaexportedassert exported.get(SECTION_SHARED_KEY) == MANIFEST, ( f"the document shape must survive intact: {exported}" )observesstated_declarationviaexportedassert set(stated_second) == set(stated_first), ( f"the round trip lost or gained a statement: {stated_second} vs {stated_first}" )observesstated_optionsviastated_firstassert stated_declaration(second) == exported, ( "and the re-exported declaration must equal the first, or the format is not stable under " "its own round trip" )observesstated_declaration
Where the product reaches it
Call flow
test_a_stated_configuration_survives_export_declare_rebuild→_target→stated_options→_options_meta→stated_declarationWhat 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.
Also reaches 49 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-003 measured
- REQ-DDB-QUERY-011 measured
- 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