Skip to content

ci: run tests on a bun build that has the spawnSync fix - #8311

Merged
saddlepaddle merged 1 commit into
mainfrom
ci/tests-on-bun-with-spawnsync-fix
Oct 8, 2026
Merged

saddlepaddle merged 1 commit into
mainfrom
ci/tests-on-bun-with-spawnsync-fix

Conversation

@saddlepaddle

@saddlepaddle saddlepaddle commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

About 7% of Test jobs hang. The watchdog from #8305 showed why: a bun test process sits at ~100% CPU with one exited child it never collected. That is bun spinning in a synchronous spawn (Bun.spawnSync, execSync, execFileSync); the per-test timeout cannot end it. oven-sh/bun#44581 fixes it (merged 2026-10-05) and is not in a release yet. 1.4.2 is still the latest.

Change

The Test job installs bun@1.4.2-canary.20261007.1 from npm (commit bd599f5af, three commits after the fix) and puts it first on PATH, after dependencies are installed with the pinned 1.4.2. Every other job, and everything we ship, stays on 1.4.2. The npm version is immutable, so the build does not move.

Evidence

Measured on #8310 by running the Test job many times per push:

bun Test jobs Hangs Other failures
1.4.2 (pinned) 120 9 4
1.4.3-canary.1 (5749c3129, setup-bun canary) 120 0 3
1.4.2-canary.20261007.1 (bd599f5af, this PR) 60 0 1

The canary failures were the known workspace-fs watcher and i18n provider flakes and one host-service test. All 9 hangs and the 4 other failures on 1.4.2 were in desktop; the 4 were spawn tests that hit the 5 s timeout, which is the same bug in a milder form.

Cost

Tests run on a pre-release bun that differs from the one we ship. Remove the step when .bun-version moves to a release that has the fix. The watchdog from #8305 stays for now so a hang from any other cause still ends at 6 minutes with a dump.


Summary by cubic

Fixes the ~7% of Test jobs that hung when bun 1.4.2 spun forever in a synchronous spawn, which the per-test timeout could not end. The Test job now installs bun@1.4.2-canary.20261007.1 (contains the oven-sh/bun#44581 fix) after dependencies are installed with the pinned 1.4.2, and puts it first on PATH. Everything else stays on 1.4.2. Remove this step once .bun-version moves to a release with the fix.

Written for commit 2b7980b. Summary will update on new commits.

View guided diff Turn on auto-fix

Summary by CodeRabbit

  • Chores
    • Updated the automated test environment to use a Bun version with a fix for a test-running issue.
    • This change affects the project’s build and test process; it does not change end-user features or app behavior.

bun 1.4.2 can spin forever in Bun.spawnSync and node:child_process sync
spawns when a finalizer from an earlier test file runs during the call.
The per-test timeout cannot end it. It hung about 7% of Test jobs.

oven-sh/bun#44581 fixes it and is not in a release. The Test job now puts
bun 1.4.2-canary.20261007.1 (npm, commit bd599f5af) first on PATH after
dependencies are installed with the pinned 1.4.2. Every other job stays on
1.4.2.
@coderabbitai

coderabbitai Bot commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 6a1353cb-d9cd-417b-a58d-82d7e95b4b12
📥 Commits

Reviewing files that changed from the base of the PR and between 5ae2402 and 2b7980b.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
 _______________________________________________________________________________
< Why do we never have time to do it right, but always have time to do it over? >
 -------------------------------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ✅ Neon database branch

Thank you for your contribution! 🎉

@greptile-apps

greptile-apps Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[High risk] Modifies CI build environment and test execution.

The PR appears safe to merge; the Bun override is limited to the test job.

What we checked:

  • Canary stays in the test job: The new step changes PATH only within the Test job. Other jobs still set up Bun from .bun-version.

Summary

The Test job installs bun@1.4.2-canary.20261007.1 after installing workspace dependencies with the pinned Bun version.

  • Adds the canary’s binaries to PATH for later test steps.
  • Leaves other jobs and the existing hang watchdog unchanged.
  • Documents when to remove the temporary override.

No actionable issues were found.

saddlepaddle explicitly acknowledged that tests run on a different Bun version than the shipped version as a temporary tradeoff until a release includes the fix.

Reviews (1) · Last reviewed commit: "ci: run tests on a bun build that has th..." · Reviewed by Greptile

@saddlepaddle
saddlepaddle merged commit 0c95059 into main Oct 8, 2026
17 of 18 checks passed
@saddlepaddle
saddlepaddle deleted the ci/tests-on-bun-with-spawnsync-fix branch October 8, 2026 03:38
saddlepaddle added a commit that referenced this pull request Oct 20, 2026
1.4.3 contains oven-sh/bun#44581, the synchronous-spawn fix the CI Test
job has been taking from a pinned canary since #8311. Tests now run on
the same bun as installs, builds and the shipped CLI.

Moves .bun-version, packageManager, @types/bun and bun-types, the EAS
build profiles and workflows, and the documented minimum. The lockfile
change is only the type packages. A fresh install of the same lockfile
under 1.4.2 and 1.4.3 gives identical store paths and the same mobile
fingerprint, so the runtime version is unchanged.
saddlepaddle added a commit that referenced this pull request Oct 20, 2026
)

1.4.3 contains oven-sh/bun#44581, the synchronous-spawn fix the CI Test
job has been taking from a pinned canary since #8311. Tests now run on
the same bun as installs, builds and the shipped CLI.

Moves .bun-version, packageManager, @types/bun and bun-types, the EAS
build profiles and workflows, and the documented minimum. The lockfile
change is only the type packages. A fresh install of the same lockfile
under 1.4.2 and 1.4.3 gives identical store paths and the same mobile
fingerprint, so the runtime version is unchanged.

This branch was previously deployed

1 inactive deployment
preview — 2b7980b1 Deployed Oct 8, 2026 by saddlepaddle via Deploy API #11500
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