homebrew: let guest Homebrew select Kandelo bottles - #944
Conversation
Apply the reviewed Kandelo bottle-tag patch to a pinned Homebrew revision and record reproducible source provenance. Generate a root-owned system environment that makes the guest architecture tag authoritative over prefix and user configuration while keeping the canonical Homebrew launcher path. Test exact tap bottle selection, patch drift and unsafe Git-store rejection, cross-timezone archive identity, hostile environment precedence, and the truthful ABI 39 runtime boundary. This does not change the Kandelo ABI.
|
CI failure audit (external to this PR) The Staging build
I am not changing this PR or rerunning CI against the same invalid shared ledger. The gate should be rerun after either the canonical ABI 39 ledger is repaired or #913 is approved and merged, making its currently published keys the intended main state. |
|
Absorbed by rebase-merged #967. Main is now 6efb411 with the sealed tree b133bfa018f7e2bc84c4845edf2f945b2f844954, and ABI 41 activation completed successfully in run 29550069085. The absorption audit confirmed this PR\x27s behavior and tests are present in that merged tree, so this source PR is closed and its branch is deleted. |
Why
A Homebrew bottle is a prebuilt package archive. Its platform tag tells Homebrew which operating system and processor the archive supports, so Kandelo guests need tags that Homebrew itself recognizes before they can select compatible bottles.
The guest bootstrap carries real Homebrew, but upstream Homebrew does not know Kandelo's
wasm32_kandeloandwasm64_kandelobottle tags. Supplying a wrapper or a parent-process override would make one demo work without fixing Homebrew's own platform selection.What changed
/etc/homebrew/brew.envwith the architecture-specific Kandelo tag andHOMEBREW_SYSTEM_ENV_TAKES_PRIORITY=1, so prefix or user files cannot select a bottle for the wrong guest architecture./usr/bin/brewas a direct symlink to canonical Homebrew. This adds no launcher, wrapper, or install fallback.Evidence
./scripts/dev-shell.sh scripts/test-homebrew-bootstrap-source.shpassed. It covers wasm32/wasm64 tags, UTC/EST/HST archive identity, hostile prefix/user configuration, exact pinned tap bottle selection, patch drift, and non-bare Git-store rejection../scripts/dev-shell.sh bash scripts/check-abi-version.shpassed.homebrew_bootstrap_guest_env.tspassed with the repository's host TypeScript toolchain../scripts/dev-shell.sh scripts/build-homebrew-bootstrap.sh --skip-package-resolvebuilt an 805,316,862-byte ABI 39 image from existing validated package artifacts.rm -rf host/dist, the exact guest probe passed by observing Homebrew load the authoritative system environment before the known continuation limit.3993a5f2c1514121998575bf4e8cceca78f18e45, tree14098eec658b45ef6ded1e3432387b007ae911f8.ShellCheck was not available in the declared dev shell, so it is not claimed here. Bash syntax, Node syntax, and
git diff --checkpassed.Boundaries
This does not change the Kandelo ABI and does not commit a generated VFS image. It proves Homebrew's own bottle-tag selection, not that a GHCR bottle exists, downloads, pours, or runs; the trusted publisher work in #936 owns those claims.
Canonical guest Homebrew currently reaches
/etc/homebrew/brew.envand then truthfully fails when its Ruby dispatcher needs 20,012 continuation bytes but ABI 39 reserves 16,384. This PR preserves that platform failure rather than hiding it. It changes no shared Node/browser host path, so browser runtime behavior is unaffected.