Repository navigation
[Server] Accept a POST without requests with 202 and no body - #597
Merged
chr-hertel merged 1 commit intoOct 14, 2026
Merged
chr-hertel merged 1 commit into
chr-hertel merged 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
The stacked diff includes cross-transport concurrency changes and public API breaks that warrant final human validation.
0 open findings
What changed in this PR
Ensures response/notification-only HTTP POSTs return 202 Accepted without draining queued session messages, atop concurrency fixes from #581.
Changes:
- Return an empty
202when a POST produces no request responses. - Use UUID outbound request IDs and transport-specific fiber queues.
- Expand HTTP, stdio, timeout, and concurrency coverage.
| File | Description |
|---|---|
src/Server/Transport/StreamableHttpTransport.php |
Preserves queued messages for response/notification-only POSTs. |
src/Server/Protocol.php |
Adds UUID IDs and per-transport outgoing queues. |
src/Server/Transport/StdioTransport.php |
Polls UUID-based requests. |
src/Server/Transport/BaseTransport.php |
Updates response lookup to UUIDs. |
src/Server/Transport/TransportInterface.php |
Updates callback contracts. |
src/Server/Transport/ManagesTransportCallbacks.php |
Updates callback type declarations. |
tests/Unit/Server/Transport/StreamableHttpTransportTest.php |
Tests 202 responses and queue preservation. |
tests/Unit/Server/Transport/StdioSuspendedFibersTest.php |
Tests dynamically generated request IDs. |
tests/Unit/Server/ProtocolTest.php |
Covers UUID and stream-isolation behavior. |
tests/Unit/Server/ProtocolSessionRaceTest.php |
Updates race tests for UUID IDs. |
tests/Unit/Fixtures/PollingLoopTransport.php |
Exposes stream-specific outgoing messages. |
CHANGELOG.md |
Documents fixes and breaking API changes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
chr-hertel
force-pushed
the
fix-post-drains-outgoing-queue
branch
from
October 14, 2026 22:56
e7a9988 to
912779d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #581 - merge after it, only the last commit belongs here.
A POST carrying only responses or notifications was answered with
200and the session's queued messages (e.g.resources/updated), while the spec requires202 Acceptedwith no body.createJsonResponse()answers such a POST with202and no body, without draining the outgoing queuePart of chr-hertel#73
Delivering session-wide messages on a plain request (it still answers with a JSON array) is still open.
🤖 Generated with Claude Code