Skip to content

[DRAFT] test(e2e): 2026-06 spec backlog — SEP-2260 + SEP-2575/2567 as expected-fail stubs - #2180

Closed
felixweinberger wants to merge 6 commits into
mainfrom
fweinberger/e2e-v2-2026-06-requirements
Closed

[DRAFT] test(e2e): 2026-06 spec backlog — SEP-2260 + SEP-2575/2567 as expected-fail stubs#2180
felixweinberger wants to merge 6 commits into
mainfrom
fweinberger/e2e-v2-2026-06-requirements

Conversation

@felixweinberger

Copy link
Copy Markdown
Contributor

Adds the first two chunks of the 2026-06 (draft) spec release to the e2e suite as 63 new requirements with deliberately-failing stub tests: SEP-2260 (server-request association) and the stateless/sessionless cluster (SEP-2575 + SEP-2567). No SDK code changes. Each requirement is marked as a knownFailure, so the matrix stays at 0 unexpected failures — the new cells are an executable, ordered todo list for the next spec release.

Stacked on the v2 e2e suite port (fweinberger/e2e-v2); the diff here is only requirements.ts + one stub scenario file.

Motivation and Context

The next spec release is large (stateless/sessionless core, MRTR, tasks-as-extension, plus a dozen smaller SEPs). Implementing it SEP-by-SEP would mean a handful of huge, hard-to-review PRs. This PR proposes the alternative: break each SEP into requirement-level assertions in requirements.ts, land them up front as failing stubs, and implement them gradually — one small, individually-testable behavior at a time, in a declared order.

The development loop per requirement: replace its stub with a real assertion → watch it fail → make the smallest SDK change that turns it green without breaking the existing 916 passing cells → delete the knownFailure → small PR named for the requirement(s). The suite is the ledger: "what's left" is the expected-fail count.

How we avoid one giant stateless PR — the NotImplemented gate. The first implementation sub-batch (G0) makes only this true: a client and server can agree on the 2026 version, and once they have, every operation on that negotiated path fails fast with a NotImplemented error. 2025 clients on the same server are completely unaffected (dual-stack: both doors stay open). Every subsequent sub-batch then replaces one NotImplemented throw with real behavior and turns its requirements green — so each piece of 2026 work has a precise, pre-existing integration point, every PR stays small, and at every moment the SDK is honest about what it supports.

Proposed implementation order (each row = one or a few small PRs):

# Sub-batch Reqs What turns green API decisions forced
P0 SEP-2260 association (current spec — can start immediately, in parallel) 6 server→client requests ride the originating request's stream; client rejects unsolicited
G0 Groundwork: version pinning, 2026 negotiable, NotImplemented gate 4 2026 negotiable; gated paths fail fast; handlers can read the operative version server version-mode option
S1 server/discover + version errors 5 discover; -32004 + supported[]; client retry/downgrade discover client API; version selection
S2 Client _meta envelope stamping 5 every outbound 2026 request self-describes
S3 Server envelope acceptance + enforcement 6 missing/mismatched envelope rejected; per-request capabilities
S4 Backward-compat probe matrix 4 discover→initialize fallback; mixed-era traffic on one pipe
S5 Sessionless + stateless HTTP 12 no session header; GET 405; no batching; per-request auth; list invariance 2026 hosting entry point
S6 Removed RPCs + per-request logging 6 ping/subscribe/setLevel/initialize → -32601 under 2026; logLevel opt-in logging surface
S7 subscriptions/listen 10 the replacement notification channel listen client/server API
S8 Cancellation / SSE-close semantics 4 close==cancel; stdio cancellation
S9 Roots via MRTR 1 lands with the MRTR (SEP-2322) series

After S8 the stateless cluster is complete and the gate is gone. MRTR (SEP-2322), extensions (SEP-2133), and tasks (SEP-2663) follow as their own requirement sets using the same pattern — MRTR staged progressively (tool calls without elicitation → MRTR-native elicitation → await-form emulated over MRTR).

Notes on mechanics:

  • Behaviors carry their [SEP-XXXX] and the acceptance-criteria row reference (R-…), so each entry traces back to the spec clause it asserts.
  • Stubs register on a single representative transport for now; transports broaden (and addedInSpecVersion version-gating is added) as each sub-batch is implemented.
  • Picking up work: choose the lowest-numbered sub-batch with red cells, pick a requirement, replace its stub, implement, drop the knownFailure.

How Has This Been Tested?

Full e2e suite on this branch: 32 files, 916 passed + 131 expected-fail (1047 cells), 0 unexpected failures, ~20s. The 63 new cells are all expected-fail stubs (68 → 131). Typecheck, eslint, and prettier clean.

Breaking Changes

None — test-only. No SDK code or published package is touched.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

  • Requirement wording is derived from the per-SEP acceptance-criteria breakdown of the 2025-11-25 → draft spec diff (the same source that will drive the MRTR/extensions/tasks requirement sets).
  • [DRAFT] on purpose: this PR is the proposal for how the release gets implemented as much as it is the first slice of it. Feedback wanted on (a) the requirement granularity, (b) the sub-batch order, and (c) the NotImplemented-gate approach to keeping the stateless cluster incremental.

Unmodified copy of test/e2e from the v1.x e2e suite (requirements manifest,
verifies()-style scenario tests, helpers, fixtures). Does not type-check or run
against this branch yet; import paths and v2 API adaptation follow in separate
commits.
Map the old deep-path imports onto the v2 workspace packages (client, server,
core, node, express), apply the v1-to-v2 codemod renames, and add the test/e2e
workspace wiring (package.json, tsconfig, vitest and eslint config).
Fix the remaining type and lint errors against the v2 packages, update the
manifest for v2 behavior changes (knownFailures added, removed, or reworded),
and defer requirements whose v1 surface no longer exists (legacy McpServer
overloads, the bundled OAuth authorization server, callTool result schemas).
Rewrite the suite CLAUDE.md for the manifest/verifies structure and pnpm
commands.
Cover Standard Schema and fromJsonSchema validation, the Hono, Fastify and
Express hosting adapters, custom method handlers, the structured handler
context, the new error hierarchy, AuthProvider on the HTTP client transport,
reconnection scheduling, protocol version and capability options, and failed
task results. New requirements are recorded in the manifest with knownFailures
where the SDK does not yet meet the documented behavior.
…67 as expected-fail stubs

63 new requirements covering SEP-2260 (server-request association) and the
stateless/sessionless cluster (SEP-2575 + SEP-2567), each cited by a
deliberately-failing stub in scenarios/spec-2026-06-stubs.test.ts and marked
as a knownFailure. No SDK changes; matrix stays at 0 unexpected failures
(916 pass + 131 expected-fail). Sub-batch labels (P0, G0, S1-S9) give the
proposed implementation order.
@changeset-bot

changeset-bot Bot commented May 29, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 32d36b5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented May 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@2180

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/codemod@2180

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@2180

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@2180

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/fastify@2180

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@2180

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@2180

commit: 32d36b5

@felixweinberger

Copy link
Copy Markdown
Contributor Author

Closing for now — the requirement entries and the sub-batch plan will come back as part of the milestone-by-milestone implementation PRs (tracked in #2184#2187 and the 2026-07-28 Spec Implementation project) rather than as one stub drop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant