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 2 commits December 2, 2026 20:56
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: 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

This branch was successfully deployed

1 active deployment
docs — 619b793a Deployed Dec 3, 2026 by tony via build (3.14) #301
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