Repository navigation
[Server] Replace fiber suspension arrays with typed VOs - #557
Open
chr-hertel wants to merge 1 commit into
Open
chr-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
October 8, 2026 00:04
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
An existing regression test still yields an array and silently bypasses the outbound dispatch behavior it should cover.
1 open finding
What changed in this PR
Replaces server-side fiber suspension arrays with typed value objects, simplifying dispatch while leaving client-side suspensions unchanged.
Changes:
- Adds typed notification and request suspension objects.
- Updates gateway producers, protocol consumers, and transport type annotations.
- Adapts tests and adds outgoing-queue coverage.
| File | Description |
|---|---|
| tests/Unit/Server/ProtocolTest.php | Adds typed suspension dispatch tests. |
| tests/Unit/Server/InputRequiredShimTest.php | Checks typed request suspensions. |
| tests/Unit/Server/ClientGatewayTest.php | Updates suspension assertions. |
| src/Server/Transport/TransportInterface.php | Updates the suspension type alias. |
| src/Server/Suspension/RequestSuspension.php | Defines the request suspension object. |
| src/Server/Suspension/NotificationSuspension.php | Defines the notification suspension object. |
| src/Server/Stateless/StatelessProtocol.php | Consumes typed suspension objects. |
| src/Server/Protocol.php | Replaces array checks with object checks. |
| src/Server/ClientGateway.php | Produces typed suspension objects. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
chr-hertel
force-pushed
the
server-suspension-vos
branch
from
October 8, 2026 00:27
e955ac6 to
1d06b0b
Compare
chr-hertel
force-pushed
the
server-suspension-vos
branch
from
October 8, 2026 00:37
1d06b0b to
875165e
Compare
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The migration is consistent across producers, consumers, and tests, with no blocking issues identified.
0 open findings
1 resolved since last review
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This branch has not been deployed
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.

ClientGatewaynow suspends withNotificationSuspension/RequestSuspensioninstead of untyped['type' => ...]arrays -Protocol::handleRequest(),Protocol::handleFiberYield()andStatelessProtocolcheckinstanceofinstead of re-validating the array shape in three places.FiberSuspendnow points at the union of the two VOsawait_responsearray inClient\Protocol) is left for a follow up