test_cli_apply_scope_refuses_a_rejected_declaration¶
Tests › tests/test_scope.py
What this test is for
Why it exists
FIELD-REPORTED: an excludes-only `.clew.yaml` — written by an operator trying to keep a 1.2GB vendored tree out of the index — was silently absorbed into the whole-repo tier (a buildlog WARNING, then the widest possible scope anyway), and cost a real build a 900s doxygen timeout under exactly the tree the declaration was trying to exclude. `_apply_scope` must now refuse instead, before doxygen ever runs.
Verifies REQ-DDB-PIPE-014
Given
root = tmp_path / "repo"_write(root / "src" / "a.c")
2 more
(root / ".clew.yaml").write_text("index_scope:\n excludes:\n - src\n", encoding="utf-8")args = _args( tmp_path / "clew.db", doxyfile=str(root / "Doxyfile"), scope=sc.SCOPE_FROM_GUARD, )
When
_apply_scope(args, root)
Then
- ✓ raises SystemExit
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) · 8 of 142 steps
… 97 earlier steps
… 18 steps between
… 11 later steps
2 more
- clew — `main` (clew/cli.py) · 7 of 400 steps
- Build this wiki from the index · 5 of 400 steps
tests/test_scope.py:555 · its file's page
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_cli_apply_scope_refuses_a_rejected_declaration→_write→_args→_apply_scopeWhat 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.
Requirements it verifies (1)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-PIPE-014 | catalog | unknown |
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