test_status_on_a_current_index_carries_no_staleness_block¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
The control on the wiring, matching the control on the messages. `status` reports `stale` unconditionally because that is its job; the INTERPRETATION must be absent when there is nothing to interpret, or it becomes a permanent banner and stops being read.
Verifies REQ-DDB-MCP-003 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
repo = tmp_path / "repo"repo.mkdir()
5 more
_mcp, state = servertarget = state.registry.register(str(repo))state.active = targetPath(target.db_path).write_bytes(rich_db.read_bytes())payload = await state.status(_FakeCtx())
When
- —
Then
- ✓ payload["stale"] is False
- ✓ payload does not contain "staleness"
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.
thread `clew-first-build-` — `_first_build_worker` (clew/mcp_server/server.py) · 31 of 142 steps
… 32 earlier steps
… 26 steps between
… 42 later steps
5 more
- Build, refresh and check the index · 31 of 153 steps
- `main` (scripts/stage_probe.py) · 30 of 37 steps
- clew — `main` (clew/cli.py) · 1 of 400 steps
- clew-mcp — `main` (clew/mcp_server/server.py) · 1 of 17 steps
- `main` (scripts/incremental_probe.py) · 1 of 3 steps
tests/test_mcp_server.py:843 · its file's page
What it checks (2)
assert payload["stale"] is False, "premise: the fixture index must be current"not attributedassert "staleness" not in payloadnot 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-003 | catalog | unknown |
| REQ-DDB-QUERY-006 | catalog | unknown |
| REQ-DDB-QUERY-008 | catalog | unknown |
| REQ-DDB-QUERY-009 | catalog | unknown |
Also reaches 7 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CONFIG-006 measured
- REQ-DDB-CONFIG-007 measured
- REQ-DDB-INDEX-003 measured
- REQ-DDB-MCP-001 measured
- REQ-DDB-MCP-002 measured
- REQ-DDB-MCP-004 measured
- REQ-DDB-PIPE-005 measured