Skip to content

🤖 tests: stabilize foreground bash migration test#3556

Merged
ThomasK33 merged 1 commit into
mainfrom
tests-foreground-bash-migration-flake
Jun 15, 2026
Merged

🤖 tests: stabilize foreground bash migration test#3556
ThomasK33 merged 1 commit into
mainfrom
tests-foreground-bash-migration-flake

Conversation

@ThomasK33

Copy link
Copy Markdown
Member

Summary

Stabilizes the foreground-to-background bash migration tests by waiting for actual foreground bash output before clicking the simulated background action, instead of relying on a fixed sleep that is too optimistic on Windows CI.

Background

The known Windows flake in tests/ipc/runtime/backgroundBashDirect.test.ts intermittently returned Output so far (0 lines) from should migrate foreground bash to background and continue running. A deterministic delayed-output repro showed the same assertion failure when the test backgrounds the process after registration but before the first stdout chunk has reached the foreground output collector.

Implementation

  • Added a small foreground bash-output collector using the existing UI-only bash-output event path.
  • Updated the foreground migration tests to wait for the first marker text before calling sendToBackground.
  • Applied the same readiness check to the abort-after-background regression test so it does not depend on Git Bash startup timing either.

Validation

  • Reproduced the missing-marker failure with a temporary delayed-output foreground migration test.
  • bun test ./tests/ipc/runtime/backgroundBashDirect.test.ts
  • make static-check (first combined run saw ESLint killed with exit 137; immediate retry passed)

Risks

Low. This is test-only and replaces fixed sleeps with an observable readiness signal from the same bash output stream the UI uses.


Generated with mux • Model: openai:gpt-5.5 • Thinking: xhigh • Cost: $20.62

Wait for actual foreground bash output before sending migration tests to the background, instead of relying on CI-dependent fixed sleeps.

---

_Generated with `mux` • Model: `openai:gpt-5.5` • Thinking: `xhigh` • Cost: `$20.62`_

<!-- mux-attribution: model=openai:gpt-5.5 thinking=xhigh costs=20.62 -->
@ThomasK33

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep them coming!

Reviewed commit: 777d854884

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ThomasK33 ThomasK33 added this pull request to the merge queue Jun 15, 2026
Merged via the queue into main with commit 11eefe2 Jun 15, 2026
24 checks passed
@ThomasK33 ThomasK33 deleted the tests-foreground-bash-migration-flake branch June 15, 2026 10:48
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.

1 participant