test_the_index_warns_too¶
Tests › tests/guard/test_guard_legacy_config.py
What this test is for
Why it exists
BOTH SIDES, because the index reads the gate's config as well: the `@req` id pattern and the requirements catalog come from `guard:`, so a repository with an inert legacy file has its requirement LINKS defaulted in the graph for the same reason its gate stopped enforcing them. An owner who only ever runs `clew index` would otherwise never see the warning at all.
Given
(tmp_path / LEGACY_CONFIG_NAME).write_text("validate: {}\n")(tmp_path / ".clew.yaml").write_text("thread_patterns:\n spawns:\n - {name: worker}\n")
When
with caplog.at_level(logging.WARNING): load_declaration(tmp_path)
Then
- ✓ " ".join(r.getMessage() for r in caplog.records) contains LEGACY_CONFIG_NAME
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.
thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 9 of 142 steps
… 99 earlier steps
… 14 steps between
… 5 steps between
… 3 later steps
2 more
- clew — `main` (clew/cli.py) · 9 of 400 steps
- Build this wiki from the index · 8 of 400 steps
tests/guard/test_guard_legacy_config.py:70 · its file's page
What it checks (1)
assert LEGACY_CONFIG_NAME in " ".join(r.getMessage() for r in caplog.records)not attributed
Where the product reaches it
main→propose_main→propose→build_context→load_declaration(flow)
Call flow
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.
Also reaches 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-001 measured
- REQ-DDB-GUARD-012 inferred
- REQ-DDB-WIKI-054 inferred