You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bridge era-mismatched client×backend cells in vMCP + live dual-era e2e #5912
Part of #5756. Design: RFC THV-0083 (D3, Phase 4, Testing Strategy); arch doc §"The dual-era matrix" + §"Testing strategy". Mirrors the transport-proxy e2e issue #5837.
Bridge the two era-mismatched client×backend cells RFC-0081 defers to vMCP, and close with a live dual-era e2e suite. Both cells are single-request-scoped on one pod — no durable store required.
Changes
Legacy-client → Modern-backend (easy cell): terminate the client session with existing machinery, re-originate stateless calls downstream (no Mcp-Session-Id).
Modern-client → Legacy-backend (hard cell, confused-deputy boundary): synthesize and hold a backend session for the duration of the single request (pod-local; ephemeral for a bare tool call), initialized with the calling principal's per-request outgoing auth (existing OBO / header-injection / token-exchange strategies), partitioned by (principal, backend) — never shared across principals.
Live dual-era e2e suite: out-of-process go-sdk v1.7 peers (do NOT import go-sdk v1.7 into the module — run separate binaries/containers over the wire, as the Add MCP conformance CI job for thv run proxy #5806 conformance job does) plus a raw-HTTP client; exercise all four matrix cells; concurrency- and confidentiality-focused.
Dependencies
#5910 (server-side Modern path) and #5911 (client-side per-backend dual protocol).
Verification
Both bridge cells end-to-end.
Hard cell: (principal, backend) partition prevents cross-principal session reuse; the synthesized initialize presents the calling principal's OBO, not a shared vMCP identity.
Legacy↔Legacy and Modern↔Modern cells; concurrency cross-delivery safety.
Notes
Split into PRs: easy cell, hard cell, e2e suite. The hard cell is security-critical and should not share a PR with anything else.
Heads-up: coordinate with #5993 (go-sdk v1.7 adoption) — it rewrites the client-edge classification this issue builds on
PR #5993 (adopt-go-sdk-v1.7) is in review. It bumps toolhive-core to v0.0.34 (go-sdk v1.6.1 → v1.7.0-pre.3) and reworks client-edge backend-revision classification — touching the same files the bridge cells here will: pkg/vmcp/client/client.go, pkg/vmcp/client/modern.go, pkg/vmcp/session/internal/backend/mcp_session.go, pkg/mcp/revision.go. So the order these land in matters.
Detect backend era by whether server/discover advertises 2026-07-28 in supportedVersions (SEP-2575) — not the old "any clean server/discover ⇒ Modern" heuristic (which Support MCP 2026-07-28 spec (go-sdk v1.7 via toolhive-core) #5993 removes because under real v1.7 stateful 2025-11-25 backends also answer discover, negotiating down). Route the negotiate-down case through the new errModernNegotiatedDown sentinel + the existing reclassify-on-mismatch machinery.
Bottom line: the backend-classification design is changing under this issue via #5993, so isolate the bridge from classification internals and expect to re-key on supportedVersions.
Activity
jhrozek commentedon Jul 25, 2026
Heads-up: coordinate with #5993 (go-sdk v1.7 adoption) — it rewrites the client-edge classification this issue builds on
PR #5993 (
adopt-go-sdk-v1.7) is in review. It bumpstoolhive-coretov0.0.34(go-sdk v1.6.1 → v1.7.0-pre.3) and reworks client-edge backend-revision classification — touching the same files the bridge cells here will:pkg/vmcp/client/client.go,pkg/vmcp/client/modern.go,pkg/vmcp/session/internal/backend/mcp_session.go,pkg/mcp/revision.go. So the order these land in matters.If #5993 merges before this work finishes:
server/discoveradvertises2026-07-28insupportedVersions(SEP-2575) — not the old "any cleanserver/discover⇒ Modern" heuristic (which Support MCP 2026-07-28 spec (go-sdk v1.7 via toolhive-core) #5993 removes because under real v1.7 stateful 2025-11-25 backends also answer discover, negotiating down). Route the negotiate-down case through the newerrModernNegotiatedDownsentinel + the existing reclassify-on-mismatch machinery.mcpparser.StripReservedModernMetaon the synthesized Legacy-backend egress in the Modern-client→Legacy-backend cell — don't hand-roll a second stripper (Support MCP 2026-07-28 spec (go-sdk v1.7 via toolhive-core) #5993 adds this helper).If this work finishes before #5993 merges:
go.mod/ import go-sdk v1.7 — Support MCP 2026-07-28 spec (go-sdk v1.7 via toolhive-core) #5993 owns that bump; a second one is an MVS conflict.Revisionvalue), not offprobeRevision's current heuristic internals, so Support MCP 2026-07-28 spec (go-sdk v1.7 via toolhive-core) #5993's rework doesn't invalidate it. Expect a rebase.Either way:
_metahandling here overlaps Strip reserved io.modelcontextprotocol/* keys from backend response _meta (shared Legacy+Modern helper) #5986 (strip reservedio.modelcontextprotocol/*keys on backend→client) — coordinate so the two don't strip in different places.Bottom line: the backend-classification design is changing under this issue via #5993, so isolate the bridge from classification internals and expect to re-key on
supportedVersions.