Skip to content

Resume parsing after a completed action raises - #175

Merged
tony merged 2 commits into
masterfrom
fix/77-parser-dispatch-recovery
Dec 5, 2026
Merged

tony merged 2 commits into
masterfrom
fix/77-parser-dispatch-recovery

Conversation

@tony

@tony tony commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

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.

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
@tony
tony force-pushed the fix/77-parser-dispatch-recovery branch from 0cc90f3 to 1e20f26 Compare December 3, 2026 23:58
tony added 2 commits December 5, 2026 07:20
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
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 1e20f26 to dec52aa Compare December 5, 2026 13:21
@tony
tony changed the base branch from master to fix/119-tmux-alternate-entry December 5, 2026 13:21
@tony
tony changed the base branch from fix/119-tmux-alternate-entry to master December 5, 2026 13:26
@tony
tony merged commit da17a64 into master Dec 5, 2026
9 checks passed
@tony
tony deleted the fix/77-parser-dispatch-recovery branch December 5, 2026 20:41

This branch was successfully deployed

1 active deployment
docs — dec52aa2 Deployed Dec 5, 2026 by tony via build (3.14) #383
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