fix(terminal): skip PTY tests when child spawn fails, not just openpty (VA-71) #75

Merged
Claude-Run merged 1 commit from chore/checks-workflow-776d46a3 into main 2026-06-27 23:34:22 +02:00
Member

The check.yml workflow's cargo test --workspace --lib --locked step failed on host::terminal::tests::resize_does_not_error_on_live_session with spawn: Pty("No such file or directory (os error 2)"). The PTY skip guard added in VA-64 probes only openpty(), but the operation that fails in the docker build sandbox is the subsequent child spawn. Under that PTY-hostile environment allocation is unreliable, so the single-openpty pty_available() probe can win its race and return true while the real TerminalSession::open (a second openpty plus a spawn) then ENOENTs, turning an environment limitation into a hard test failure.

Route the three PTY tests' open through a new open_session_or_skip helper that treats any Pty error from open as "no usable PTY here" and skips, mirroring pty_available(). A non-Pty error still panics so real regressions surface, and open_with_missing_program_returns_pty_error keeps asserting the bad-program path directly. PTY-capable hosts run all four tests unchanged; the sandbox now skips cleanly instead of failing the check.

#VA-71

The `check.yml` workflow's `cargo test --workspace --lib --locked` step failed on `host::terminal::tests::resize_does_not_error_on_live_session` with `spawn: Pty("No such file or directory (os error 2)")`. The PTY skip guard added in VA-64 probes only `openpty()`, but the operation that fails in the `docker build` sandbox is the subsequent child `spawn`. Under that PTY-hostile environment allocation is unreliable, so the single-`openpty` `pty_available()` probe can win its race and return true while the real `TerminalSession::open` (a second `openpty` plus a `spawn`) then ENOENTs, turning an environment limitation into a hard test failure. Route the three PTY tests' `open` through a new `open_session_or_skip` helper that treats any `Pty` error from `open` as "no usable PTY here" and skips, mirroring `pty_available()`. A non-`Pty` error still panics so real regressions surface, and `open_with_missing_program_returns_pty_error` keeps asserting the bad-program path directly. PTY-capable hosts run all four tests unchanged; the sandbox now skips cleanly instead of failing the check. #VA-71
fix(terminal): skip PTY tests when child spawn fails, not just openpty (VA-71)
All checks were successful
Check / fmt + clippy + tests (pull_request) Successful in 4m8s
Create release / Create release from merged PR (pull_request) Has been skipped
7c14c12eb3
The `check.yml` workflow's `cargo test --workspace --lib --locked` step failed on `host::terminal::tests::resize_does_not_error_on_live_session` with `spawn: Pty("No such file or directory (os error 2)")`. The PTY skip guard added in VA-64 probes only `openpty()`, but the operation that fails in the `docker build` sandbox is the subsequent child `spawn`. Under that PTY-hostile environment allocation is unreliable, so the single-`openpty` `pty_available()` probe can win its race and return true while the real `TerminalSession::open` (a second `openpty` plus a `spawn`) then ENOENTs, turning an environment limitation into a hard test failure.

Route the three PTY tests' `open` through a new `open_session_or_skip` helper that treats any `Pty` error from `open` as "no usable PTY here" and skips, mirroring `pty_available()`. A non-`Pty` error still panics so real regressions surface, and `open_with_missing_program_returns_pty_error` keeps asserting the bad-program path directly. PTY-capable hosts run all four tests unchanged; the sandbox now skips cleanly instead of failing the check.

#VA-71
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
psa-systems/vervain-agent!75
No description provided.