[Server] Keep inbound request intact when queueing an outbound one - #486
Open
chr-hertel wants to merge 1 commit into
Open
[Server] Keep inbound request intact when queueing an outbound one#486chr-hertel wants to merge 1 commit into
chr-hertel wants to merge 1 commit into
Conversation
chr-hertel
requested review from
CodeWithKyrian,
Nyholm and
soyuka
as code owners
August 29, 2026 08:31
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The targeted fix is correct and adequately covered by the regression test.
Pull request overview
Preserves the inbound request during outbound fiber suspension so failures retain the correct response ID.
Changes:
- Uses a distinct
$outboundRequestvariable. - Adds regression coverage for transport attachment failures.
File summaries
| File | Description |
|---|---|
src/Server/Protocol.php |
Prevents overwriting the inbound request. |
tests/Unit/Server/ProtocolTest.php |
Verifies errors use the inbound request ID. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Protocol::handleRequest()reassigned$requestto the outbound (id-less) request when a fiber suspends, so a failure while queueing it hit an uninitializedRequest::$idin the catch blocks instead of answering under the inbound request's id.Renames the local and adds a regression test.