Skip to content

Bridge era-mismatched client×backend cells in vMCP + live dual-era e2e #5912

Closed

Description

@jhrozek

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.

Activity

  1. added
    needs-triage
    on Jul 22, 2026
  2. self-assigned this
    on Jul 25, 2026
  3. removed
    needs-triage
    on Jul 25, 2026
  4. jhrozek commented on Jul 25, 2026

    @jhrozek
    ContributorAuthor

    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.

    If #5993 merges before this work finishes:

    • 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.
    • Reuse mcpparser.StripReservedModernMeta on 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).
    • The module is on go-sdk v1.7 now, so the e2e no longer needs the out-of-process-only workaround adopted purely to avoid importing v1.7.

    If this work finishes before #5993 merges:

    Either way:

    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.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions