Repository navigation
Route terminal replies after an async stream handoff - #168
Merged
Merged
Conversation
tony
added a commit
that referenced
this pull request
Dec 3, 2026
why: Readers need the behavior and scope of this change at release. what: - Add the unreleased entry for PR #168 - Preserve previously published notes and the parent branch's entries
tony
marked this pull request as ready for review
December 3, 2026 01:39
tony
force-pushed
the
fix/109-successor-stream-replies
branch
from
December 3, 2026 23:58
0e26bd5 to
74beb4e
Compare
7 tasks done
why: Preparing a successor early can leave terminal replies unclaimed. what: - Claim the reply writer when a successor starts, pumps or sends. - Flush pending terminal replies before outbound input. - Exercise writer handoff and reply write failure. Fixes #109
why: A terminal may have a pending reply when a successor stream takes
over its writer.
what:
- Document when the successor sends replies ahead of new input.
tony
force-pushed
the
fix/109-successor-stream-replies
branch
from
December 5, 2026 13:44
74beb4e to
8154152
Compare
35 of 38 tasks
This branch was successfully 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.
Closes #109
What changed, and why:
A successor stream can be prepared before the current stream closes. When the successor starts, pumps, or sends, it claims the terminal's reply writer and delivers waiting replies ahead of new input.
Checks run:
On Linux, Ruff formatting and lint, ty for Python 3.12 through 3.15, the full pytest suite with doctests, compiled Ghostty comparisons, and the Sphinx warnings-as-errors build passed.
Tool use:
Codex prepared the change and ran the local checks. A separate Codex reviewer replayed the changed behavior and checked the publication tree against the reviewed patch.