Skip to content

Commit 644745c

Browse files
committed
C3: remove server-stateless from conformance baselines; C2: TODO-anchor audit
Conformance @ 65fcd39: server-stateless 25/25 SUCCESS, 0 FAILURE. Removed from both expected-failures files along with two stale entries that now pass (input-required-result-validate-input, input-required-result-missing-input-response). http-header-validation stays baselined (SEP-2243 Mcp-Method/Mcp-Name cross-check is separate work). TODO comments in S2-touched files now cite their CLEANUP-LEDGER row; _requirements.py drops the deleted SingleExchangeDispatcher class name from its prose constant.
1 parent bf0dd7f commit 644745c

8 files changed

Lines changed: 14 additions & 40 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit 6efb06938eae0258f986a540a9c612006b12fd6c

.github/actions/conformance/expected-failures.2026-07-28.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,6 @@ server:
6969
- json-schema-2020-12
7070

7171
# --- Draft scenarios (same failures and reasons as the `--suite draft` leg) ---
72-
# SEP-2575 (stateless HTTP / _meta envelope): server has no stateless mode,
73-
# _meta-derived capabilities, error-code mappings, or server/discover yet.
74-
- server-stateless
7572
# SEP-2322 (multi-round-trip requests / IncompleteResult): not implemented.
7673
- input-required-result-basic-elicitation
7774
- input-required-result-basic-sampling
@@ -83,14 +80,6 @@ server:
8380
- input-required-result-result-type
8481
- input-required-result-tampered-state
8582
- input-required-result-capability-check
86-
- input-required-result-validate-input
87-
# SEP-2243 (HTTP header standardization): -32020 HeaderMismatch handling and
88-
# case-insensitive/whitespace-trimmed header validation not implemented.
83+
# SEP-2243 (HTTP header standardization): Mcp-Method / Mcp-Name cross-check
84+
# against the request body is not implemented.
8985
- http-header-validation
90-
91-
# --- WARNING-only entries ---
92-
# These scenarios emit no FAILURE checks, only SHOULD-level WARNINGs, but
93-
# the expected-failures evaluator counts WARNINGs as failures. Same entries
94-
# as the draft suite in expected-failures.yml.
95-
# SEP-2322 SHOULD-level behaviour (re-request missing inputResponses).
96-
- input-required-result-missing-input-response

.github/actions/conformance/expected-failures.yml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,7 @@ client:
3434

3535
server:
3636
# --- Draft-spec scenarios (in `--suite draft`; the `active` suite is green) ---
37-
# SEP-2575 (stateless HTTP / _meta envelope): server has no stateless mode,
38-
# _meta-derived capabilities, error-code mappings, or server/discover yet.
39-
- server-stateless
40-
# SEP-2322 (multi-round-trip requests / IncompleteResult): not implemented;
41-
# most scenarios currently fail early with "Missing session ID" because
42-
# mcp-everything-server only runs in stateful mode.
37+
# SEP-2322 (multi-round-trip requests / IncompleteResult): not implemented.
4338
- input-required-result-basic-elicitation
4439
- input-required-result-basic-sampling
4540
- input-required-result-basic-list-roots
@@ -50,17 +45,6 @@ server:
5045
- input-required-result-result-type
5146
- input-required-result-tampered-state
5247
- input-required-result-capability-check
53-
# SEP-2243 (HTTP header standardization): -32020 HeaderMismatch handling and
54-
# case-insensitive/whitespace-trimmed header validation not implemented.
48+
# SEP-2243 (HTTP header standardization): Mcp-Method / Mcp-Name cross-check
49+
# against the request body is not implemented.
5550
- http-header-validation
56-
# WARNING-only entries: these scenarios emit no FAILURE checks, only SHOULD-level
57-
# WARNINGs, but the expected-failures evaluator counts WARNINGs as failures.
58-
# SEP-2322 SHOULD-level behaviour (re-request missing inputResponses).
59-
- input-required-result-missing-input-response
60-
# SEP-2322 negative-case scenarios: input-required-result-validate-input is
61-
# now baselined (added when the stateless path landed — the stateless server
62-
# reaches the handler, so the previous accidental pass via -32600 "Missing
63-
# session ID" no longer applies). input-required-result-unsupported-methods
64-
# is intentionally NOT baselined: it still passes for now; add it once it
65-
# starts failing for real.
66-
- input-required-result-validate-input

src/mcp/server/connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def check_capability(self, capability: ClientCapabilities) -> bool:
320320
321321
Returns `False` when no client info has been recorded.
322322
"""
323-
# TODO(L29): redesign - mirrors v1 ServerSession.check_client_capability
323+
# TODO(L53): redesign - mirrors v1 ServerSession.check_client_capability
324324
# verbatim for parity.
325325
if self.client_params is None:
326326
return False

src/mcp/server/lowlevel/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,7 @@ def get_notification_handler(self, method: str) -> HandlerEntry[LifespanResultT]
310310
"""Return the registered entry for a notification method, or `None`."""
311311
return self._notification_handlers.get(method)
312312

313-
# TODO: Rethink capabilities API. Currently capabilities are derived from registered
313+
# TODO(L53): Rethink capabilities API. Currently capabilities are derived from registered
314314
# handlers but require NotificationOptions to be passed externally for list_changed
315315
# flags, and experimental_capabilities as a separate dict. Consider deriving capabilities
316316
# entirely from server state (e.g. constructor params for list_changed) instead of

src/mcp/server/runner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ async def _inner() -> HandlerResult:
245245
_methods.validate_client_request(method, version, params)
246246
except KeyError:
247247
raise MCPError(code=METHOD_NOT_FOUND, message="Method not found", data=method) from None
248-
# TODO(maxisbey): the 2026-07-28 spec drops the handshake; this branch and
248+
# TODO(L29): the 2026-07-28 spec drops the handshake; this branch and
249249
# the gate become a per-version legacy path then. Initialize runs inline
250250
# (read loop parked), so awaiting the peer anywhere on this path deadlocks.
251251
if method == "initialize":
@@ -272,7 +272,7 @@ async def _inner() -> HandlerResult:
272272

273273
call = self._compose_server_middleware(ctx, method, params, _inner)
274274
result = _dump_result(await call())
275-
# TODO: reject resultType values outside {"complete", "input_required"} unless the
275+
# TODO(L56): reject resultType values outside {"complete", "input_required"} unless the
276276
# corresponding extension is in this request's _meta clientCapabilities.extensions; the
277277
# explicit MUST-reject is client-side (basic/index.mdx ResultType), this enforces it proactively.
278278
if is_spec_method:

src/mcp/shared/jsonrpc_dispatcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,7 @@ async def _handle_request(
707707
await self._write_error(req.id, error)
708708
else:
709709
logger.exception("handler for %r raised", req.method)
710-
# TODO(maxisbey): code=0 pins existing-server compat; JSON-RPC says
710+
# TODO(L19): code=0 pins existing-server compat; JSON-RPC says
711711
# INTERNAL_ERROR. Revisit per the suite's divergence entry.
712712
await self._write_error(req.id, ErrorData(code=0, message=str(e)))
713713
if self._raise_handler_exceptions:

tests/interaction/_requirements.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@
9797
)
9898

9999
_MODERN_NOTIFY_DROP = (
100-
"SingleExchangeDispatcher.notify() no-ops on the modern streamable-http driver; handler-emitted "
101-
"logging/progress notifications never reach the per-request SSE response. Passes once SSE "
102-
"response mode lands."
100+
"The modern single-exchange dispatch context no-ops notify() on the streamable-http driver; "
101+
"handler-emitted logging/progress notifications never reach the per-request SSE response. "
102+
"Passes once SSE response mode lands."
103103
)
104104

105105

0 commit comments

Comments
 (0)