Let a host that needs no launcher run its own smoke test - #168
Merged
Conversation
Every macOS leg of the executor has been dying since the Rosetta gate
landed, after a complete and valid build: the SDK is finalized, the
static validation passes, the toolchain contract passes, and then
build-host.sh exits with `run[@]: unbound variable` and stages nothing.
The upload finds an empty out/ and the Intel host, which needs the arm64
SDK to cross from, fails behind it. arm64-apple-darwin is a required
host, so no snapshot could publish at all.
The launcher prefix is an array that is empty for every host that runs
its own binaries -- as the comment above it says -- and macOS's
/bin/bash is 3.2, where expanding an empty array under `set -u` is an
error rather than nothing:
$ /bin/bash -c 'set -u; run=(); "${run[@]}" echo hola'
/bin/bash: run[@]: unbound variable
$ /bin/bash -c 'set -u; run=(); ${run[@]+"${run[@]}"} echo hola'
hola
build_and_stage() already carries the tolerant form, and the reason for
it, three lines below.
This has now bitten twice in the same file: fixed once in "Expand possibly-empty arrays the way macOS's bash 3.2 tolerates", reintroduced with the Rosetta launcher, and both times it cost a full macOS build that finished, validated, and then staged nothing. Deciding case by case which array can be empty is the judgement that failed, so the remaining expansions in the scripts that run on a published host all take the tolerant form -- it means the same thing as the plain one whenever the array has elements -- and a test refuses any that do not. Against the parent of this branch it names lines 161 to 165 of build-host.sh, the ones that broke the nightly. The test is static because it has to be: BASH_COMPAT=32 does not restore the 3.2 behaviour, so nothing running on a Linux runner can reproduce it by executing anything.
This was referenced Aug 25, 2026
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 free
to 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.
Every macOS leg of the executor has been dying since the Rosetta gate landed, after a complete and valid build. From the arm64 job of
vitasdk/autobuilds#36:The SDK is finalized, the static validation passes, the toolchain contract passes, and then the script exits and stages nothing. The Intel host fails behind it for the reason it should —
no build-machine SDK found for x86_64-apple-darwin (needs arm64-apple-darwin)— because the arm64 artifact it cross-builds from was never uploaded.arm64-apple-darwinis a required host, so no snapshot can publish at all; the last one that did,sdk-snapshot-20260825.612.1, was built from79a92784, the commit before this landed.smoke_test_bootstrap's launcher prefix is an array that is empty for every host that runs its own binaries — the comment above it says so — and macOS's/bin/bashis 3.2:build_and_stage()already carries the tolerant form, and the reason for it, three lines below the break.The second commit is separable — take only the first if you would rather. This is the second time the same class has hit this file: fixed once in
9233c494a, reintroduced by the launcher. Deciding case by case which array can be empty is the judgement that failed, so every expansion in the scripts that run on a published host takes the tolerant form, and a test refuses any that do not. Run against the parent of this branch it names lines 161–165 ofbuild-host.sh— the ones that broke the nightly:The test is static because it has to be:
BASH_COMPAT=32does not restore the 3.2 behaviour, so nothing on a Linux runner reproduces this by executing. The rewrite is mechanical and means the same thing whenever the array has elements;${#name[@]}and${!name[@]}are fine in 3.2 and are left alone.tests/is outside the rule — it runs on ubuntu only.Every suite in the
checksjob passes locally, and both bashes parse every rewritten script (bash -n,/bin/bash -n).tests/package/test-vdpm-bundle.shfails here with and without this change: it wants a stage-1 SDK, and it is not inchecks.AI tools were used in preparing this PR (Claude Opus 5, Anthropic).