homebrew: make guest bootstrap images reproducible and ABI-checked#902
homebrew: make guest bootstrap images reproducible and ABI-checked#902brandonpayton wants to merge 1 commit into
Conversation
|
Exact-head CI rerun classification for The first full Vitest attempt had two unrelated timing failures: Passing rerun: https://github.com/Automattic/kandelo/actions/runs/29196248678/job/86661597571 This supports a timing/load classification for the first attempt; it does not broaden this PR's runtime claim beyond its reproducible bootstrap-builder and artifact-validation scope. |
|
Independent devil review of exact head
The exact retained ABI 18 build was not contaminated (this worktree has no local overrides), pinned archive provenance is sound, and the branch applies textually cleanly to locked #907. After both fixes and #907 publication, rebuild both modes at ABI 39, inspect all upstream symlink targets/modes/owners, and run real |
|
The dedicated generic fix for blocker 1 is now open for maintainer review as #917 at exact head Fresh security review accepted the corrected head after reproducing and closing both the original symlink flattening and a manifest-path alias write-through exploit. On #902's exact pinned Homebrew archive it planned 3,511 entries, preserved all 167 symlinks (11 parent-relative), and found zero target/mode/uid/gid mismatches; the explicit #902 remains blocked: #917 must land, and the separate artifact-root provenance change is still in exact local review/integration. No ABI 39 bootstrap image rebuild has been claimed yet. |
|
The two generic blockers identified while validating this bootstrap now have dedicated main-repo PRs:
After both land, this branch will be restacked onto their exact commits, pass |
|
ABI 39 integration update (no change to this PR head): I assembled locked #907 ( Two boundaries remain before this PR can truthfully claim a reproducible, usable bootstrap:
The combined contract suites are otherwise green: mkrootfs 160/160 after adapting the ABI 39 lazy-identity assertion, host ZIP/lazy 33/33, manifest/wasm validator 26/26, host ESM/CJS/DTS builds, TypeScript, shell syntax, and ABI snapshot checks. |
|
Replacement batch #921 preserves this PR exact patch as commit |
Treat manifest and ZIP paths as untrusted archive input: require canonical absolute manifest paths, byte-exact UTF-8 canonical relative ZIP names, and compatible path graphs before VFS mutation. Preserve validated Unix symlink targets and ownership rather than flattening them into regular files. This removes the generic image-builder blocker found while reviewing the Homebrew bootstrap in #902. It does not change the Kandelo ABI.
|
Superseded by merged #921. The original commit is patch-equivalent to main commit be77b14 ( |
Summary
The Homebrew source archive is produced from a bare object store with
git archive; no checkout state can leak into it. Both supported build modes reproduced archive SHA-256318d9e0fc96b52893a2a5555b0990a3471308cc120938ce369df1b12314606a8.Validation
./scripts/dev-shell.sh scripts/build-homebrew-bootstrap.shtarget/homebrew-bootstrap/homebrew-bootstrap.vfs(805,312,928 bytes)./scripts/dev-shell.sh scripts/build-homebrew-bootstrap.sh --skip-package-resolvetests/package-system/validate-wasm-artifacts.test.ts: 3/3 passed insidescripts/dev-shell.shmkrootfs inspectcheck confirmed image ABI 18, executablebrewowned by 1000:1000, executable Ruby, and embedded provenance metadatabash -n scripts/build-homebrew-bootstrap.shgit diff --checkCurrent boundary
This PR codifies the reproducible bootstrap artifact; it does not claim guest Homebrew is fixed. Running upstream
brew --versionfrom the generated image reaches the known ABI 18 continuation-save overflow and traps at the already diagnosed Bash path. PR #845 makes that overflow truthful; the capacity fix remains the ABI/relink work in #862. No ABI change or binary publication occurs in this PR.shellcheckwas not run because it is not available in the declared Nix dev shell.