Skip to content

[Packaging/Homebrew] Admit the reviewed #1097 rootfs build without rewriting provenance - #1108

Merged
brandonpayton merged 5 commits into
mainfrom
homebrew/admit-reviewed-abi42-rootfs-qk044
Jul 26, 2026
Merged

[Packaging/Homebrew] Admit the reviewed #1097 rootfs build without rewriting provenance#1108
brandonpayton merged 5 commits into
mainfrom
homebrew/admit-reviewed-abi42-rootfs-qk044

Conversation

@brandonpayton

Copy link
Copy Markdown
Member

Why

Every Kandelo package archive records the commit that actually built it. Pull request #1097 produced a complete 15-archive rootfs/wasm32 package set at producer commit 748c2609954d2809bbcbbcb642fa7d257fc0dbc6, but the current-main commit that reviews and publishes those bytes is different.

Relabeling the archives as main-built would make their provenance false. Consuming the mutable pr-1097-staging release directly would also let temporary pull-request state enter Homebrew production. Maintainers need a bounded way to admit only the package inputs that were actually audited, while current main remains the sole executable and mutation authority.

This unblocks the first Bash/M4 Homebrew bottle lane. It does not admit the broader browser package set: that 44-root selection has different cache identities for lamp, nginx-php-vfs, and wordpress and must be rebuilt under its real current-main producer.

What changed

  • Add generation format v2, separating immutable archive producer S, release-tag anchor R, and validated current-main authority M.
  • Preserve the exact [Kernel/Homebrew] Land ABI 42 before activating the bottled shell #1097 source closure in a content-addressed preserved-package-generation-... release whose manifest says admission = "none"; ordinary materializers reject it.
  • Hard-bind the one-shot cache-projection method to producer 748c260..., the pr-1097-staging capture, schema-1 rootfs/wasm32, and ABI 42.
  • Have current-main code independently derive and compare the projection, expected ledger, package manifests, parsed recipes, declared/Git inputs, dependency cache identities, global toolchain inputs, and fork-instrument inputs.
  • Publish only an admitted package-generation-... release targeted at validated main M, while archive manifests retain truthful producer S.
  • Recheck main, producer release/tag/assets, commits, and local clean state before each write; upload generation.json last as the application seal and reauthorize before publication.
  • Keep source admission separate from mutable PR-staging cleanup.
  • Allow the reusable Homebrew workflow to consume the bounded rootfs/wasm32 generation only for Bash and M4, without the broader browser/VFS acceptance lane.
  • Update authoritative package, release, Homebrew, agent, and migration documentation.

Safety boundaries

  • The cache bridge rejects every producer, source capture, projection schema, root, architecture, or ABI outside the reviewed [Kernel/Homebrew] Land ABI 42 before activating the bottled shell #1097 case.
  • The 15-package rootfs projection, expected ledger, and selected build-input components are byte-identical between producer S and this candidate.
  • The 44-root browser selection is intentionally excluded; its three cache-identity differences are not waived.
  • Preserved releases are evidence only and cannot be materialized.
  • Promotion does not delete the source release or remove its retention label.
  • Existing v1 generations remain readable.
  • The workflow adds only pull-requests: read; it adds no new write permission.

Validation

  • bash scripts/dev-shell.sh bash .github/scripts/test-package-generation.sh
  • bash scripts/dev-shell.sh bash .github/scripts/test-publish-durable-package-generation.sh
  • bash scripts/dev-shell.sh bash .github/scripts/test-materialize-exact-package-generations.sh
  • bash scripts/dev-shell.sh ruby scripts/check-homebrew-publish-workflow-trust.rb
  • bash scripts/dev-shell.sh bash scripts/test-homebrew-publish-workflow.sh — passed on the identical reviewed tree after installing lockfile-pinned root dependencies.
  • cargo test -p xtask — 570 passed on the identical reviewed tree.
  • bash scripts/dev-shell.sh bash scripts/check-abi-version.sh
  • Exact producer/current comparison: all 15 rootfs entries match; the browser comparison excludes exactly lamp, nginx-php-vfs, and wordpress.
  • Program projection freshness, five-commit range-diff, stable combined patch identity, and git diff --check all pass on the actual post-[Kernel/Homebrew] Land ABI 42 before activating the bottled shell #1097 base.

cargo fmt --all --check was unavailable because the canonical dev shell does not include cargo-fmt; the Rust code compiled and all xtask tests passed.

Scope and rollout

This is packaging/build workflow authority only. It does not change kernel, libc, ABI, Node.js runtime, browser runtime, package revisions, archives, indexes, or VFS images.

