test_activate_tier1_notifies_tool_list_changed¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
Activation registers the tools AND fires tools/list_changed exactly once (asserted through the fake session, never a live transport).
Verifies REQ-DDB-MCP-001 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
mcp, state = serverctx = _FakeCtx()names = await state._activate_tier1(ctx)
When
- —
Then
- ✓ set(names) equals set(TIER1_TOOLS)
- ✓ state.tier1_active is True
- ✓ ctx.session.notifications equals 1
- ✓ set(TIER1_TOOLS) is at most await _names(mcp)
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
… 22 earlier steps
… 104 steps between
… 9 later steps
1 more
- clew-mcp — `main` (clew/mcp_server/server.py) · 3 of 17 steps
tests/test_mcp_server.py:580 · its file's page
What it checks (4)
assert set(names) == set(TIER1_TOOLS)not attributedassert state.tier1_active is Truenot attributedassert ctx.session.notifications == 1not attributedassert set(TIER1_TOOLS) <= await _names(mcp)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 3 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-003 measured
- REQ-DDB-MCP-004 measured
- REQ-DDB-WIKI-054 measured