test_the_target_refusal_is_shared_by_every_routed_tool

Tests › tests/test_mcp_server.py

passed Passed in the packaged run.

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

  1. tools = QueryTools(lambda: rich_db, lambda: tmp_path)
  2. 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

  1. —
→

Then

  1. —

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

callercallercallercallerclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyother filesother filesother filesother filesopt (line 1145)optdossier90. batch_payload → _hoist_build_wide90_hoist_build_wide91. _batched_dossiers → db91db92. db → _route92_route93. db → 93… 1 call not run94. _batched_dossiers → _repo_or_none94_repo_or_none

… 36 steps between

callercallercallercallerclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/subject.pyclew/query/subject.pyclew/query/subject.pyclew/query/subject.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyclew/query/_common.pyother filesother filesother filesother filesopt (line 1715)optopt (line 1012)optdossier131. _answered → 131… 2 calls not run132. dossier → disclose_overflow132disclose_overflow133. dossier → subject_payload133subject_payload▶ test enters134. subject_payload → dossier134dossier135. dossier → connect135connect

… 78 steps between

callercallercallercallerclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/mcp_server/tools_query.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/payload.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyclew/query/traversal.pyother filesother filesother filesother filesopt (line 285)optdossier214. _expand_neighbor → _make_node214_make_node215. subject_payload → _flatten_subject215_flatten_subject216. dossier → db216db▶ test enters217–218. dossier → _repo_or_none217_repo_or_none +1 more

… 8 later steps

tests/test_mcp_server.py:3280 · its file's page

What it checks (1)

  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)

requirementlinked byimplementers exercised
REQ-DDB-MCP-001catalogunknown
REQ-DDB-QUERY-006catalogunknown
REQ-DDB-QUERY-008catalogunknown
REQ-DDB-QUERY-009catalogunknown
Also reaches 2 requirements

Its run touches their code; that is reach, not proof.