This PR does not publish anything. After merge, read exact M from live main, confirm the pinned validator bytes, promote from the already-public preserved generation, verify anonymous readback, and rotate tap callers separately.

Not run

No kernel, libc, POSIX, Sortix, Playwright, or manual browser suites were rerun for this replay because its final source tree is byte-identical to the independently reviewed tree and it does not change runtime surfaces. No GitHub preservation/promotion workflow was dispatched, and no public release, package archive, index, bottle, tap, or VFS artifact was created.

…nt main

Package archives truthfully record the commit that built them. The original durable-generation format also required that producer to be the current-main publisher. That leaves no safe way to retain an immutable archive set across a commit change: rewriting provenance would be false, while accepting an older release by ancestry or cache key would weaken admission.

Introduce generation format v2, which records immutable archive producer S separately from validated current-main authority M and the independently checked release-tag anchor R. Current-main code rederives the selected projection, expected ledger, build-input closure, ABI evidence, archive inventory, and consumer compatibility. Existing v1 releases remain readable.

Carry the separate producer and main identities through publication, materialization, receipts, and the bounded rootfs/wasm32 Homebrew lane. Add fail-closed coverage for tree, projection, component, source-only dependency, architecture, and dispatch drift.
The producer/main split changes a public package-distribution contract. Without one authoritative explanation, a maintainer could mistake a release tag for archive provenance, treat ancestry as input equivalence, or expose preservation evidence as a consumable package generation.

Document the roles of archive producer S, release anchor R, and current-main authority M; the v1 and v2 manifest rules; the selected build-input closure; exact consumer materialization; and the operating sequence for preservation and promotion. State the one-shot rootfs boundary and the broader browser-generation work that remains unclaimed.
A content-addressed manifest is not enough if main, the producer release, or its assets can change between draft creation, archive uploads, the application seal, and the public transition. Without repeated authorization, one release could combine observations from different source states.

Capture one canonical live-source snapshot, rederive semantic evidence with current-main code, and compare a fresh snapshot immediately before every remote mutation. Upload generation.json last as the application seal, then repeat the same authority check before making the draft public.

Exercise successful retry plus source movement before creation, between uploads, before the seal, and before publication so every mutation boundary fails closed.
Admitting immutable package evidence and retiring mutable PR staging are different lifecycle decisions. Letting promotion delete the staging release or remove its retention label would make a successful compatibility proof authorize unrelated destructive cleanup.

Remove promotion-owned staging deletion and label mutation. Document the separate lifecycle boundary and make the focused workflow contract test reject any future source-cleanup write from promotion.
The #1097 cache bridge exists for one reviewed rootfs/wasm32 archive closure. Without explicit code-level bounds, generic v2 inputs could reuse that proof for another producer, source capture, root set, architecture, or ABI. A preservation run from an old clean checkout could also write release state after main had moved.

Hard-bind the bridge to the reviewed #1097 producer, pr-1097-staging capture, schema-1 rootfs/wasm32 selection, and ABI 42. Recheck the direct main ref before tag creation, draft creation, every asset upload, the application seal, and the public transition, while keeping an exact already-public retry read-only. Remove unused pull-request write permission.

Cover unauthorized selections and main movement before the first write, between uploads, and after the seal. Clarify v2 recovery and producer terminology, and remove stale comments that misstated the projection contract.
@brandonpayton brandonpayton added the ready-to-ship Maintainer attests the exact tested head and requests merge preparation. label Jul 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

prepare-merge: test-gate passed against the synthetic PR merge and sealed merge-candidate-abi-v42-pr-1108-run-30201747445-attempt-1. The canonical ABI index is unchanged. merge-gate=success was posted on PR HEAD. This PR is ready for a reviewer to squash merge; default-branch reconciliation will verify the exact merged tree before activation.

@brandonpayton
brandonpayton merged commit 6c02bdd into main Jul 26, 2026
60 checks passed
@brandonpayton
brandonpayton deleted the homebrew/admit-reviewed-abi42-rootfs-qk044 branch July 26, 2026 13:36
@github-actions

Copy link
Copy Markdown
Contributor

Canonical package activation failed closed for merge-candidate-abi-v42-pr-1108-run-30201747445-attempt-1. The tested candidate remains isolated and binaries-abi-v<N>/index.toml was not partially overlaid. Inspect https://github.com/Automattic/kandelo/actions/runs/30204402417. Scheduled reconciliation will retry transient failures; an exact-tree or same-package drift rejection requires a fresh build from the merged target.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-ship Maintainer attests the exact tested head and requests merge preparation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant