Symptom
pty > treats in-place socket data mutation as the same connection fails with ##[error]Expected to contain: "AAA" on Windows CI.
- File:
packages/opencode/test/pty/pty-output-isolation.test.ts:102
- Seen: Attempt 1 of PR #8 validation run, 1094ms (NOT a timeout — test ran to completion but assertion failed)
Context
Post PR #8 (OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=true on Windows) residual flake. This one is a pure assertion race, not a timeout — the test pushes data into a pty socket and expects to see "AAA" echoed back, but sometimes doesn't.
Root cause to investigate
Likely pty socket write-vs-read race on Windows (cat process not flushing, or the output collector missing the initial chunk). The test polls out for content — review whether the polling loop has enough iterations / sleep budget for a slow Windows pty pipe. Possible fix: increase poll budget, or make the assertion wait on an explicit output signal instead of polling an array.
Symptom
pty > treats in-place socket data mutation as the same connectionfails with##[error]Expected to contain: "AAA"on Windows CI.packages/opencode/test/pty/pty-output-isolation.test.ts:102Context
Post PR #8 (
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=trueon Windows) residual flake. This one is a pure assertion race, not a timeout — the test pushes data into a pty socket and expects to see"AAA"echoed back, but sometimes doesn't.Root cause to investigate
Likely pty socket write-vs-read race on Windows (
catprocess not flushing, or the output collector missing the initial chunk). The test pollsoutfor content — review whether the polling loop has enough iterations / sleep budget for a slow Windows pty pipe. Possible fix: increase poll budget, or make the assertion wait on an explicit output signal instead of polling an array.