Uh oh!
There was an error while loading. Please reload this page.
fix(#433): verify amd64 emulation on Apple Silicon + start colima with VZ/Rosetta - #524
Merged
Merged
Conversation
…h VZ/Rosetta The client images are amd64-only. On Apple Silicon the installer merely printed a note and proceeded, ASSUMING Docker Desktop's emulation works — so if "Use Rosetta for x86_64/amd64 emulation" is off (or colima lacks it), the images crash-loop with an exec-format error minutes later, with no preflight/setup catch. The headless colima path was worse: `colima start` passed no arch/Rosetta flags, so an Apple Silicon Mac got an arm64 VM running amd64 images under slow QEMU or not at all. - assert_amd64_emulation (setup-macos.sh): post-Docker smoke — force-run a tiny amd64 binary (`docker run --rm --platform linux/amd64 busybox:1.36 true`) once Docker is up, and HARD-FAIL naming the exact Docker Desktop setting + the colima remedy, so the problem is caught at setup, never as a crash-looping pod. Wired into install_macos right after Docker is confirmed ready. Intel Macs skip it (native amd64); TRACEBLOC_ALLOW_ARM64 is the escape hatch; image overridable via TB_AMD64_SMOKE_IMAGE. - _install_docker_colima: on Apple Silicon + macOS 13+ (VZ), start colima with `--vm-type vz --vz-rosetta` for Rosetta-accelerated amd64 (matches Docker Desktop's Rosetta setting); older macOS keeps the QEMU default. bash-3.2-safe: the arg vector is never empty. New _macos_supports_vz helper (TB_MACOS_VER-overridable). - _pf_arch (preflight.sh): the macOS note now NAMES the Rosetta setting and says the real check runs once Docker is up — instead of "assume it works". Tests: new scripts/tests/setup-macos-arch.bats (VZ detection, colima flag matrix, smoke pass/fail/skip/override) + a preflight.bats assertion on the named setting. Separate test file from setup-macos.bats to avoid a file-add clash with #429/#521. shellcheck/style/drift clean; manifest regenerated; preflight.bats (82) green. Closes#433 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…con-emulation # Conflicts: # scripts/manifest.sha256
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9bf1513. Configure here.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…64 smoke (Bugbot) Two Bugbot findings on the Apple Silicon work: 1. (High) colima refuses to change vmType on an EXISTING instance, so unconditionally appending --vm-type vz --vz-rosetta aborted `colima start` on a prior QEMU VM (from an earlier install or reboot) with a generic failure. Only request VZ+Rosetta on a FRESH start now (new _colima_instance_exists via `colima list --json`); a pre-existing VM starts as-is, and if its amd64 emulation is broken the post-Docker smoke already names the `colima delete && colima start --vm-type vz --vz-rosetta` recreate remedy. 2. (Medium) assert_amd64_emulation ran `docker run` via unbounded spin_cmd — a wedged daemon or stuck pull could hang a headless install forever. Switched to spin_cmd_bounded (TB_AMD64_SMOKE_TIMEOUT, default 120s); a 124 timeout falls through to the same remediation, per the installer's every-docker-call-is-bounded rule. Tests: +existing-VM colima test (no VZ flags), + bounded-smoke assertion; 11/11 in setup-macos-arch.bats. shellcheck/style/drift clean; manifest regenerated. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aptracebloc
approved these changes
Jul 31, 2026
LukasWodka
commented
Aug 2, 2026
Contributor
/fr-pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

#433 — Apple Silicon: amd64 emulation assumed but never verified; colima lacked Rosetta
The client images are amd64-only. On Apple Silicon the installer just printed a note and proceeded, assuming Docker Desktop's emulation works — so with "Use Rosetta for x86_64/amd64 emulation" off (or colima in play), pods crash-loop with an exec-format error minutes later, no preflight/setup catch. The headless colima path was worse:
colima startpassed no arch/Rosetta flags → an arm64 VM running amd64 images under slow QEMU or not at all.Fix
1. Post-Docker smoke —
assert_amd64_emulation(setup-macos.sh)Once Docker is confirmed up, force-run a tiny amd64 binary:
On failure, hard-fail naming the exact setting (Docker Desktop → Settings → General → "Use Rosetta for x86_64/amd64 emulation") and the colima remedy — so it's caught at setup, never as a crash-looping pod. Wired into
install_macosright after Docker readiness. Intel Macs skip it (native amd64);TRACEBLOC_ALLOW_ARM64is the escape hatch; image overridable viaTB_AMD64_SMOKE_IMAGE.2. colima VZ/Rosetta —
_install_docker_colimaOn Apple Silicon + macOS 13+ (VZ available), start colima with
--vm-type vz --vz-rosettafor Rosetta-accelerated amd64 (matches Docker Desktop's Rosetta). Older macOS keeps colima's QEMU default (amd64 still runs, just slower — and the smoke catches a truly-broken setup either way). New_macos_supports_vzhelper (TB_MACOS_VER-overridable). bash-3.2-safe: the colima arg vector is never empty, so"${_colima_args[@]}"is safe underset -u.3. Preflight message —
_pf_archThe macOS arch note now names the Rosetta setting and says the real check runs once Docker is up, instead of "assume it works".
Acceptance criteria
Tests / gates
scripts/tests/setup-macos-arch.bats: VZ detection (13+/12/junk/undeterminable), colima flag matrix (Apple Silicon+13 → VZ+Rosetta; macOS 12 → QEMU; Intel → none), and the smoke test (pass/fail-names-setting/Intel-noop/ALLOW_ARM64-skip/image-override).preflight.batsassertion that the arch note names the setting + defers to the post-Docker smoke.setup-macos.batsto avoid a file-add clash with fix(installer): macOS installs tools via bare brew — version pins inoperative, no checksums, no execute-gate #429/fix(#429): macOS installs pinned kubectl/k3d/helm via the shared verified path (not bare brew) #521.shellcheck --severity=error, check-style, check-drift clean;preflight.bats(82) green;manifest.sha256regenerated (R8).Closes#433
Note
Medium Risk
Changes macOS installer bootstrap and Colima VM creation flags; failures are intentional early exits, but headless/Apple Silicon install paths are directly affected.
Overview
Apple Silicon installs no longer assume amd64 client images will run. Preflight now names Docker Desktop’s “Use Rosetta for x86_64/amd64 emulation” setting and says the real check happens once Docker is up, instead of implying emulation already works.
After Docker is ready,
assert_amd64_emulationruns a time-boundeddocker run --platform linux/amd64smoke test and hard-fails with Docker Desktop and Colima remediation steps (or honorsTRACEBLOC_ALLOW_ARM64). Intel Macs skip the probe.On headless Colima paths, fresh Apple Silicon VMs on macOS 13+ start with
--vm-type vz --vz-rosetta; existing VMs are left unchanged so Colima doesn’t reject a vmType change. Helpers gate VZ support and instance detection.New
setup-macos-arch.batsand an updated preflight test cover these behaviors;manifest.sha256is refreshed.Reviewed by Cursor Bugbot for commit 1f172ab. Bugbot is set up for automated code reviews on this repo. Configure here.