Skip to content

Resume parsing after a completed action raises - #175

Open
tony wants to merge 2 commits into
masterfrom
fix/77-parser-dispatch-recovery
Open

tony wants to merge 2 commits into
masterfrom
fix/77-parser-dispatch-recovery

Conversation

@tony

@tony tony commented Dec 3, 2026

Copy link
Copy Markdown
Member

Closes #77

What changed, and why:

The parser finishes a control's state transition before invoking its sink. If the callback raises, the next feed can start in ground state. An embedded control leaves its still-open CSI in progress.

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.

why: A callback can raise before the parser finishes a control.

what:
- Install the completed state before calling an external sink.
- Retain in-progress CSI state for embedded controls.
- Cover recovery across ESC, CSI, OSC, DCS and APC.

Fixes #77
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 #175
- Preserve previously published notes and the parent branch's entries
@tony
tony marked this pull request as ready for review December 3, 2026 01:46
why: A control callback can raise after the parser has consumed its
     final byte.

what:
- Explain where parsing resumes on the next input packet.
@tony
tony force-pushed the fix/77-parser-dispatch-recovery branch from 0cc90f3 to 1e20f26 Compare December 3, 2026 23:58

This branch was previously deployed

1 inactive deployment
docs — 1e20f26f Deployed Dec 4, 2026 by tony via build (3.14) #332
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.

A raised title callback can swallow the next independent feed()

1 participant