Skip to content

Use conformant Accept in dual-era e2e - #6123

Open
kocaemre wants to merge 1 commit into
stacklok:mainfrom
kocaemre:test/conformant-dual-era-accept
Open

Use conformant Accept in dual-era e2e#6123
kocaemre wants to merge 1 commit into
stacklok:mainfrom
kocaemre:test/conformant-dual-era-accept

Conversation

@kocaemre

Copy link
Copy Markdown

Summary

  • The dual-era e2e specs were still proving vMCP bridge behavior without the streamable-HTTP Accept: application/json, text/event-stream header that both MCP revisions require.
  • Add WithStreamableAccept() to the vMCP dual-era bridge and concurrent-mixing specs so those proxy paths now run under conformant request headers.
  • Add a vMCP bridge assertion that Legacy and Modern response content is identical with and without the SSE-capable Accept header, and update RawMCPClient comments/tests now that SSE response parsing is available.

Fixes #6104

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Dependency update
  • Documentation
  • Other (describe): E2E coverage hardening

Test plan

  • Unit tests (task test)
  • E2E tests (task test-e2e)
  • Linting (task lint-fix)
  • Manual testing (describe below)

Manual testing:

  • PATH=/usr/local/go/bin:/root/go/bin:$PATH go test ./test/e2e -run 'TestRawClientBuilders/no_Accept|TestRawClientSSEResponse'
  • PATH=/usr/local/go/bin:/root/go/bin:$PATH go test -race ./test/e2e -run 'TestRawClientBuilders/no_Accept|TestRawClientSSEResponse'
  • PATH=/usr/local/go/bin:/root/go/bin:$PATH task build
  • PATH=/usr/local/go/bin:/root/go/bin:$PATH THV_BINARY=$PWD/bin/thv TOOLHIVE_DEV=true TEST_TIMEOUT=15m LABEL_FILTER='vmcp && dual-era' ./test/e2e/run_tests.sh — 7 passed, 0 failed, 500 skipped
  • PATH=/usr/local/go/bin:/root/go/bin:$PATH task lint
  • git diff --check

Note: I also tried go test ./test/e2e before exporting THV_BINARY; it failed because the full e2e suite could not find thv on $PATH. The labeled e2e run above used the freshly built bin/thv and passed.

API Compatibility

  • This PR does not break the v1beta1 API, OR the api-break-allowed label is applied and the migration guidance is described above.

Changes

File Change
test/e2e/vmcp_dual_era_test.go Run the vMCP dual-era bridge specs with conformant Accept and add plain-vs-SSE content parity coverage.
test/e2e/dual_era_mixing_test.go Run concurrent mixed-era proxy traffic with conformant Accept.
test/e2e/mcp_raw_client.go Update RawMCPClient comments for proxy-bound conformant Accept usage.
test/e2e/mcp_raw_client_test.go Update the no-default-Accept assertion message.

Does this introduce a user-facing change?

No.

Special notes for reviewers

The production behavior is unchanged. This only flips test traffic to the spec-required Accept header now that RawMCPClient can parse SSE-framed POST responses.

Signed-off-by: Emre K <110906681+kocaemre@users.noreply.github.com>
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.

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

1 participant