Skip to content

Add runnable terminal examples and streamline CI - #2

Merged
croustibat merged 1 commit into
mainfrom
docs/runnable-terminal-examples
Sep 8, 2026
Merged

croustibat merged 1 commit into
mainfrom
docs/runnable-terminal-examples

Conversation

@croustibat

Copy link
Copy Markdown
Owner

The package now includes runnable examples for trying a PTY, relaying an interactive terminal and reading multiple sessions. The README leads with those scripts and troubleshooting; implementation findings, contribution instructions and unreleased changes have dedicated documents.

The interactive relay forwards keyboard input and resizes, bounds both queues, handles partial writes, drains output independently of process exit and restores terminal settings on normal exit or handled signals. Ten integration tests exercise the examples through real PTYs, including Ctrl-C, SIGTERM, delayed exit after EOF and a 560 KB payload verified byte-for-byte. PHPStan now checks the examples; lifecycle methods declare their stateful semantics for analysis.

CI is reduced from nine jobs to six: PHP 8.2–8.5 on Linux, PHP 8.5 on macOS ARM64 and one quality job. The PHP requirement remains ^8.2. No public runtime API or release tag changes.

Validation: 55 tests / 214 assertions pass on macOS ARM64 with PHP 8.5.8 and real /dev/tty access. PHPStan, Pint and Composer validation pass. A manual interactive shell check covered geometry, Ctrl-C interrupting a command, subsequent input and clean exit. Terminal comparisons exclude only macOS's transient PENDIN kernel state.

@croustibat
croustibat merged commit c242079 into main Sep 8, 2026
6 checks passed
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