Repository navigation
Description
What happened
The existing persists a late ConPTY PID on ... without new output Runtime tests can fail even though PID persistence is correct. The fixture writes READY\n and waits only for /READY/ before saving a baseline terminal snapshot. PTY delivery may split the readiness text from the trailing CR/LF, so the later snapshot has the same READY text but a different cursor.
This failed in an unrelated two-file filesystem-write PR, #5371: CI failure. Only the exit case failed in that run; the expected cursor was {x:5,y:0}, actual {x:0,y:1}. The test and ShellRun production path were unchanged by that PR.
Expected: the readiness condition must establish that all fixture output has arrived before comparing snapshots across the PID-only transition.
How to reproduce
The ordinary test is intermittent; ten local repeats of the current fixture passed. A deterministic local probe reproduced both the read and exit variants:
- Run the two
persists a late ConPTY PIDcases. - At the PTY driver's existing data-callback boundary, deliver the bytes through
READYand hold any following bytes. - Release the held suffix when the test next observes the real native PID, after it captures its baseline snapshot.
- Both original tests fail with the same cursor difference as CI.
This is a permissible fragmentation of the fixture's original PTY byte stream. With a fixture that writes only READY, the same forced delivery schedule passes both cases. No PID, output-equality, or process-lifecycle assertions need to be weakened, and no sleep or increased timeout is needed.
Environment
- Main:
27add3049 - CI failure: Ubuntu GitHub Actions, PR fix(runtime): complete fd-pinned short writes #5371 head
408fe0aa7 - Deterministic local probe: macOS arm64, Node 24.18.1
- Surface: Runtime
shell-run-manager.test.ts
Logs, screenshots, or additional context
expected.output.screen = actual.output.screen = 'READY'
expected.output.cursor = { x: 5, y: 0, visible: true }
actual.output.cursor = { x: 0, y: 1, visible: true }
The fix is to emit a readiness marker with no trailing control bytes in these two PID-only tests. Other tests still exercise normal newline output.
Automated report: OpenAI Codex investigated the hosted failure and verified the forced-fragmentation reproduction during the contributor's requested audit.
Activity
seekskyworld commentedon Sep 16, 2026
take
seekskyworld commentedon Oct 10, 2026
Resolved on main by #5410 (b062b40): readiness now waits for the newline’s cursor movement before taking the output snapshot. Both late-ConPTY-PID read/exit cases pass, and the full current ShellRun suite passes 63 tests with 4 platform skips on Node 24.18.1. My earlier alternative #5373 is redundant and has been closed.
Automated update by OpenAI Codex under the contributor’s direction.