fix: warm the Solid plugin before the release bundle and retry a failed build once

Merged
RA
3h ago
+40-1

Issue for this PR

Closes #1694

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The EISDIR on @babel/traverse is a race in Bun 1.3.14's resolver, not the bun install calls in build.ts (those finish before Bun.build starts). The binary bundles @babel/core, so the bundle thread resolves Babel's packages from the symlinked store, while the Solid plugin's Babel lazily requires the same packages on the JS thread. Bun caches whether each symlink is a file or a directory without a lock, so the losing side can read a package directory as a file. Bun 1.4 locks that lookup.

  1. build.ts runs the Solid plugin once on a throwaway .tsx, in a build that resolves nothing, before the real bundles, so Babel's lazy requires happen before any bundle thread starts.
  2. release.yml retries a failed build once in a fresh process, with a warning on the run, so one flaky target can't hold up the release.

How did you verify your code works?

  • Synthetic repro on Bun 1.3.14: 52 of 100 builds hit the same EISDIR when a plugin resolved on the JS thread, 0 of 300 without.
  • strace on the real build.ts (linux-x64): JS-thread lookups under node_modules during the main bundle went from 117 to 0.
  • linux-x64 binary runs, fresh-start test and release-critical tests pass, typecheck clean, retry loop simulated.

Investigation notes: https://github.com/AltimateAI/altimate-code/pull/1823#issuecomment-7092877116. Claims and Codex review log: https://github.com/AltimateAI/altimate-code/pull/1823#issuecomment-7092895387.

Cost side effects

None.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR
  • I checked for cost side effects (model calls, queries or cloud resources that grow with user data) and described them, or wrote "none"

šŸ¤– Generated with Claude Code

https://claude.ai/code/session_01VEmKQv6E2XpAgL5eJE8RYi

Summary by CodeRabbit

  • Chores
    • Release builds now retry once after a failed build attempt, helping recover from intermittent failures.
    • Build preparation has been updated to improve consistency across target builds.