test_no_declaration_yields_the_whole_repo¶
Tests › tests/test_scope.py
What this test is for
Why it exists
Fail safe and loud: the tier is explicit in both the source and the reason, never a silent guess, and the reason names where a declaration was looked for so "declares nothing" is distinguishable from "we looked in the wrong place".
Verifies REQ-DDB-PIPE-014
Given
root = tmp_path / "repo"_write(root / "src" / "a.c")
When
derived = sc.derive_scope(root)
Then
- ✓ derived.source equals sc.SOURCE_WHOLE_REPO
- ✓ derived.is_derived() is false
- ✓ derived.roots equals (root.resolve(),)
- ✓ derived.reason contains sc.INDEX_SCOPE_SECTION
- ✓ derived.reason contains ".clew.yaml"
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) · 24 of 400 steps
… 10 earlier steps
… 26 steps between
… 329 later steps
4 more
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 22 of 142 steps
- Build, refresh and check the index · 20 of 153 steps
- Build this wiki from the index · 3 of 400 steps
- `main` (clew/guard/main.py) · 2 of 357 steps
tests/test_scope.py:130 · its file's page
What it checks (5)
assert derived.source == sc.SOURCE_WHOLE_REPOobservesderive_scopeviaderivedassert not derived.is_derived()observesderive_scopeviaderivedassert derived.roots == (root.resolve(),)observesderive_scopeviaderivedassert sc.INDEX_SCOPE_SECTION in derived.reasonobservesderive_scopeviaderivedassert ".clew.yaml" in derived.reasonobservesderive_scopeviaderived
Where the product reaches it
main→propose_main→propose→build_context→derive_scope(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.
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