Skip to content

test(pty): exercise native ConPTY runtime - #12

Merged
jlongster merged 3 commits into
masterfrom
conpty-runtime
Oct 8, 2026
Merged

jlongster merged 3 commits into
masterfrom
conpty-runtime

Conversation

@jlongster

@jlongster jlongster commented Sep 3, 2026 •

Copy link
Copy Markdown
Collaborator

P1 — native ConPTY runtime

Adds a reusable self-spawned Rust console fixture and six direct TerminalService tests on Unix and Windows, without daemon/client transport. Covers actual child stdin/stdout, Unicode, cwd/env/argv, supported child-PATH lookup, console resize, snapshots/replay, terminal replies, and independent terminals.

  • portable-pty 0.9.0 unchanged; existing ConPTY runtime passes the basic tests without runtime rewrites. Actor-owned Ghostty and one PTY reader/writer preserved.
  • Minimal windows-sys 0.61.2 Console dev dependency; native Windows x64/ARM64 CI adds Clippy and runtime diagnostics.
  • Fixed pre-existing Unix-only client imports exposed by Windows Clippy (coordinated with transport).
  • Fixture explicitly restores blocking mode after BSD accept; its deadline bounds hung tests only, not runtime cleanup.
  • Optional relative-program lookup probe is outside Git; no undocumented cross-platform resolver parity imposed.

Verified at 3a1d57d

Windows run 33777172486:

  • Native x64: 19 library + 5 callback + 6 real ConPTY runtime tests passed; standalone library 19/19.
  • Native ARM64: same 30 tests passed, plus standalone library 19/19. OS architecture and PE target assertions passed; not x64 runtime emulation.
  • Both: formatting, Clippy all targets/features, build and executable smoke passed.

Core run 33777172540:

  • Linux: 51 tests passed. macOS: 47 tests passed.
  • Miri: 5 Stacked + 5 Tree Borrows passed.
  • The one ignored runtime test is the deliberately self-spawned fixture entry, not omitted coverage.
  • Local Linux full suite and play query-response smoke also passed.

P1 basic native runtime gate is complete. P2 termination/EOF/cleanup follows as a separate stacked PR. Named-pipe transport is an independent lane. Do not merge.

@jlongster
jlongster marked this pull request as ready for review September 3, 2026 16:18
@jlongster
jlongster changed the base branch from master to windows-pipes September 3, 2026 17:48
@jlongster
jlongster changed the base branch from windows-pipes to master October 8, 2026 18:37
Poll the child's console size after resize, because ConPTY applies resizes
asynchronously. Describe the startup cursor query as reaching the reader and
parser, which is what the test proves on Windows. Also let the fixture entry
return when run directly, name the test that tripped the watchdog, allow a
ConPTY repaint after the earlier snapshot, and update the CI summary now that
named pipes are merged.
@jlongster

Copy link
Copy Markdown
Collaborator Author

Review follow-up (5ea6e9b): the Windows resize test now polls the child's console size, since ConPTY applies resizes asynchronously; the startup cursor-query comment/README now claim only that the query reaches the reader and parser; the fixture entry returns cleanly under --include-ignored; the watchdog names the hung test; the replay-offset check tolerates a later ConPTY repaint; and the Windows CI summary no longer says named pipes are unimplemented. #15–#19 were restacked onto this.

@jlongster
jlongster merged commit 551629c into master Oct 8, 2026
6 of 7 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