[Homebrew] Make the stock guest bootstrap usable#1059
Draft
brandonpayton wants to merge 2 commits into
Draft
Conversation
brandonpayton
force-pushed
the
codex/homebrew-guest-bootstrap-qk044
branch
from
July 22, 2026 20:10
55885e5 to
17bf2ba
Compare
Member
Author
|
Fresh exact-shell CI stopped before building the Homebrew image: the changed Bash revision correctly missed the older public archive, but the generic source fallback had not prepared musl or the wasm32 sysroot. That workflow defect is isolated in #1065, including clean-source cache protection. After #1065 lands, I will restack this draft and rerun the changed-Bash path as the end-to-end proof. |
Phase B-1 matrix build status —
|
| Package | Arch | Status | Sha |
|---|---|---|---|
| bash | wasm32 | built | d3cdc172 |
| rootfs | wasm32 | built | 094a00cc |
Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.
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.
Why
Kandelo can start upstream Homebrew, but starting
brew --versionis not enoughto make Homebrew useful inside a guest machine. Stock Homebrew also expects a
writable Linuxbrew prefix, a versioned Ruby location, Git and certificate
paths, cache and lock directories, and a supported way to discover taps without
silently cloning the very large
homebrew/corerepository.Without those pieces, ordinary commands such as
brew config,brew doctor,and
brew tapfail even though thebrewscript itself launches. This PR givesthe opt-in Homebrew image that conventional guest layout. It keeps
/usr/bin/brewas a direct link to pinned upstream Homebrew rather than hidingmissing platform behavior behind a Kandelo-specific wrapper.
This is groundwork for a built-in
brewcommand in the main shell. It does notactivate that command in the main shell yet, and it does not claim that the
complete install lifecycle is ready.
What changed
4ead8619231cb15cbe15e8e8188081e347d6f7cd, the reviewed revision thatsupports the public Formula syntax used by the Kandelo tap.
/usr/bin/brew, Ruby, RubyGems, and Bundler through their normalguest paths.
linuxbrewuser (uid=1000,gid=1000) the standardwritable repository, Cellar, tap, cache, configuration, lock, and temporary
directories.
and Git HTTP/HTTPS helper paths using the corresponding Kandelo image files.
package API has no Kandelo platform index, so API mode otherwise requests a
nonexistent
dunno_genericindex. No-API mode also prevents unrelated customtap commands from cloning
homebrew/coreautomatically.truthfully leaving the live checkout and install state guest-writable.
guest contract, and Chromium guest contract.
What the current proof covers
The exact opt-in image has demonstrated the following behavior through stock
Homebrew commands:
brew configreports the Linuxbrew prefix and Kandelo's Ruby, Git, curl, andno-API configuration.
brew doctorchecks for directories, temporary state, Git,and core integrity pass. The remaining warning truthfully says that this
image has no source-build developer toolchain.
brew tapclones the publicKandelo-dev/homebrew-tap-coretap and resolvesits Bzip2 bottle.
brew tapalso clones the independent public canary tap and resolves M4 plusits fully qualified Dash dependency from the first-party tap.
brew install --force-bottle kandelo-dev/tap-core/bzip2download, pour, andexecute the public bottle. Its receipt records
poured_from_bottle: trueandno runtime dependencies.
The small diagnostic metadata closure is evidence, not a product mechanism.
A complete
homebrew/corecheckout measured about 1.3 GiB, including a 1.22GiB Git pack with more than 3.6 million objects, so embedding or cloning it in
the guest is not viable.
Remaining work
Kandelo Formulae currently describe publisher-only native tools such as
binaryenandwabtas Formula dependencies. Stock Homebrew recursivelyresolves those Formulae before it prunes them from a bottle installation. The
next change will model them as tightly allowlisted custom Homebrew
Requirementclasses, which is Homebrew's normal representation for externaltools that do not belong in the guest Formula graph.
That follow-up must preserve exact publisher trust and provenance, reject
unknown or forged Requirement definitions, and test ordinary install,
reinstall, uninstall, and cross-tap behavior in Node.js and Chromium. Durable
state across reboot and activation of
brewin the canonical main shell alsoremain Phase 5 work.
Validation
Fresh validation after restacking these commits onto current
main:git diff --checkEarlier exact-candidate validation also built the 805,315,495-byte bootstrap
image and passed the same unprivileged guest contract in Node.js and Chromium,
plus the live tap and diagnostic Bzip2-pour checks described above. The current
restacked head must repeat its exact image and runtime gates in CI; those broad
runtime claims are not inferred from the focused restack checks alone.
This changes the opt-in package/image contract and shared Node.js/browser guest
bootstrap path. It does not change the kernel ABI.