Skip to content

flaky(windows): pty output isolation misses initial socket data #11

@Astro-Han

Description

@Astro-Han

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low prioritybugSomething isn't workingciContinuous integration / GitHub Actionsflaky-testNon-deterministic test failurewindowsWindows-specific

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions