test_a_repo_declaring_nothing_still_reports_absence¶
Tests › tests/test_scope.py
What this test is for
Why it exists
THE CONTROL. Every message above is a REPLACEMENT for the absence clause, so a check that only looked for the new wording would pass a version that had deleted the old one — and a repo that declares nothing genuinely has no index_scope, which is the common case and must keep saying so.
Verifies REQ-DDB-PIPE-014
Given
root = tmp_path / "repo"(root / "src").mkdir(parents=True)
When
derived = sc.derive_scope(root)
Then
- ✓ derived.source equals sc.SOURCE_WHOLE_REPO
- ✓ derived.reason contains "no index_scope is declared"
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:495 · its file's page
What it checks (2)
assert derived.source == sc.SOURCE_WHOLE_REPOobservesderive_scopeviaderivedassert "no index_scope is declared" in derived.reason, ( f"a repo that declares nothing must still report absence; got: {derived.reason}" )observesderive_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