Skip to content

fix(ci): retry the Windows build and skip the redundant test-step rebuild - #173

Merged
antfu merged 1 commit into
mainfrom
jolly-boxes-cut
Aug 6, 2026
Merged

fix(ci): retry the Windows build and skip the redundant test-step rebuild#173
antfu merged 1 commit into
mainfrom
jolly-boxes-cut

Conversation

@antfubot

@antfubot antfubot commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

What

unit-test / test (windows-latest, *) has been failing intermittently on main — 37% of the last 40 CI push runs failed, always on this job, never on ubuntu, never a real test assertion. Every failure traces back to turbo run build's native toolchain (rolldown, via tsdown/vite) crashing mid-build with STATUS_DLL_INIT_FAILED (exit -1073741502 / 3221225794), on a different package each time — a Windows-runner environment fault, not a code bug.

Fix

  • scripts/ci-retry.ts: wraps a command with a bounded number of retries, surfacing the real exit code once the budget is spent (a genuine compile error still fails after all attempts).
  • package.json: adds ci:build, which runs the existing build script through the retry wrapper.
  • .github/workflows/ci.yml: the unit-test job's Build step now runs ci:build; its Unit Test step runs vitest directly instead of pnpm run test (build && vitest), since the Build step already produced a fresh dist/ for the same checkout. This halves the number of full-monorepo native builds per job, and with it the crash's attack surface.

Verified locally: pnpm run ci:build completes a full monorepo build, and pnpm exec vitest run against that build passes all 98 test files / 1058 tests.


Created with the help of an AI agent.

…uild

unit-test / test (windows-latest, *) has failed repeatedly on main
(37% of the last 40 CI push runs) with STATUS_DLL_INIT_FAILED
(exit -1073741502 / 3221225794) crashing turbo's native build
toolchain (rolldown, via tsdown/vite) mid-build — an environment
fault unrelated to the code under test, never seen on ubuntu.

- scripts/ci-retry.ts wraps a command with bounded retries and
  surfaces the real exit code once the budget is spent, so a genuine
  compile error still fails the run.
- package.json: pnpm run ci:build runs the existing build through it.
- .github/workflows/ci.yml: unit-test's Build step now runs
  ci:build; its Unit Test step runs plain vitest instead of
  build && vitest, since the Build step already produced a fresh
  dist/ for the same checkout — halving the number of full-monorepo
  native builds per job and with it the crash's attack surface.
@netlify

netlify Bot commented Aug 6, 2026

Copy link
Copy Markdown

Deploy Preview for devfra ready!

Name Link
🔨 Latest commit de1cf0f
🔍 Latest deploy log https://app.netlify.com/projects/devfra/deploys/6a7414630b92db0009f7054b
😎 Deploy Preview https://deploy-preview-173--devfra.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@antfu
antfu merged commit dbf3494 into main Aug 6, 2026
11 of 12 checks passed
@antfu
antfu deleted the jolly-boxes-cut branch August 6, 2026 05:11
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.

2 participants