Skip to content

Commit 984ad41

Browse files
committed
Correct PROTOCOL_VERSION comment for harness per-scenario default
When --spec-version is omitted, the conformance harness picks the version per-scenario (LATEST_SPEC_VERSION for active scenarios, DRAFT_PROTOCOL_VERSION for draft-only ones), not a flat LATEST_SPEC_VERSION. The variable is still log-only today, but the stateless 2026 client path will branch on it.
1 parent 4472428 commit 984ad41

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

.github/actions/conformance/client.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@
77
- MCP_CONFORMANCE_SCENARIO env var -> scenario name
88
- MCP_CONFORMANCE_CONTEXT env var -> optional JSON (for client-credentials scenarios)
99
- MCP_CONFORMANCE_PROTOCOL_VERSION env var -> spec version the harness mock
10-
server is speaking (e.g. "2025-11-25", "2026-07-28"). Always set; defaults
11-
to the harness's LATEST_SPEC_VERSION when --spec-version is omitted.
10+
server is speaking (e.g. "2025-11-25", "2026-07-28"). Always set; when
11+
--spec-version is omitted the harness picks per-scenario (LATEST_SPEC_VERSION
12+
for active scenarios, DRAFT_PROTOCOL_VERSION for draft-only ones).
1213
- Server URL as last CLI argument (sys.argv[1])
1314
- Must exit 0 within 30 seconds
1415
@@ -54,10 +55,11 @@
5455
logger = logging.getLogger(__name__)
5556

5657
#: Spec version the harness is running this scenario at (e.g. "2025-11-25",
57-
#: "2026-07-28"). The harness always sets this (it falls back to its own
58-
#: LATEST_SPEC_VERSION when --spec-version is omitted), so None means we were
59-
#: invoked outside the harness. Handlers that need to take the stateless 2026
60-
#: path will branch on this once the SDK has one; today it is logged only.
58+
#: "2026-07-28"). The harness always sets this (when --spec-version is omitted
59+
#: it picks per-scenario: LATEST_SPEC_VERSION for active scenarios,
60+
#: DRAFT_PROTOCOL_VERSION for draft-only ones), so None means we were invoked
61+
#: outside the harness. Handlers that need to take the stateless 2026 path will
62+
#: branch on this once the SDK has one; today it is logged only.
6163
PROTOCOL_VERSION: str | None = os.environ.get("MCP_CONFORMANCE_PROTOCOL_VERSION")
6264

6365
# Type for async scenario handler functions

0 commit comments

Comments
 (0)