homebrew: build complete VFS images from static Brewfiles - #959
Closed
brandonpayton wants to merge 2 commits into
Closed
homebrew: build complete VFS images from static Brewfiles#959brandonpayton wants to merge 2 commits into
brandonpayton wants to merge 2 commits into
Conversation
Homebrew-built application images need an existing platform root filesystem, but the VFS builder previously could only pour bottles into an empty image. Accept an explicit ABI-matched platform base while preserving truthful bottle and filesystem provenance. Restore the base with its recorded growth ceiling, rebase only for an explicitly different capacity, and reject unlabeled, ABI-mismatched, or previously Homebrew-composed inputs. Bind only the base hash, byte count, and ABI into output metadata while retaining full source metadata in the external report, so large attestations cannot overflow output metadata or claim the mutated bytes. Record canonical tap identity, preserve unchanged base inodes during default composition, and cover first-party and third-party taps, near-limit metadata, composition rejection, retained files, and both capacity paths.
Contributor
Phase B-1 matrix build status —
|
| Package | Arch | Status | Sha |
|---|---|---|---|
| kandelo-sdk | wasm32 | failed | — |
| rootfs | wasm32 | failed | — |
| shell | wasm32 | failed | — |
| lamp | wasm32 | failed | — |
| node-vfs | wasm32 | failed | — |
| wordpress | wasm32 | failed | — |
Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.
Member
Author
|
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. |
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 needs a reproducible way to turn Homebrew formula selections into a
complete virtual filesystem image. The existing builder could pour bottles into an
empty filesystem, but that image lacked the operating-system files from a
platform base. It also accepted formula roots only as command-line flags, so a
checked-in Brewfile could not define the image.
Evaluating a normal Brewfile during an image build would be unsafe and
non-reproducible because Homebrew Bundle files are executable Ruby. The image
builder instead needs a small, explicit selection contract that never executes
the input and that binds the selected tap, roots, base image, and bottle bytes
to the resulting image.
This provides the build-time half of the Homebrew migration path: a tap and a
static Brewfile can produce a complete, auditable VFS image. Full Homebrew
Bundle behavior remains owned by real Homebrew running inside Kandelo.
What changed
--base-image <image.vfs|image.vfs.zst>so verified bottles can becomposed onto an ABI-matched platform image. Reject unlabeled, ABI-mismatched,
and already-composed bases.
existing inodes only when an explicit, aligned
--max-bytesrequests a newcapacity.
--brewfile <Brewfile>with a Ripper-validated static subset: exactly oneliteral lowercase tap and 1 to 128 literal
brewentries. The parser acceptscomments and blank lines, but rejects options, interpolation, conditionals,
nested Ruby, other Bundle entry types, and multiple taps without evaluating
the file.
and fully qualified formula names, reject duplicates, and resolve a bounded
dependency closure in deterministic dependency-first order.
--package <name>for lower-level callers. It is explicitlymutually exclusive with
--brewfile.digest, tap commit, base digest, and bottle digests. Bounded VFS metadata
carries summaries; the external report carries the detailed audit record.
Set.add()as aboolean. Duplicate roots, packages, dependencies, and link targets now fail
closed.
guest Homebrew Bundle behavior.
Validation
Run from the repository dev shell on exact commit
e539654fe4910658e1c11e0aa4c8c22122dbdbbf:scripts/test-homebrew-brewfile-selection.shpassed, including dynamic Ruby,interpolation, duplicate, foreign-tap, size, count, symlink, NUL, and invalid
UTF-8 rejection cases.
scripts/test-homebrew-tap-native-sidecars.shpassed. It covers dependencyclosure, explicit-package compatibility, static Brewfile composition, base
ABI and capacity rules, bounded provenance, exact tap identity, and a
third-party tap.
browser bundle build passed.
scripts/check-abi-version.shandgit diff --checkpassed.The full host Vitest suite was also attempted, but this artifact-light worktree
cannot provide a green broad-suite claim: 90 test files and 1,107 tests passed;
30 files and 53 tests failed, primarily because kernel and program Wasm
fixtures are absent, plus one unrelated artifact-guard timeout. The focused
Homebrew tests passed inside that run.
Scope and remaining evidence
The image-building command is Node.js-only because it reads local metadata,
bottles, Brewfiles, and images. The resulting VFS bytes are host-neutral. A real
Node or browser boot of a multi-package Brewfile image was not run, so the next
acceptance rung still needs to boot this output on both hosts.
The static builder intentionally supports one tap. Multi-tap composition needs
an explicit cross-tap metadata and provenance contract. Full dynamic Brewfile
DSL remains available only through real Homebrew inside a running Kandelo
machine.
This does not change the Kandelo kernel ABI and does not rebuild or publish any
package, bottle, release artifact, or existing VFS image. Newly composed VFS
and report bytes include the new selection provenance.
This is a source PR for the broad non-ABI Homebrew release-control batch. It
should be absorbed unchanged and validated with that batch rather than merged
on its own.