Skip to content

Commit 0b200ef

Browse files
authored
Surface skipped conformance scenarios as baselined known failures (#3030)
1 parent b15b1d5 commit 0b200ef

4 files changed

Lines changed: 88 additions & 12 deletions

File tree

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,10 @@
2222

2323
client: []
2424

25-
server: []
25+
server:
26+
# SEP-2575 subscriptions/listen is not implemented yet; see the matching
27+
# entry in expected-failures.yml for the full rationale.
28+
- server-stateless
29+
# SEP-2243 Mcp-Param-* server-side validation is not implemented yet; see
30+
# the matching entry in expected-failures.yml for the full rationale.
31+
- http-custom-header-server-validation

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

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,40 @@
1212

1313
client: []
1414

15-
server: []
15+
server:
16+
# SEP-2575 subscriptions/listen is not implemented yet. The everything-
17+
# server's legacy resources/subscribe handlers make it advertise
18+
# `resources.subscribe` in server/discover, and as of conformance #372 a
19+
# server that advertises a subscription capability but answers
20+
# subscriptions/listen with -32601 fails the three listen MUST checks
21+
# ("Not testable") instead of skipping them. Remove this entry when the
22+
# listen runtime lands. NOTE: while listed, this entry also masks new
23+
# failures in the scenario's other 25 (currently passing) checks — the
24+
# baseline is per-scenario, not per-check.
25+
- server-stateless
26+
# SEP-2243 Mcp-Param-* server-side validation is not implemented yet. The
27+
# everything-server's `test_x_mcp_header` tool arms these checks (without an
28+
# x-mcp-header-annotated tool the harness skips all of them silently); the
29+
# accept-path checks pass, the reject-path checks fail until the server
30+
# validates Mcp-Param headers against body params. Read by the draft leg and
31+
# the bare `--suite all` leg; the 2026-07-28 leg carries its own entry.
32+
- http-custom-header-server-validation
33+
# SEP-2663 (io.modelcontextprotocol/tasks): the SDK does not implement the
34+
# tasks extension yet. These extension-tagged scenarios are selected only by
35+
# the bare `--suite all` leg — extension scenarios never match a
36+
# --spec-version filter and the active/draft suites exclude them — so these
37+
# entries are inert for the other legs that read this file.
38+
#
39+
# `tasks-status-notifications` is intentionally NOT listed: the harness
40+
# skips it unconditionally (pending its rewrite against subscriptions/
41+
# listen), and a baseline entry for a scenario with no failing checks is
42+
# flagged stale.
43+
- tasks-lifecycle
44+
- tasks-capability-negotiation
45+
- tasks-wire-fields
46+
- tasks-request-state-removal
47+
- tasks-mrtr-input
48+
- tasks-request-headers
49+
- tasks-dispatch-and-envelope
50+
- tasks-required-task-error
51+
- tasks-mrtr-composition

.github/workflows/conformance.yml

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ env:
1919
# Bump deliberately and reconcile both
2020
# .github/actions/conformance/expected-failures*.yml files in the same change.
2121
#
22-
# Temporarily pinned to the pkg.pr.new build of conformance main@b18aa918
23-
# (the merge of #371, which fixes the http-custom-headers fixture's
24-
# spec-forbidden `number`-typed x-mcp-header annotations) — no published
25-
# release includes it yet. Pinned by commit SHA so the tarball cannot move
26-
# under us; CONFORMANCE_PKG_SHA256 pins the bytes and the fetch-and-verify
27-
# step below downloads, checks the digest, and repoints CONFORMANCE_PKG at the
22+
# Temporarily pinned to the pkg.pr.new build of conformance main@4944b268
23+
# (0.2.0-alpha.8, which includes #372: fail checks whose prerequisite is
24+
# missing instead of skipping them) — alpha.8 is not published to npm yet.
25+
# Pinned by commit SHA so the tarball cannot move under us;
26+
# CONFORMANCE_PKG_SHA256 pins the bytes and the fetch-and-verify step below
27+
# downloads, checks the digest, and repoints CONFORMANCE_PKG at the
2828
# verified local copy. Repin to the next published @modelcontextprotocol/
29-
# conformance release (>0.2.0-alpha.7) once it ships, then drop
29+
# conformance release (>=0.2.0-alpha.8) once it ships, then drop
3030
# CONFORMANCE_PKG_SHA256 and the fetch-and-verify steps.
31-
CONFORMANCE_PKG: "https://pkg.pr.new/@modelcontextprotocol/conformance@b18aa918"
32-
CONFORMANCE_PKG_SHA256: "e9f6bc25085b4692e988cbdbd024a4203d54a52a6aaa065376cf8ecaa09bb680"
31+
CONFORMANCE_PKG: "https://pkg.pr.new/@modelcontextprotocol/conformance@4944b268"
32+
CONFORMANCE_PKG_SHA256: "0f70c035782d319d72ab427653c5275db5c50429d59fae0241a645b33aeda1a7"
3333

3434
jobs:
3535
server-conformance:
@@ -75,6 +75,22 @@ jobs:
7575
--suite all
7676
--spec-version 2026-07-28
7777
--expected-failures ./.github/actions/conformance/expected-failures.2026-07-28.yml
78+
- name: Run server conformance (all suite, extension scenarios)
79+
# A bare `--suite all` (no --spec-version) selects every scenario
80+
# shipped with the pinned harness — including the extension-tagged
81+
# tasks-* scenarios and pending-listed ones like server-sse-polling,
82+
# which no other leg reaches (extension scenarios never match a
83+
# --spec-version filter, and the pending list keeps them out of the
84+
# active suite). Running the full set keeps unimplemented surfaces
85+
# visible as baselined known failures in expected-failures.yml instead
86+
# of silent exclusions, and stays robust to scenarios moving between
87+
# harness suite lists across pin bumps. `--suite pending` would cover
88+
# the same union slightly faster; the full set is preferred for the
89+
# self-contained run and for parity with typescript-sdk's CI.
90+
run: >-
91+
./.github/actions/conformance/run-server.sh
92+
--suite all
93+
--expected-failures ./.github/actions/conformance/expected-failures.yml
7894
7995
client-conformance:
8096
runs-on: ubuntu-latest

examples/servers/everything-server/mcp_everything_server/server.py

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
import hmac
1212
import json
1313
import logging
14-
from typing import Any
14+
from typing import Annotated, Any
1515

1616
import click
1717
from mcp.server import ServerRequestContext
@@ -327,6 +327,24 @@ def test_error_handling() -> str:
327327
raise RuntimeError("This tool intentionally returns an error for testing")
328328

329329

330+
@mcp.tool()
331+
def test_x_mcp_header(
332+
region: Annotated[
333+
str,
334+
Field(
335+
description="Mirrored into the Mcp-Param-Region header",
336+
json_schema_extra={"x-mcp-header": "Region"},
337+
),
338+
] = "<none>",
339+
) -> str:
340+
"""Tests SEP-2243 Mcp-Param-* server-side validation.
341+
342+
Arms the http-custom-header-server-validation conformance scenario, which
343+
skips when no tool with an `x-mcp-header` annotation is found.
344+
"""
345+
return f"region={region}"
346+
347+
330348
@mcp.tool()
331349
async def test_missing_capability(ctx: Context) -> str:
332350
"""Tests that a handler-raised MISSING_REQUIRED_CLIENT_CAPABILITY surfaces as a top-level JSON-RPC error.

0 commit comments

Comments
 (0)