test_sdk_shim_reaches_the_lowlevel_server_by_the_right_name¶
Tests › tests/test_mcp_server.py
What this test is for
Why it exists
The private attribute holding the low-level server was RENAMED between generations (`_mcp_server` → `_lowlevel_server`), and it is the only route to `NotificationOptions(tools_changed=True)` — without which a client is told `tools.listChanged=False` and never re-reads the tool list when tier-1 appears. That is the entire two-tier design, resting on one private attribute.
Verifies REQ-DDB-MCP-003 REQ-DDB-QUERY-006 REQ-DDB-QUERY-008 REQ-DDB-QUERY-009
Given
mcp = _sdk.MCPServer(name="probe")
When
low = _sdk.lowlevel(mcp)_sdk.lowlevel(object())
Then
- ✓ hasattr(low, "create_initialization_options") holds
- ✓ raises AttributeError
tests/test_mcp_server.py:496 · its file's page
What it checks (1)
assert hasattr(low, "create_initialization_options")observeslowlevelvialow
Where the product reaches it
main→build_server→lowlevel(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.
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 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-MCP-001 measured