Skip to content

fix(ci): serialize tests sharing Vite optimizer cache - #2874

Merged
james-elicx merged 1 commit into
mainfrom
codex/fix-route-file-collision-main
Aug 10, 2026
Merged

fix(ci): serialize tests sharing Vite optimizer cache#2874
james-elicx merged 1 commit into
mainfrom
codex/fix-route-file-collision-main

Conversation

@james-elicx

Copy link
Copy Markdown
Member

Summary

  • move five Vite dev-server/build fixture files from the parallel unit project to the serial integration project
  • prevent concurrent fixtures from invalidating each other through the physically shared node_modules/.vite optimizer cache
  • cover the rotating failures seen in main run 31431720057 and main run 31436702312

Root cause

createIsolatedFixture() gives each temporary project a symlink to the workspace node_modules. Vite therefore resolves each nominal <fixture>/node_modules/.vite directory to the same physical optimizer cache. When these files run in parallel workers, one server can re-optimize that cache while another request is loading it. The captured 500 body was Vite throwOutdatedRequest: “There is a new version of the pre-bundle”.

The five moved files all have this exact topology:

  • sass-tsconfig-paths.test.ts
  • hybrid-i18n-api-handoff.test.ts
  • middleware-matcher-auth.test.ts
  • tsconfig-path-alias-resolution.test.ts
  • optimize-deps-jsx-in-js.test.ts

Validation

  • unit collection: 0 tests from these files
  • integration collection: 43 tests
  • focused integration run: 43/43 passed
  • integration shard manifest check: 78 files, clean
  • planned integration shard 10/10: 126/126 passed with no outdated-prebundle errors
  • vp check vite.config.ts: passed
  • exact CI=1 vp test run --project unit --shard=1/3: no HTTP 500 or outdated-prebundle error; one unrelated local performance-trace 5-second timeout remained under concurrent machine load

Two independent reviews reported no actionable findings before this PR was opened.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

@pkg-pr-new

pkg-pr-new Bot commented Aug 10, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@2874
npm i https://pkg.pr.new/create-vinext-app@2874
npm i https://pkg.pr.new/@vinext/types@2874
npm i https://pkg.pr.new/vinext@2874

commit: b0d4ace

@github-actions

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
workers-cache preview production
web preview production

@james-elicx
james-elicx marked this pull request as ready for review August 10, 2026 22:40
@github-actions

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared b0d4ace against base 8c1804d using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 135.2 KB 135.2 KB ⚫ +0.0%
Client entry size (gzip) vinext 122.7 KB 122.7 KB ⚫ +0.0%
Dev server cold start vinext 2.96 s 2.93 s ⚫ -0.9%
Production build time vinext 3.05 s 3.07 s ⚫ +0.6%
RSC entry closure size (gzip) vinext 114.2 KB 114.2 KB ⚫ -0.0%
Server bundle size (gzip) vinext 193.0 KB 193.0 KB ⚫ -0.0%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@james-elicx
james-elicx marked this pull request as draft August 10, 2026 22:41
@james-elicx
james-elicx marked this pull request as ready for review August 10, 2026 22:43
@james-elicx
james-elicx merged commit d558d62 into main Aug 10, 2026
76 of 77 checks passed
@james-elicx
james-elicx deleted the codex/fix-route-file-collision-main branch August 10, 2026 22:43
@ask-bonk

ask-bonk Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

@james-elicx Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

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