test_an_unknown_target_is_refused_by_name¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
THE MOST EXPENSIVE RECORDED DEFECT IN THIS PROJECT, and until now it had no test. A 36-cell grid published "the index is 8 points WORSE" from an arm pointed at the wrong repository: 15 of 18 cells said so in their own prose and all 36 were recorded valid, because every validity term checked that database tools were CALLED and none checked which repository answered.
Verifies REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
registry = st.TargetRegistry(tmp_path / "state")real = tmp_path / "registered"
2 more
real.mkdir()registry.register(str(real))
When
_mcp, srv = build_server(registry)srv.resolve_target("mbedtls")message = str(caught.value)
Then
- ✓ raises RuntimeError
- ✓ message contains "mbedtls"
- ✓ message contains str(real)
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.
Build, refresh and check the index · 13 of 153 steps
… 17 earlier steps
… 31 steps between
… 77 later steps
4 more
- clew-mcp — `main` (clew/mcp_server/server.py) · 9 of 17 steps
- thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 1 of 142 steps
- clew — `main` (clew/cli.py) · 1 of 400 steps
- `main` (scripts/incremental_probe.py) · 1 of 3 steps
tests/test_mcp_server.py:3213 · its file's page
What it checks (2)
assert "mbedtls" in message, "the refusal must name what was asked for"not attributedassert str(real) in message, "and must list what IS registered, or it is unactionable"not attributed
Where the product reaches it
main→build_server(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 (3)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-QUERY-006 | catalog | unknown |
| REQ-DDB-QUERY-008 | catalog | unknown |
| REQ-DDB-QUERY-009 | catalog | unknown |
Also reaches 5 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-001 measured
- REQ-DDB-MCP-003 measured
- REQ-DDB-MCP-004 measured
- REQ-DDB-WIKI-034 measured
- REQ-DDB-WIKI-054 measured