Skip to content

test: allow for Windows PowerShell cold start (deflake #407)#413

Closed
BunsDev wants to merge 1 commit into
mainfrom
fix/407-deflake-batch-shim
Closed

test: allow for Windows PowerShell cold start (deflake #407)#413
BunsDev wants to merge 1 commit into
mainfrom
fix/407-deflake-batch-shim

Conversation

@BunsDev

@BunsDev BunsDev commented Jul 18, 2026

Copy link
Copy Markdown
Member

Closes #407.

codex_json_batch_shim_uses_stdin_and_emits_assistant_text flaked twice on windows-latest (PR #384 run 29398604398, PR #406 run 29589644625) with os error 2: the fake-codex batch shim invokes PowerShell, which can take several seconds to cold-start on a loaded runner — the test's 2s activity deadline killed the child before args.txt was written. The test exercises stdin transport and JSONL framing, not the activity deadline, so the fix raises the deadline to 10s with a comment.

This is @romgenie's fix, cherry-picked verbatim from PR #402 (48a0e41) with authorship preserved, so the deflake lands independently of that PR's remaining review items (it will dedupe cleanly when #402 rebases/merges).

Testing

  • cargo fmt --check ✓, cargo clippy -p coven-cli --all-targets -- -D warnings
  • cargo test -p coven-cli pty_runner:: ✓ (23/23 on unix; the changed test is #[cfg(windows)] — windows-latest CI on this PR is the authoritative check)
  • Deadline change only affects test headroom; production timeouts untouched.

PowerShell can take several seconds to cold-start on a loaded Windows
runner; the 2s activity deadline in
codex_json_batch_shim_uses_stdin_and_emits_assistant_text killed the
shim before args.txt existed (os error 2). The test exercises stdin and
JSONL framing, not the activity deadline, so give startup 10s headroom.

Cherry-picked verbatim from PR #402 (48a0e41) so the deflake lands
independently of that PR's remaining review items.

Fixes #407

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 18, 2026 04:37

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Deflakes a Windows-only PTY runner test by increasing the activity deadline to accommodate intermittent PowerShell cold-start delays on windows-latest, without changing production timeout behavior.

Changes:

  • Increase the stream_codex_json_with_timeout activity deadline from 2s to 10s in the Windows-only test codex_json_batch_shim_uses_stdin_and_emits_assistant_text.
  • Add an in-test comment documenting the rationale (PowerShell cold start; test is validating stdin + JSONL framing rather than deadline behavior).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@BunsDev

BunsDev commented Jul 18, 2026

Copy link
Copy Markdown
Member Author

Superseded: #402 merged (8ee06e1) carrying this exact commit (48a0e41 was cherry-picked from that branch), so the deflake is on main — verified the 10s deadline + comment are present in origin/main's pty_runner.rs. Closing; branch deleted.

@BunsDev BunsDev closed this Jul 18, 2026
@BunsDev
BunsDev deleted the fix/407-deflake-batch-shim branch July 18, 2026 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky on windows-latest CI: pty_runner::tests::codex_json_batch_shim_uses_stdin_and_emits_assistant_text (os error 2)

3 participants