Repository navigation
mcp: return json-rpc error on stateful server serving protocolVersion20260728 requests - #1143
Merged
Merged
Conversation
…MCPGODEBUG flag to restore legacy plain-text rejection
nahapetyan-serob
approved these changes
Aug 5, 2026
blakebauman
added a commit
to fold-run/fold
that referenced
this pull request
Aug 26, 2026
fold serves the handshake era. The 2026-07-28 era is unreachable through it, because the SDK's streamable handler serves that revision only on stateless HTTP servers and fold runs stateful for session-keyed bridging. That was recorded for subscriptions/listen and pinned from the client side by listen_test.go — that a default-options SDK client falls back. A client is free not to be the SDK, so era_test.go pins the server side too: a raw request declaring the era, by header or by per-request _meta, must be refused rather than served. It deliberately does not pin how it is refused. v1.7.0 answers an HTTP 400 and the SDK's main branch returns a JSON-RPC error instead (modelcontextprotocol/go-sdk#1143), and a canary asserting the status would have failed on that bump for a reason nobody cares about — which is how a canary gets deleted rather than read. Being served is the drift; the shape of the refusal is not. Writing the canary corrected the premise it was built on. The claim it started from was that the era was already reachable via per-request _meta and that several gaps were therefore live. Testing it says otherwise: the transport refuses before fold's router sees anything, so those gaps are latent, and their ordering behind this canary is deliberate rather than neglectful. Roadmap item 13 plans to govern server-initiated requests, and this revision removed that mechanism — a server "MUST send server-to-client requests ... using the MRTR pattern. The previous pattern of server-initiated requests is no longer supported." The governance surface survives and its call site moves: an upstream now returns an input-required result rather than asking, so what the item governs is an inspection of inputRequests in a relayed result, not a handler on a bridged session, and the per-request handler check its design record argues for as the boundary has no meaning there. The bridged-session apparatus is recorded as what it is — a legacy-era compatibility layer, valuable for as long as handshake clients exist, and not the shape of what replaces it. README "Not implemented" gains what the era changes and fold has not: no advertised extensions, tasks/list and tasks/result federated though the redesigned extension removed them, resources/subscribe advertised and logging/setLevel handled though the revision retired both, and relayed results carrying no resultType of their own. Plus a separate entry for upstream ttlMs and cacheScope going unhonoured, which is structural — the SDK's paginating iterators consume the envelope those hints ride on, and state.ListCache.GetOrFill takes its TTL before the fill that would produce one. And the roadmap gains a deprecation table it never had. Sampling, roots, logging, and RFC 7591 dynamic client registration all carry an earliest removal of the first revision on or after 2027-07-28. The last row cuts against a plan rather than an implementation: Horizon 3 holds DCR as demand-gated, and building it now would be adopting something new implementations are told not to adopt. Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1130