Skip to content

Set encoding and event recording at PTY startup - #164

Merged
tony merged 2 commits into
masterfrom
fix/97-startup-encoding-events
Dec 5, 2026
Merged

tony merged 2 commits into
masterfrom
fix/97-startup-encoding-events

Conversation

@tony

@tony tony commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Closes #97

What changed, and why:

open_pty(), Terminal.from_size(), vt_factory, and vt_pty accept startup encoding and event-recording options. A short-lived program's first output uses those settings, including events emitted before its exit.

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 #164
- Preserve previously published notes and the parent branch's entries
@tony
tony marked this pull request as ready for review December 3, 2026 01:36
@tony
tony force-pushed the fix/97-startup-encoding-events branch from 08bae08 to 0296f8b Compare December 3, 2026 23:58
tony added 2 commits December 5, 2026 07:43
why: Callers need the requested decoder and event recording before the
     first read. An invalid encoding should fail before the child
     starts.

what:
- Forward encoding and event recording through terminal factories.
- Validate settings before allocating the PTY.
- Check first-byte decoding and bell events in both PTY factories.

Fixes #97
why: The first PTY read needs the requested decoder and event-recording
     setting.

what:
- Document the encoding and recording options on PTY and fixture
  creation.
@tony
tony force-pushed the fix/97-startup-encoding-events branch from 0296f8b to 22b2d1b Compare December 5, 2026 13:44
@tony
tony changed the base branch from master to fix/89-pty-group-lifetime December 5, 2026 13:44
@tony
tony changed the base branch from fix/89-pty-group-lifetime to master December 5, 2026 13:52
@tony
tony merged commit 1b1340f into master Dec 5, 2026
9 checks passed
@tony tony mentioned this pull request Dec 5, 2026
35 of 38 tasks
@tony
tony deleted the fix/97-startup-encoding-events branch December 5, 2026 20:42

This branch was successfully deployed

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

Expose terminal encoding and event recording at PTY startup

1 participant