Skip to content

Bound MCP HTTP request admission - #143

Merged
lynnswap merged 1 commit into
mainfrom
codex/mcp-request-admission-bounds-pr
Aug 22, 2026
Merged

Bound MCP HTTP request admission#143
lynnswap merged 1 commit into
mainfrom
codex/mcp-request-admission-bounds-pr

Conversation

@lynnswap

@lynnswap lynnswap commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Purpose

Bound MCP HTTP request admission while preserving SwiftNIO as the sole inbound FIFO and read-backpressure owner.

Changes

  • Admit each request at its HTTP head and install a cancellation-aware body receipt before further processing.
  • Atomically mark non-keepalive and error requests as the final request for the connection so later side effects cannot be admitted.
  • Add a finite request-body limit for declared and chunked bodies, returning an owned 413 response at the boundary.
  • Send supported HTTP/1.1 100 Continue as an informational head through the standard NIO pipeline; ignore it for HTTP/1.0 and own unsupported expectations as 417 responses.
  • Keep the standard NIO pipelining handler as the only request-order and socket-read owner.

Testing

  • Strict MCP and Host suites repeated 5 times
  • Slow POST, open GET, cross-connection parallelism, non-keepalive, bounded pipeline, body N/N+1, and Expect tests
  • swift test --build-system swiftbuild --no-parallel
  • Compatibility consumer, API, and MCP gates
  • ReviewMonitor xcodebuild test (15 tests)
  • Independent exact-diff audit

Screenshots

Not applicable.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for security reviews. Please try again later.

@lynnswap lynnswap changed the title fix(mcp): bound HTTP request admission Bound MCP HTTP request admission Aug 22, 2026
@lynnswap

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. What shall we delve into next?

Reviewed commit: 8c1d9ca5d6

ℹ️ 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".

@lynnswap
lynnswap merged commit c0bb190 into main Aug 22, 2026
2 checks passed
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