test_index_refuses_stats_and_cull_and_names_their_cli¶
Tests › tests/test_surface_2_0.py
What this test is for
Why it exists
A RETIRED ACTION IS REFUSED BY NAME with the route that replaced it — never a silent fall-through, never a bare "unknown action".
Given
- —
When
mcp, state = build_server(st.TargetRegistry(tmp_path / "state"))for action, route in (("stats", "clew query stats"), ("cull", "clew cull")): with pytest.raises(ValueError) as exc: await state.index(None, action=action) assert route in str(exc.value), actionindex = next(t for t in await mcp.list_tools() if t.name == "index")
Then
- ✓ index.input_schema["properties"] does not contain "max_age_days"
- ✓ json.dumps(index.model_dump()) does not contain "stats"
- ✓ json.dumps( index.model_dump() ) does not contain "cull"
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 · 9 of 153 steps
… 21 earlier steps
… 118 later steps
1 more
- clew-mcp — `main` (clew/mcp_server/server.py) · 8 of 17 steps
tests/test_surface_2_0.py:50 · its file's page
What it checks (3)
assert route in str(exc.value), actionnot attributedassert "max_age_days" not in index.input_schema["properties"]not attributedassert "stats" not in json.dumps(index.model_dump()) and "cull" not in json.dumps( index.model_dump() )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.
Also reaches 6 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-001 measured
- REQ-DDB-MCP-002 measured
- REQ-DDB-MCP-003 measured
- REQ-DDB-MCP-004 measured
- REQ-DDB-WIKI-034 measured
- REQ-DDB-WIKI-054 measured