Skip to content

test: add pty_terminal_test with milestone supported#152

Merged
branchseer merged 24 commits intomainfrom
02-11-test_add_pty_terminal_test
Feb 12, 2026
Merged

test: add pty_terminal_test with milestone supported#152
branchseer merged 24 commits intomainfrom
02-11-test_add_pty_terminal_test

Conversation

@branchseer
Copy link
Copy Markdown
Member

Decompose the monolithic Terminal struct into focused components:

  • PtyStream: combined reader/writer (impl Read + Write) with vt100
    parser, screen_contents(), resize(), send_ctrl_c(), write_line()
  • ChildHandle: cloneable child process handle with wait() and kill()
  • Terminal: thin wrapper with pub pty_stream and child_handle fields

Drop custom read_until/read_to_end methods in favor of std::io traits.
Remove 7 read_until-specific tests; adapt remaining 9 tests to use
BufReader<&mut PtyStream>::read_until for synchronization.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Copy link
Copy Markdown
Member Author

branchseer commented Feb 11, 2026

@branchseer branchseer changed the title refactor: split Terminal into PtyStream + ChildHandle test: add pty_terminal_test with milestone supported Feb 11, 2026
@branchseer branchseer marked this pull request as ready for review February 12, 2026 10:08
Copy link
Copy Markdown
Member Author

branchseer commented Feb 12, 2026

Merge activity

  • Feb 12, 10:08 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Feb 12, 10:10 AM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 12, 10:10 AM UTC: @branchseer merged this pull request with Graphite.

@branchseer branchseer changed the base branch from 02-11-chore_config_clippy_rules_for_non-vite_crates to graphite-base/152 February 12, 2026 10:08
@branchseer branchseer changed the base branch from graphite-base/152 to main February 12, 2026 10:08
branchseer and others added 22 commits February 12, 2026 10:09
Decompose the monolithic Terminal struct into focused components:
- PtyStream: combined reader/writer (impl Read + Write) with vt100
  parser, screen_contents(), resize(), send_ctrl_c(), write_line()
- ChildHandle: cloneable child process handle with wait() and kill()
- Terminal: thin wrapper with pub pty_stream and child_handle fields

Drop custom read_until/read_to_end methods in favor of std::io traits.
Remove 7 read_until-specific tests; adapt remaining 9 tests to use
BufReader<&mut PtyStream>::read_until for synchronization.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Share vt100 parser via Arc<Mutex<...>> between reader and writer,
allowing independent mutable borrows in tests without scoped BufReader workarounds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add pty_terminal_test and pty_terminal_test_client crates for robust
PTY test synchronization using OSC escape sequences. The child process
emits named milestones via OSC 9999, and the test harness waits for
them to return screen contents at that point.

On Windows, ConPTY delivers unrecognized OSC sequences via a fast
pass-through path that may arrive before rendered character output.
Each milestone also moves the cursor to a counter-based unique column
on the last row; since cursor movement goes through ConPTY's rendering
pipeline, waiting for the cursor position guarantees all preceding
character output has been consumed.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@branchseer branchseer force-pushed the 02-11-test_add_pty_terminal_test branch from 93d9ffe to 307e9ce Compare February 12, 2026 10:09
@branchseer branchseer merged commit 7311b74 into main Feb 12, 2026
6 checks passed
@branchseer branchseer deleted the 02-11-test_add_pty_terminal_test branch February 12, 2026 10:10
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