test_the_target_refusal_is_shared_by_every_routed_tool¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
THE PLAN'S EXPLICIT REQUIREMENT, and the reason it is explicit: a guard added at one tool's entry point protects that tool and quietly leaves the other twenty-one answering from the wrong index. Driving two DIFFERENT tools through the same bad target is what proves the check sits where the target is RESOLVED rather than where one caller happens to ask.
Verifies REQ-DDB-MCP-001 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
tools = QueryTools(lambda: rich_db, lambda: tmp_path)for call in ( lambda: tools.search("anything", target="some-other-repo"), lambda: tools.dossier("anything", target="some-other-repo"), ): with pytest.raises(RuntimeError) as caught: call() assert "some-other-repo" in str(caught.value)
When
- —
Then
- —
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.
Look up one name: everything the index holds about it · 3 of 226 steps
… 89 earlier steps
… 36 steps between
… 78 steps between
… 8 later steps
tests/test_mcp_server.py:3280 · its file's page
What it checks (1)
assert "some-other-repo" in str(caught.value)not attributed
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 (4)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-MCP-001 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
| REQ-DDB-QUERY-008 | catalog | unknown |
| REQ-DDB-QUERY-009 | catalog | unknown |
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-003 measured
- REQ-DDB-QUERY-010 measured