Skip to content

feat(pty): add Unix PTY spawn and I/O - #36

Merged
decode2 merged 1 commit into
masterfrom
feat/unix-pty-backend
Jul 18, 2026
Merged

feat(pty): add Unix PTY spawn and I/O#36
decode2 merged 1 commit into
masterfrom
feat/unix-pty-backend

Conversation

@decode2

@decode2 decode2 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Linked issue

Closes #35

  • The linked issue has the status:approved label.

Pull request type

Select exactly one option and apply the matching type:* label.

  • Bug fix (type:bug)
  • New feature (type:feature)
  • Documentation (type:docs)
  • Refactor (type:refactor)
  • Maintenance or tooling (type:chore)
  • Breaking change (type:breaking-change)

Summary

  • Adds the Unix portable-pty backend for structured spawn, shell startup, buffered UTF-8 output, input, process identity, and basic liveness.
  • Adds bounded root-process close escalation and live PTY resize safety while keeping process-group descendant teardown and remaining review warnings for PR4.
  • Preserves the approved four-path candidate ca1475ad489814327255cb4148584369825ad524 from lineage review-bccf9b5e0bf02b61.

Changes

Area or file Change
crates/splice-pty/src/lib.rs Implements Unix PTY spawn, I/O, interrupt, root close, resize, and session lifecycle behavior.
crates/splice-pty/tests/unix_pty.rs Covers structured argv, cwd/env, UTF-8 streaming, shell I/O, interrupt, bounded close/drop, and resize.
crates/splice-pty/Cargo.toml Adds Unix-only PTY/runtime dependencies.
Cargo.lock Records generated dependency resolution.

Review budget

  • Authored: 400 lines (373 additions + 27 deletions), excluding generated Cargo.lock.
  • Generated: 104 lines in Cargo.lock (102 additions + 2 deletions).
  • Complete PR diff: 504 lines across exactly four reviewed paths.
  • Review boundary: Unix PTY spawn/basic I/O plus bounded root close/resize safety.

Test plan

  • Ran focused automated checks: cargo fmt --all -- --check passed; cargo test -p splice-pty passed 25/25 native tests; cargo clippy -p splice-pty --all-targets -- -D warnings passed.
  • Exercised the affected terminal workflow: live Unix PTY tests cover structured spawn, shell input/output, ETX interrupt, malformed/split UTF-8, bounded close/drop, and terminal resize.
  • Verified relevant platform behavior: native Linux checks pass. Wine is not a native ConPTY authority and prior Wine probes showed environment-sensitive command-output and explicit-close timing; native Windows CI is required before merge.

Chained pull request context

Strategy: stacked-to-main, PR3 of 15. Each slice targets master after its dependencies merge.

PR1  merged ✅
  ↓
PR2  merged ✅ (`master` at 23af77a)
  ↓
PR3  📍 Unix PTY spawn/basic I/O + bounded root close/resize
  ↓
PR4  planned; depends on PR3 and owns process-group descendants + deferred warnings
  ↓
PR5-15 planned
  • Previous PR: PR2, merged into master at 23af77a.
  • Next PR: PR4, process-group descendant lifecycle and deferred bounded-review warnings.
  • Review this PR first: the four-path Unix PTY work unit and its live Unix tests.
  • Intentionally out of scope: process-group descendant teardown, deferred warning IDs, native Windows implementation changes, and all later PR5-15 scope.

Rollback

Revert commit f0a2baf6f59c67d04e124d84cb437d438b32878c to remove the Unix backend, its tests, and its dependency/lock changes without affecting merged PR1-2 behavior.

Contributor checklist

  • I searched for duplicate issues and pull requests before starting.
  • I linked an approved issue using Closes, Fixes, or Resolves.
  • I selected exactly one pull request type and applied exactly one matching type:* label.
  • I completed every relevant template field and included reproducible test evidence.
  • Documentation is not changed because this internal backend slice does not alter the documented public contract.
  • My commits follow Conventional Commits.
  • My commits contain no AI attribution, including Co-Authored-By trailers.

@decode2 decode2 added the type:feature Adds or improves functionality label Jul 18, 2026
@decode2
decode2 merged commit 4acd330 into master Jul 18, 2026
2 checks passed
@decode2 decode2 mentioned this pull request Jul 18, 2026
17 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:feature Adds or improves functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(pty): add Unix PTY spawn and basic I/O

1 participant