Skip to content

Conversation

@tomatyss
Copy link
Owner

@tomatyss tomatyss commented Jan 2, 2026

No description provided.

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

src/mcp/mod.rs Outdated
Comment on lines 578 to 580
assert!(
!response.contains("Content-Length:"),
"line-delimited response should not include headers"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Correct Content-Length round-trip expectation

The content_length_round_trip test asserts that a request framed with Content-Length should receive a headerless, newline-terminated response, but serve_stream deliberately emits Content-Length headers whenever the request includes headers (see lines 487-506). As written, this assertion will always fail when the ping is framed per MCP (with Content-Length), breaking the test suite rather than checking the real behavior.

Useful? React with 👍 / 👎.

src/mcp/mod.rs Outdated
Comment on lines 612 to 614
assert!(
response.contains("Content-Length:"),
"response missing Content-Length header"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Fix line-delimited response framing assertion

For a line-delimited ping request, serve_stream skips headers and replies with just the JSON body plus a trailing newline (it only adds Content-Length when headers were present in the request), but this test asserts that the response must contain a Content-Length header. That inverted expectation will make the test fail on every run, preventing CI from validating the intended no-header fallback path.

Useful? React with 👍 / 👎.

@tomatyss tomatyss merged commit 7a44eab into main Jan 3, 2026
1 check passed
@tomatyss tomatyss deleted the mcp-stdio-server branch January 3, 2026 01:03
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.

2 participants