Repository navigation
fix(client): release server-streaming start task on pending terminal - #688
Merged
Merged
Conversation
This was referenced Sep 13, 2026
Closed
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.
Problem
A timed ServerStreaming call observes head-Request emission, but the emission wait uses
CancellationToken.None. If the transport write stalls after queue admission,PendingRequestTablecan already selectDeadlineExceeded(and complete the user-visible dispatcher) whileServerStreamingInvokerremains parked in the framework-task supervisor until the transport recovers.Change
PendingCallTerminalSignalcompletion-observer wrapper that mirrors the terminal already selected byPendingRequestTableinto a framework-only cancellation token;PendingRequestTableremains authoritative, an accepted Request remains transport-owned, and the emission cancellation cannot replace the winning terminal reason.The signal is intentionally not a producer token: ServerStreaming has no local producer. It represents only pending-call terminal lifetime.
Regression coverage
Adds a deterministic manual-clock/transport-stall test that:
DeadlineExceeded;ServerStreamingInvokerleaves the framework supervisor before the transport stall is released; andRequestis emitted before its matchingCancel.Local SDK execution is intentionally not used; validation is through the repository's existing GitHub Actions workflows.
Fixes #687