Skip to content

Observe each committed frame in a single transport read - #192

Open
tony wants to merge 2 commits into
fix/73-foreground-stream-readerfrom
fix/72-observe-committed-frames
Open

tony wants to merge 2 commits into
fix/73-foreground-stream-readerfrom
fix/72-observe-committed-frames

Conversation

@tony

@tony tony commented Dec 3, 2026

Copy link
Copy Markdown
Member

Closes #72

What changed, and why:

A program can commit a prompt and replace it before the next stream or PTY read. A registered wait now sees the first matching committed frame even when both updates arrive together. Predicates run in the waiting task, and delivery uses bounded batches.

This builds on #159 for shared reader ownership. #160 independently fixes writer cleanup after a failed input pump. Their close paths overlap where the stream finishes bytes it has already received.

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.

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 #192
- Preserve previously published notes and the parent branch's entries
@tony
tony marked this pull request as ready for review December 3, 2026 03:05
tony added 2 commits December 3, 2026 17:21
why: A single read can contain two synchronized updates. Feeding both
before checking a waiter hides the first committed frame.

what:
- Step through commit boundaries in stream and PTY input
- Check bounded batches of snapshots in the waiting task
- Finish buffered frames before reporting terminal EOF
- Exercise coalesced input, waiter cancellation and shared close
why: A prompt can appear and disappear in synchronized updates carried
     by one transport read.

what:
- Explain when stream and PTY waits observe the transient frame.
@tony
tony force-pushed the fix/72-observe-committed-frames branch from 619b793 to ff4863e Compare December 3, 2026 23:58

This branch was previously deployed

1 inactive deployment
docs — ff4863e4 Deployed Dec 4, 2026 by tony via build (3.14) #309
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant