Skip to content

fix: pin Bun to v1.3.11 to fix broken darwin-arm64 release binaries#280

Merged
kbwo merged 1 commit intomainfrom
fix/release-binary-execution
Apr 12, 2026
Merged

fix: pin Bun to v1.3.11 to fix broken darwin-arm64 release binaries#280
kbwo merged 1 commit intomainfrom
fix/release-binary-execution

Conversation

@kbwo
Copy link
Copy Markdown
Owner

@kbwo kbwo commented Apr 12, 2026

Summary

  • Pin Bun version from latest to 1.3.11 in both CI and npm-publish workflows to fix broken darwin-arm64 release binaries

Problem

Since v4.1.3, the released ccmanager binary silently exits on macOS arm64 (Apple Silicon) without doing anything. This affects both v4.1.3 and v4.1.4 releases.

Root Cause

Bun v1.3.12 introduced a regression (oven-sh/bun#29120) where bun build --compile produces darwin-arm64 binaries with a truncated code signature.

The Bun runtime binary grew by ~337KB in v1.3.12 (due to Zig compiler changes), triggering a latent bug in macho.zig's sig_size calculation:

Bun 1.3.11 Bun 1.3.12
Binary size 68,483,104 68,819,776 (+337KB)
LC_CODE_SIGNATURE datasize 550,192 ✅ 196,592 ❌
codesign status Signature=adhoc code object is not signed at all

macOS requires all arm64 binaries to be at least ad-hoc signed. The unsigned binary is immediately killed with SIGKILL (exit 137). The bin/cli.js wrapper then swallows this error silently (since error.status is null, not undefined, it calls process.exit(null) → exit code 0).

Evidence

  • v4.1.2 (last working release): built with Bun v1.3.11 (CI run)
  • v4.1.3 (broken): built with Bun v1.3.12 (CI run)
  • v4.1.4 (broken): built with Bun v1.3.12 (CI run)
  • Locally confirmed: running codesign --remove-signature && codesign -s - on the broken binary restores it to working state

Test plan

  • Merge and create a new release
  • Verify CI uses Bun v1.3.11 in the publish workflow
  • Install the new release via npm and confirm ccmanager runs on macOS arm64
  • Unpin Bun version once oven-sh/bun#29120 is fixed upstream

🤖 Generated with Claude Code

Bun v1.3.12 introduced a regression (oven-sh/bun#29120) where
`bun build --compile` produces darwin-arm64 binaries with a truncated
code signature. macOS requires all arm64 binaries to be at least ad-hoc
signed, so the unsigned binary is immediately killed with SIGKILL
(exit 137).

Root cause: The Bun runtime binary grew by ~337KB in v1.3.12 (due to
Zig compiler changes), triggering a latent bug in `macho.zig`'s
`sig_size` calculation. The LC_CODE_SIGNATURE space allocated is too
small for the actual SuperBlob — 196,592 bytes allocated vs 537,138
bytes needed — resulting in a truncated, invalid signature.

Evidence:
- v4.1.2 (working): built with Bun v1.3.11 (CI run #24075809811)
- v4.1.3 (broken): built with Bun v1.3.12 (CI run #24285207021)
- v4.1.4 (broken): built with Bun v1.3.12 (CI run #24296958808)
- Locally confirmed: `codesign --remove-signature && codesign -s -`
  restores the binary to working state

Pin to v1.3.11 until the upstream fix lands.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@kbwo kbwo merged commit 779d848 into main Apr 12, 2026
1 check passed
@kbwo kbwo deleted the fix/release-binary-execution branch April 12, 2026 03:18
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