Skip to content

Fix flaky Browser Tests: bump @embroider/vite for the tmp-dir rename race (ENOTEMPTY)#319

Merged
NullVoxPopuli merged 1 commit into
universal-ember:mainfrom
NullVoxPopuli-ai-agent:fix-browser-tests-race
Jul 13, 2026
Merged

Fix flaky Browser Tests: bump @embroider/vite for the tmp-dir rename race (ENOTEMPTY)#319
NullVoxPopuli merged 1 commit into
universal-ember:mainfrom
NullVoxPopuli-ai-agent:fix-browser-tests-race

Conversation

@NullVoxPopuli-ai-agent

Copy link
Copy Markdown

CI's Browser Tests job intermittently fails during a test app's build:tests with:

[plugin embroider-resolver]
Error: ENOTEMPTY: directory not empty, rename '/tmp/embroider-vite-jump-tmp-XXXXXX' -> '/tmp/embroider-vite-jump-<hash>'

Root cause

@embroider/vite's maybeCaptureNewOptimizedDep builds a content-addressed "jump" dir keyed by hashed(pkg.root + '|' + pkg.name) and renameSyncs a freshly-built tmp dir onto it. When turbo builds multiple test apps in parallel and they resolve the same workspace package (same root + name → same hash), the builds race to create the same target. The race guard in 1.5.2 only catches EEXIST — but on Linux, renaming onto an existing non-empty directory throws ENOTEMPTY, which escapes the guard and fails the whole build.

This bites any PR that changes kolay's dist (all three test apps rebuild in parallel, no turbo cache hit) — it failed 3 consecutive CI runs on #318 (in markdown-only twice and custom-root-url once, racing to the same embroider-vite-jump-79d23f7c target).

Fix

@embroider/vite >= 1.7.7 handles ENOTEMPTY in the race guard (resolver.ts on embroider main — "same race, different errno"). This bumps the three test apps' pins to 1.7.8, plus @embroider/core 4.4.34.6.2 to satisfy 1.7.8's peer range. (docs-app already floats via ^1.5.2.)

Verification

  • pnpm turbo test:browser --force: 6/6 tasks, all test-app + docs-app suites pass with the bumped pins
  • pnpm test:node: 75/75
  • installed @embroider/vite 1.7.8's resolver confirmed to contain the ENOTEMPTY handling

🤖 Generated with Claude Code

…race

CI's Browser Tests job intermittently fails with

  Error: ENOTEMPTY: directory not empty,
    rename '/tmp/embroider-vite-jump-tmp-XXXXXX' -> '/tmp/embroider-vite-jump-<hash>'

whenever multiple test apps build in parallel (turbo) and resolve the
same workspace package: the jump dir is content-addressed by
pkg.root + pkg.name, so concurrent builds race to rename onto the same
target. @embroider/vite 1.5.2 only caught EEXIST from that race, but on
Linux renaming onto an existing non-empty directory throws ENOTEMPTY,
which escaped the guard and failed the build. This bites every PR that
changes kolay's dist (all three test apps rebuild in parallel; it
killed 3 consecutive CI runs on universal-ember#318).

@embroider/vite 1.7.7+ handles ENOTEMPTY in the race guard, so bump the
test apps' pins to 1.7.8 (and @embroider/core to 4.6.2 to satisfy its
peer range). All test-app suites and node tests pass locally.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@bolt-new-by-stackblitz

Copy link
Copy Markdown

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@vercel

vercel Bot commented Jul 13, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the universal-ember Team on Vercel.

A member of the Team first needs to authorize it.

@NullVoxPopuli NullVoxPopuli merged commit 527dddc into universal-ember:main Jul 13, 2026
4 of 5 checks passed
@NullVoxPopuli NullVoxPopuli deleted the fix-browser-tests-race branch July 13, 2026 14:56
@github-actions github-actions Bot mentioned this pull request Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants