core-agent-ide/codex-rs/utils/pty/src
Ahmed Ibrahim 9b5078d3e8 Stabilize pipe process stdin round-trip test (#14013)
## What changed
- keep the explicit stdin-close behavior after writing so the child
still receives EOF deterministically
- on Windows, stop using `python -c` for the round-trip assertion and
instead run a native `cmd.exe` pipeline that reads one line from stdin
with `set /p` and echoes it back
- send `
` on Windows so the stdin payload matches the platform-native line
ending the shell reader expects

## Why this fixes flakiness
The failing branch-local flake was not in `spawn_pipe_process` itself.
The child exited cleanly, but the Windows ARM runner sometimes produced
an empty stdout string when the test used Python as the stdin consumer.
That makes the test sensitive to Python startup and stdin-close timing
rather than the pipe primitive we actually want to validate. Switching
the Windows path to a native `cmd.exe` reader keeps the assertion
focused on our pipe behavior: bytes written to stdin should come back on
stdout before EOF closes the process. The explicit `
` write removes line-ending ambiguity on Windows.

## Scope
- test-only
- no production logic change
2026-03-11 12:33:09 -07:00
..
win Fix inverted Windows PTY TerminateProcess handling (#13989) 2026-03-08 11:52:16 -06:00
lib.rs utils/pty: add streaming spawn and terminal sizing primitives (#13695) 2026-03-06 15:13:12 -08:00
pipe.rs utils/pty: add streaming spawn and terminal sizing primitives (#13695) 2026-03-06 15:13:12 -08:00
process.rs utils/pty: add streaming spawn and terminal sizing primitives (#13695) 2026-03-06 15:13:12 -08:00
process_group.rs Process-group cleanup for stdio MCP servers to prevent orphan process storms (#10710) 2026-02-06 21:26:36 -08:00
pty.rs utils/pty: add streaming spawn and terminal sizing primitives (#13695) 2026-03-06 15:13:12 -08:00
tests.rs Stabilize pipe process stdin round-trip test (#14013) 2026-03-11 12:33:09 -07:00