Skip to content

test(mcp): add stdout regression test for devkit mcp - #101

Merged
5uck1ess merged 1 commit into
mainfrom
fix/mcp-stdout-regression-test
May 19, 2026
Merged

test(mcp): add stdout regression test for devkit mcp#101
5uck1ess merged 1 commit into
mainfrom
fix/mcp-stdout-regression-test

Conversation

@5uck1ess

Copy link
Copy Markdown
Owner

Summary

  • Adds src/cmd/mcp_test.go — spawns the real devkit binary, sends an initialize JSON-RPC request over stdin, and asserts stdout carries only valid JSON-RPC frames.
  • Regression guard for the stdout-contamination bug Codex hit (connection closed: initialize response): any stray Println or banner on stdout breaks the MCP handshake.
  • Also asserts the ready banner does not leak to stdout (it belongs on stderr).

Test plan

  • go test ./cmd/ -run TestMCPStdoutIsCleanJSONRPC -v passes locally
  • CI green

Spawns the real binary, sends an initialize JSON-RPC request, and
asserts stdout carries only valid JSON-RPC frames. Guards against
stray Println / banner output on stdout, which breaks the MCP
handshake (the bug Codex hit with "connection closed: initialize
response").
@5uck1ess
5uck1ess merged commit aaa80f7 into main May 19, 2026
6 checks passed
@5uck1ess
5uck1ess deleted the fix/mcp-stdout-regression-test branch May 19, 2026 20:41
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.

1 participant