homebrew: let each tap publish bottles from reviewed sources - #957
Closed
brandonpayton wants to merge 2 commits into
Closed
homebrew: let each tap publish bottles from reviewed sources#957brandonpayton wants to merge 2 commits into
brandonpayton wants to merge 2 commits into
Conversation
Allow conventional owner/homebrew-name repositories to use the reusable publisher while keeping checkout, GHCR, and token authority bound to the caller repository. Carry the distinct canonical owner/name Homebrew identity through build evidence, OCI receipts, Formula paths, and sidecars, with the existing first-party naming exception explicit.
brandonpayton
force-pushed
the
refresh/generic-homebrew-tap-publisher-20260715
branch
from
July 15, 2026 20:40
faeabc2 to
c55409a
Compare
Formula builds run as a separate system identity that cannot traverse the runner checkout parent. Bind the reviewed Kandelo and tap trees into each transient service through root-owned read-only aliases, hide their original paths, and fail explicitly when source auditing cannot traverse a protected tree.
This was referenced Jul 15, 2026
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. |
brandonpayton
deleted the
refresh/generic-homebrew-tap-publisher-20260715
branch
July 17, 2026 02:39
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 the same bottle publisher to work for the default tap and for third-party taps. Two separate assumptions currently prevent that.
First, the publisher treated a GitHub repository name and a Homebrew tap name as one value. They are different for a normal tap: repository
Example/homebrew-toolsbecomes Homebrew tapexample/tools. The repository name decides who may publish and where GHCR stores bottles. The tap name decides Formula names and Homebrew install paths. Mixing them sends authority or artifacts to the wrong place. Accepting arbitrary names would be unsafe too, because another repository must not be able to claim Kandelo's protected first-party tap name.Second, Formula builds run as a restricted Linux user. GitHub's runner checkout can live below private parent directories that this user cannot traverse, so the build cannot read the reviewed Kandelo and tap sources. Making those checkout directories broadly accessible would weaken the isolation that keeps Formula code away from publisher credentials and output files.
This PR gives each identity one clear job and exposes reviewed source trees through root-owned, read-only views. The Formula can read exactly the source it needs, while the original checkouts and publication output remain hidden.
What changed
This PR intentionally keeps two independently reviewable commits:
c55409a96d3fbe191d9e07b8428891e15a46ffd6separates repository identity from Homebrew tap identity.Example/homebrew-toolsmust map to tapexample/tools.automattic/kandelo-homebrewtap are rejected.0030dd5856544aef41c553ce70f77895995b28fdlets the restricted Formula user read reviewed sources without weakening isolation.The first-party maintenance workflow remains first-party-only because it can roll back or delete default-tap state. A third-party tap may use the generic publisher to rebuild its own bottles, but generic rollback and deletion are outside this PR.
This change does not modify Kandelo's ABI.
Validation
Exact reviewed head:
0030dd5856544aef41c553ce70f77895995b28fdExact reviewed tree:
730f22252fc10832c15f54f38eb416ba34b17ab3Passed locally through
scripts/dev-shell.shon the exact head:ruby scripts/check-homebrew-publish-workflow-trust.rbbash scripts/test-homebrew-patched-launcher.shbash scripts/test-homebrew-publish-workflow.shbash tests/scripts/package-publish-flow.shbash scripts/check-abi-version.shgit diff --checkThe local host was macOS, so the launcher test covered its non-Linux path. Before consolidation, the same source-alias implementation from #958 passed the full privileged fixture on Ubuntu 24.04 with systemd 255. The extra exact-mapping trust assertions and two-alias fixture assertions added during consolidation still require the hosted Linux gate on the integration batch.
Independent review of exact head
0030dd585found no remaining blockers.Merge plan
This is a source-review PR, not the merge unit. It should be absorbed as these two preserved commits into the broad non-ABI integration batch, where the hosted union gates run once. Do not merge this source PR directly.