Skip to content

fix(release): build x86 Linux packages against glibc 2.34 - #466

Merged
kevin-orellana merged 2 commits into
mainfrom
feature/linux-x86-package-20261116
Nov 16, 2026
Merged

kevin-orellana merged 2 commits into
mainfrom
feature/linux-x86-package-20261116

Conversation

@kevin-orellana

@kevin-orellana kevin-orellana commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Human readable section

Problem: The x86-64 Linux archive retained from Release Box run 43488349029 cannot start on the selected Amazon Linux 2023 baseline. Its box executable requires GNU C library (glibc) 2.35, but that system provides 2.34. Even box --version fails before Box starts. The x86 build uses Ubuntu; the ARM64 build already uses an Amazon Linux 2023 container.

Solution: Build x86 with the existing Amazon Linux 2023 container. Check the architecture, program loader, and glibc requirements of all three packaged executables, and verify the packaged Box version. The checker keeps ARM64 as its default and adds an explicit x86 target.

Trade-off: The x86 release job also builds the existing container image. The x86 archive remains a workflow artifact; downloader integration, installed-package qualification, and publication are separate milestones. Workloads still require Box's EXPERIMENTAL_X86_SUPPORT=TRUE environment setting.

ARM64 and x86-64 build jobs use Amazon Linux 2023 with glibc 2.34, package the same three executables, and check their version, architecture, loader, and glibc requirements. The x86 archive remains a workflow artifact.

Both native Linux jobs build in an Amazon Linux 2023 container and check the same three-executable package layout. The x86-64 package remains a workflow artifact. Edit the diagram.

Description

The release workflow sends both native Linux targets through the existing pinned Amazon Linux builder. macOS keeps its existing build path. ARM64 keeps its existing package and workload checks.

python3 scripts/check-linux-package.py stage/box-core --target x86_64-unknown-linux-gnu checks box, strands-box-sock-alias, and strands-box-contain-trampoline. It requires the x86 machine type, /lib64/ld-linux-x86-64.so.2, and public glibc requirements no newer than 2.34. Omitting --target preserves the ARM64 check. The workflow runs the checker inside the existing builder with the source mounted read-only, matching ARM64. A failed check fails the x86 build job before artifact upload. Every build also verifies its packaged Box version.

This change does not modify Box runtime code, access rules, the experimental flag, the downloader, or published release assets.

Related Issues

Part of #45: X3, package validation. This does not close the x86 delivery tracker. Native test automation in #446 remains a separate change.

Type of Change

Bug fix

Testing

Check Result and scope
Native x86 package from this PR Commit 39e7b9c, stamped 0.2.3: all three executables pass architecture, loader, and glibc 2.34 checks inside the builder with the source mounted read-only. Native box --version exits 0 and reports strands-box 0.2.3. Release compilation took 2 minutes 27 seconds with cached dependencies. Archive SHA-256: 12c872663378da843c14153e8d2163f348bd7a688f1800f655aa9fd6b248668b.
Python packaging and release suites 99 tests pass with no failures or skips on native Linux ARM64. The final release-workflow subset passes 25 tests.
Checker regression controls Original ARM64 tests pass. Four isolated mutations of architecture, loader, glibc ceiling, and required-helper checks fail.
Workflow controls Both Linux targets select the container build, macOS selects the host build, and each package check selects its intended target. Restoring ARM-only build routing or disabling the x86 package check makes the regression test fail. The x86 test also checks the container invocation and read-only source mount.
Retained x86 archive Run 43488349029, actual product source 70eb3af, version stamp 0.2.3: native Amazon Linux 2023 rejects box --version because hypot requires GLIBC_2.35. The new checker also rejects this archive. The build job succeeded; the overall run later ended canceled.
Native container command The exact workflow command rejects the retained x86 package and accepts the replacement. Inspections of both running checker containers confirm that /src is read-only. No rebuild or workload run was required for this control.
ARM64 archive from the same run Base checker, candidate default, and explicit ARM64 target all pass with identical JSON. The x86 target rejects it. Native ARM64 box --version reports strands-box 0.2.3.
Same-source x86 rebuild Pass on native Amazon Linux 2023: all three binaries match x86-64 and the expected loader, require at most glibc 2.34, and pass the candidate checker. box --version exits 0 and prints strands-box 0.2.3. The build used Rust 1.98.1 and the same 408 compiled package/version entries as the retained build; release compilation took 9 minutes 24 seconds.

Hosted packaging tests and all four CodeQL analyses pass at 39e7b9c. The updated Actions analysis reports no findings.

Actionlint reports four diagnostics that also occur on unchanged bd388093: two existing cache-mode keys and two existing xcode-27 runner labels. The workflow parses as YAML, and all six affected shell blocks pass bash -n.

Native package comparison

The retained x86 archive has SHA-256 7127bb660210ebf0b432289e1e42ac140d0337880074fa13f91820eb4868b7b3. The replacement archive has SHA-256 1a60bd959346463bf57a5283eaf681d99fa6b349fb04cd78785a7225788b4f0b. Each archive contains all three executables from its own build. The same checker rejects the retained archive and accepts the replacement. The replacement's hypot import requires GLIBC_2.2.5, below the 2.34 ceiling.

The original hosted job did not preserve its stamped source tree. The comparison matches its recorded source, version stamp, compiler, target, features, and compiled package versions; it is not a byte-for-byte reproducibility claim.

The historical comparison uses source 70eb3af and the same 0.2.3 version stamp to isolate the build-environment change. The separate native build of 39e7b9c validates this PR's package. Local native builds stamped the two shipped crate versions and their lockfile entries directly; cargo-edit was unavailable. No dependencies changed during stamping or compilation. These checks do not qualify an installed release. No new Codex, Claude, installed-package lifecycle, or published-download runs are claimed.

A full unsigned GitHub release rehearsal remains deferred while the shared release workflow is reserved for the v0.2.3 publication. No tag or release was published by this work.

  • I ran the applicable Python suite: python3 -m unittest discover -s scripts -p 'test_*.py' -v. No Rust source or Cargo inputs changed in this PR, so Cargo unit tests and lint were not rerun. The native release builds are recorded above.
  • If I touched Rust, I ran cargo fmt --all and cargo clippy --workspace --all-targets --all-features -- -D warnings — not applicable; no Rust changes.

Checklist

  • I have read the CONTRIBUTING document
  • I have reviewed and understand every line of code in this PR, including any generated by AI tools, and I can explain why it works
  • My change is focused and reasonably small; I have split unrelated work into separate PRs
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • My changes generate no new compiler warnings. The candidate emits the same 69 containment warnings as the retained base build.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions github-actions Bot added bug Something isn't working Area - Release labels Nov 16, 2026
@kevin-orellana
kevin-orellana marked this pull request as ready for review November 16, 2026 19:37
@github-actions

Copy link
Copy Markdown

Assessment: Approve

I reviewed head 39e7b9c. I found no correctness, scope, or premise problems that need a change. The x86-64 Linux leg now builds in the pinned Amazon Linux 2023 builder. The new --target check rejects the failure this PR describes, and it keeps the ARM64 behavior the same.

Checks that held
  • Build routing: endsWith(..., '-unknown-linux-gnu') sends both Linux triples to the container, and the host build now runs only for aarch64-apple-darwin. A triple outside the matrix (musl, for example) would fail loudly at Package tarball, not ship silently.
  • Builder image on an x86 runner: the pinned amazonlinux@sha256:c07ab07… digest is a multi-arch manifest list (amd64 + arm64), so ubuntu-22.04 pulls a native x86-64 image and not an emulated one.
  • Checker against real readelf output (run on an x86-64 host): an Ubuntu binary with GLIBC_2.2.5/GLIBC_2.3.4 names passes the machine, loader, and version parsing. A binary that needs GLIBC_2.38/GLIBC_ABI_DT_RELR is rejected with rc=1. An x86 binary checked without --target is rejected with expected an AArch64 executable.
  • Backward compatibility: calls with no --target and inspect(binary) with one argument keep the ARM64 default.
  • Container check step: WORKDIR /src, the read-only mount, and readelf/python3 in the image together resolve stage/box-core correctly.
  • Version check on every leg: on x86 it runs on the Ubuntu host (glibc 2.35), so the glibc ceiling is enforced only by the checker step that follows it. That order is correct.
  • Release path: inspect already required the x86 tarball, and nothing about publication changes. A failed x86 check now blocks the run before artifact upload, as the description says.
  • Repository rules: no frozen strands-box surface or foundational premise is touched (root AGENTS.md). README.md and docs/dev/releases.md are updated in the same change, as .agents/references/doc-updates.md requires for build and gate changes. The x86 opt-in described in the docs matches crates/box/src/command/platform.rs.
  • Tests: python3 -m unittest discover -s scripts -p 'test_*.py' ran 99 tests. The only 2 failures (test_noexec_download_storage_allows_valid_packages) come from this environment, where unshare may not write uid_map. They fail the same way on main.

The regression controls are well targeted: there are workflow-routing tests, and each checker rule has its own isolated mutation.

@kevin-orellana
kevin-orellana enabled auto-merge (squash) November 16, 2026 19:45
@kevin-orellana
kevin-orellana merged commit abc5578 into main Nov 16, 2026
29 of 31 checks passed
@kevin-orellana
kevin-orellana deleted the feature/linux-x86-package-20261116 branch November 16, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Release bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants