Skip to content

fix(installer): bootstrap Linux with musl wrapper - #4632

Open
sxlijin wants to merge 3 commits into
canaryfrom
sxlijin/issue-4624-bookworm-installer
Open

fix(installer): bootstrap Linux with musl wrapper#4632
sxlijin wants to merge 3 commits into
canaryfrom
sxlijin/issue-4624-bookworm-installer

Conversation

@sxlijin

@sxlijin sxlijin commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Fixes #4624

Summary

  • select the already-published static musl wrapper for Linux curl installs on x86_64 and aarch64
  • preserve macOS, Windows, GNU package-manager wrappers, manifest checksums, self-update target continuity, and existing toolchain artifacts
  • gate wrapper releases on libc-independent ELF linkage and an offline install/run smoke test in the issue's digest-pinned Debian bookworm image
  • add offline installer platform-selection regression coverage

Root cause

scripts/install.sh selected the GNU wrapper before any wrapper-side target detection could run. The published wrapper was built with a GLIBC 2.38/2.39 floor, so Debian bookworm (GLIBC 2.36) failed before selecting a toolchain. Lowering only the wrapper build floor would still leave the GNU toolchain exposed to the same runner-dependent floor. The release contract already publishes required static musl wrappers and toolchains for both Linux architectures.

Verification

  • reproduced exit 7 on debian@sha256:abd67ffcfa541b485a3dff59865ab629aa048a6c613e639d36e7456b0b229241 with GLIBC 2.36
  • locally built x86_64-unknown-linux-musl wrapper and completed installer bootstrap to toolchain 0.17.0 in the pinned image
  • verified no dynamic section or GLIBC symbol-version requirements
  • verified the aarch64 musl wrapper checksum, static linkage, and execution in arm64 Bookworm
  • python3 -m unittest discover -s scripts/tests -p 'test_*.py' -v (52 passed)
  • cargo test --manifest-path baml_language/Cargo.toml -p baml_release -p baml (91 passed)
  • Ruff, Actionlint, Prek YAML/conflict hooks, and git diff --check

Summary by CodeRabbit

  • Bug Fixes

    • Updated Linux installations to use musl-compatible wrappers for x86_64 and ARM64 systems, improving compatibility across Linux environments.
    • Preserved reliable installation behavior across supported Linux and macOS platforms, including offline wrapper installation.
  • Tests

    • Added coverage for wrapper selection across supported Linux and macOS platforms.
    • Added release checks to verify Linux wrappers install successfully and run without dynamic libc dependencies.
    • Improved validation of installer output and installed wrapper versions.

@vercel

vercel Bot commented Aug 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
beps Ready Ready Preview Aug 30, 2026 6:49am
promptfiddle2 Ready Ready Preview Aug 30, 2026 6:49am

Request Review

@github-actions

Copy link
Copy Markdown

⏭️ Performance benchmarks were skipped

Perf benchmarks (CodSpeed) are opt-in on pull requests — they no longer run on every push. They always run automatically after merge to canary/main.

To run them on this PR, do any of the following, then push a commit (or re-run CI):

  • Add RUN_CODSPEED=1 to the PR description, or
  • Include run-perf or /perf in the PR title or any commit message.

@coderabbitai

coderabbitai Bot commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f9a68adc-985c-4f7d-b507-378554ce261a

📥 Commits

Reviewing files that changed from the base of the PR and between 407c809 and 9c832da.

📒 Files selected for processing (1)
  • scripts/tests/test_release_pipeline_contract.py
🚧 Files skipped from review as they are similar to previous changes (1)
  • scripts/tests/test_release_pipeline_contract.py

Included review availability: Your plan provides up to 8 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

The installer now selects musl wrappers for Linux x86_64 and ARM targets. Offline tests cover platform mappings. The release workflow verifies libc independence and installs the wrapper inside pinned Debian Bookworm without network access.

Changes

Installer compatibility

Layer / File(s) Summary
Musl target selection and offline installer coverage
scripts/install.sh, scripts/tests/test_install_sh.py
Linux x86_64 and ARM mappings now select musl targets. The offline test validates installation across five platform and machine combinations.
Release pipeline wrapper smoke test
.github/workflows/release-baml-language.yml, scripts/tests/test_release_pipeline_contract.py
The release job checks for dynamic libc dependencies and runs the installer in pinned, network-disabled Debian Bookworm. Contract tests assert these workflow requirements.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Merge Risk: ⚪ Minimal · up to 9c832

This change selects the static musl wrapper for supported Linux installs while preserving existing platform and release behavior; no actionable merge-blocking risk remains after normal checks and review.

Sequence Diagram(s)

sequenceDiagram
  participant build-wrapper
  participant DebianBookworm
  participant install.sh
  participant baml
  build-wrapper->>DebianBookworm: Start pinned container with network disabled
  build-wrapper->>build-wrapper: Check binary with readelf
  DebianBookworm->>install.sh: Run --wrapper-only
  install.sh->>DebianBookworm: Install musl wrapper from local manifest
  DebianBookworm->>baml: Run --version
Loading

Poem

A rabbit packed a musl-bound crate
Past Debian’s guarded gate
No network flake, no GLIBC fright
The wrapper springs to life just right
And prints its version in the light

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the primary change: selecting the musl wrapper for Linux installer bootstrap.
Linked Issues check ✅ Passed The changes address issue #4624 by mapping Linux x86_64 and aarch64 installations to static musl wrappers, which avoids the Debian Bookworm GLIBC compatibility failure. The regression tests and releas…
Out of Scope Changes check ✅ Passed The workflow smoke test, installer regression test, and release-contract documentation directly support the Linux musl wrapper change and its compatibility requirements. No unrelated code changes are …
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 3 files.
Full details: Linked Issues check

Explanation

The changes address issue #4624 by mapping Linux x86_64 and aarch64 installations to static musl wrappers, which avoids the Debian Bookworm GLIBC compatibility failure. The regression tests and release smoke test verify platform selection and wrapper execution.

Full details: Out of Scope Changes check

Explanation

The workflow smoke test, installer regression test, and release-contract documentation directly support the Linux musl wrapper change and its compatibility requirements. No unrelated code changes are evident.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sxlijin/issue-4624-bookworm-installer

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-08-30T06:30:25.866206Z d6d7525 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions

Copy link
Copy Markdown

Binary size checks passed

7 passed

Artifact Platform File Gzip Gated on Baseline Delta Status
baml-cli Linux 🔒 72.6 MB 27.4 MB file 72.9 MB -263.0 KB (-0.4%) OK
packed-program Linux 🔒 28.6 MB 10.9 MB file 28.6 MB -52.3 KB (-0.2%) OK
baml-cli macOS 🔒 63.1 MB 25.1 MB file 63.3 MB -214.9 KB (-0.3%) OK
packed-program macOS 🔒 25.7 MB 10.2 MB file 25.8 MB -60.3 KB (-0.2%) OK
baml-cli Windows 🔒 82.8 MB 27.8 MB file 83.0 MB -277.3 KB (-0.3%) OK
packed-program Windows 🔒 30.8 MB 10.8 MB file 30.9 MB -106.1 KB (-0.3%) OK
bridge_wasm WASM 22.2 MB 🔒 5.7 MB gzip 5.7 MB +20.4 KB (+0.4%) OK

🔒 = the size this artifact is GATED on (ceiling + delta). Binaries gate on file size (installed binary); WASM gates on gzip (download size). The other size is shown for information only.


Generated by cargo size-gate · workflow run

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.

Official installer wrapper requires GLIBC 2.39 and cannot bootstrap on Debian bookworm

1 participant