Skip to content

Run the dual-era e2e specs under the conformant Accept header #6104

Description

@JAORMX

Context

Both MCP revisions MUST send Accept: application/json, text/event-stream on streamable-HTTP POSTs. The dual-era e2e specs (test/e2e/vmcp_dual_era_test.go) deliberately omit it, so the ToolHive proxy answers plain JSON — meaning the transport bridge is only proven under a non-conformant Accept header.

The original reason was that e2e.RawMCPClient had no SSE response parser. #6033 removed that limitation (sseResponsePayload parses SSE-framed POST responses on every client path), so the specs can now flip to the conformant header via WithStreamableAccept().

Why a separate PR

Flipping the header changes the response framing of every Legacy spec in the file from plain JSON to SSE (go-sdk's streamable handler switches on the header; the Modern dispatcher always answers application/json). These specs run only in CI, and SSE framing has surprised us before (rehydrated vMCP sessions answering SSE regardless of Accept). The flip deserves its own change where a red run is unambiguous, rather than riding an XL PR.

What to do

  • Add WithStreamableAccept() to the dual-era specs (and any other RawMCPClient e2e specs proving the bridge).
  • Assert the response content is identical under both Accept values for at least one Legacy and one Modern spec, pinning the framing switch itself.
  • Remove the "known harness limitation" header comment in vmcp_dual_era_test.go.

Surfaced by review on #6033. Refs #5743.

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue needs initial triage by a maintainer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions