Retry bun run build on the release path - #728
Conversation
`bun --bun next build` is a demonstrated flake and it proved it in the worst
place: publishing v1.0.1, bun 1.3.14 took a SIGSEGV during the TypeScript
phase ("oh no: Bun has crashed. This indicates a bug in Bun, not your code"),
exited 132, and took release-assets, publish, verify-install and announce
down with it. Nothing about the code being released was wrong — the identical
command had passed on the identical commit in ci.yml minutes earlier.
ci.yml's build job has wrapped this in 3 attempts since it was written.
publish.yml's two `bun run build` steps had none, so the path where a
spurious failure costs the most was the one without a net.
The publish job's build matters more than cli-tarball's: by then the release
assets are already attached, so a crash there leaves a GitHub Release
advertising daemon binaries whose npm package never shipped.
release-pipeline.test.ts now fails on a bare `run: bun run build` anywhere in
publish.yml, so this cannot silently reopen.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KbT6esM8A8mkSymH13keLt
|
Thanks @NiveditJain for your contribution to Failproof AI! 🙌 We'd love to discuss your PR and welcome you to our community: https://discord.befailproof.ai/ |
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KbT6esM8A8mkSymH13keLt
|
Warning Review limit reached
Next review available in: 16 minutes Limit details: You’ve used all 4 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches📝 Generate docstrings
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. Comment |
Hermes
No summary yet. What this changesNo component map for this revision. RoundsNo review has finished on this pull request yet. FindingsNothing raised yet.
|
Follow-up to #726, found by the v1.0.1 release it unblocked.
What happened
The daemon-build fix from #726 worked — all four legs went green in the real release path, including the
x86_64-unknown-linux-muslleg that had hung through three runner re-dispatches that morning (2.2m). The release then died one job later, on something else entirely:bun --bun next buildsegfaulted inside bun 1.3.14 duringcli-tarball's Build step. Nothing about the code being released was wrong: the identical command had passed on the identical commit inci.yml'sbuildjob minutes earlier. That is the definition of a retryable failure.Because
cli-tarballis upstream of everything,release-assets,publish,verify-installandannounceall skipped. A stable release lost to a crash in the toolchain.The gap
ci.yml'sbuildjob has wrappedbun run buildinnick-fields/retry(3 attempts) since it was written.publish.yml's twobun run buildsteps had no wrapper at all:ci.ymlbuildpublish.ymlcli-tarballpublish.ymlpublishSo the path where a spurious failure costs the most was the one without a net — and the asymmetry was invisible until it fired.
The
publishjob's build is the worse of the two. By the time it runs, the release assets are already attached, so a crash there leaves a GitHub Release advertising daemon binaries whose npm package never shipped — exactly the "release pointing at something that does not exist" classrelease-pipeline.test.tsalready guards the ordering against.What changed
nick-fields/retry@v4,max_attempts: 3,timeout_minutes: 10on bothpublish.ymlbuild steps — same wrapper, same budget asci.yml.release-pipeline.test.ts: a barerun: bun run buildanywhere inpublish.ymlnow fails the suite, and any wrapped one must usenick-fields/retrywith ≥2 attempts. This is the same shape as the other guards added in [luv-legion-725] Cut CI wall clock from ~4min to ~1.7min, and bound the jobs that can hang #726 — the failure mode is silent (a release is simply more fragile than CI), so it needs a test rather than a convention.Scope note
This retries the flake; it does not pin bun.
oven-sh/setup-bun@v2usesbun-version: latestin all eight of its usages repo-wide, so the toolchain drifts under every workflow and 1.3.14 is simply what that resolved to that morning. Pinning is a broader, separate decision — it touches every workflow and changes what "latest" testing means — and three attempts is the proportionate fix for a nondeterministic segfault. Worth raising separately if this recurs.Verification
release-pipeline.test.tsgreen (51 tests, up from 50), and the new guard verified to fail against the pre-fix file shape.publish.ymlparses; both steps confirmed wrapped via a YAML walk of every job's steps.🤖 Generated with Claude Code
https://claude.ai/code/session_01KbT6esM8A8mkSymH13keLt
Hermes review
ae9d4a360ba6Codex is reviewing the current revision in an isolated nested-container harness.