Skip to content

[Homebrew/Packages] Build seven programs from sealed tap recipes - #129

Draft
brandonpayton wants to merge 11 commits into
mainfrom
homebrew/close-shell-demo-recipes-qk044
Draft

[Homebrew/Packages] Build seven programs from sealed tap recipes#129
brandonpayton wants to merge 11 commits into
mainfrom
homebrew/close-shell-demo-recipes-qk044

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Why

Seven shell and demo programs still get their build recipes from
Kandelo's legacy package registry. This change makes each Homebrew
Formula and its tap-owned recipe the complete, reviewable source of its
build instead.

The publisher verifies recipe inputs and mounts them read-only. Some
upstream build systems write generated files into their source tree, so
those builds need a private writable copy. That copy must not weaken the
authenticated source boundary.

Homebrew also treats Formula#system differently from Ruby's
Kernel.system: it raises on failure and returns nil on success. The
old support code treated that successful nil as a failure.

What changes

  • Build bc, fbdoom, lsof, modeset, netcat, nethack, and
    posix-utils-lite from sealed Kandelo/recipes/<name> manifests.
  • Give each recipe only its declared source, resources, platform files,
    tools, and package dependencies.
  • Copy the bc, fbdoom, netcat, and nethack sources into
    recipe-owned scratch space before their build systems write to them.
  • Select GNU Patch, Bison, and Flex explicitly instead of using
    undeclared publisher tools.
  • Build lsof through wasm32posix-cc, which keeps target and ABI
    flags under the Kandelo SDK's control.
  • Authenticate fbdoom's Chocolate Doom source and preserve exact patch
    whitespace with a scoped .gitattributes rule.
  • Accept Formula#system's normal success result while retaining
    Homebrew's bounded command log for real failures.
  • Reserve fresh immutable bottle identities for the seven Formulae.
  • Materialize one sealed recipe response for validation and
    installation instead of consuming the same one-shot response twice.

Current evidence

The branch is rebased on tap main at 8af204c. Generic publisher,
resource-attestation, staging, and sealed-projection support now comes
from merged tap prerequisites rather than being duplicated here. The
base also owns the credential-free homebrew-bootstrap support-data
path. This PR contains only the seven migrations and their focused
support tests.
Both fresh exact-head tap contract checks pass at a9bddb5.

The previous parallel dry run built and installed all seven programs.
Every job reached brew test, where the same missing closed Node/tsx
runtime stopped the test launcher. No bottle was uploaded or published.
That shared publisher gap is addressed by Automattic/kandelo #1134.

Local and tap validation also covers:

  • 130 Formula-support tests with 2,290 assertions;
  • shell syntax for every changed recipe entrypoint;
  • exact recipe file sizes, SHA-256 values, and Formula manifest hashes;
  • brew style for all seven Formulae;
  • closed schema-3 classification and Rust preflight for all seven;
  • successor bottle identities; and
  • Ruby trust, Python AST, ShellCheck, and git diff --check.

Prior dry run:
https://github.com/kandelo-dev/homebrew-tap-core/actions/runs/30436084638

Next

  1. Land the closed Formula-test runtime in Automattic/kandelo #1134.
  2. Re-run all seven Formulae concurrently against exact Kandelo and tap
    commits.
  3. If all seven builds and tests pass, mark this PR ready and merge it.
  4. Publish the seven immutable bottles from tap main.
  5. Exercise the resulting package generation in Node and Chromium.
  6. Promote the generation and apply the existing reviewed trust-rotation
    runbook.

This PR remains a draft until step 2 supplies exact-head evidence.

@brandonpayton
brandonpayton force-pushed the homebrew/close-shell-demo-recipes-qk044 branch from c0163f2 to ba5dae6 Compare July 28, 2026 19:54
@brandonpayton brandonpayton changed the title [Homebrew] Build shell and demo tools from closed tap recipes [Homebrew/Packages] Build seven programs from sealed tap recipes Jul 29, 2026
@brandonpayton
brandonpayton force-pushed the homebrew/close-shell-demo-recipes-qk044 branch 3 times, most recently from 97fcdb8 to e705a19 Compare July 29, 2026 11:46
The sealed tap recipes change the payload authority for seven Formulae, while their registry-built GHCR references are already immutable and public. Advance only each bottle rebuild number, retain the last-green hashes and sidecars, and enforce the exact successor set in the Formula support contract suite.
Use the runner-projected glue and fork-instrument tools instead of reaching through the broad Kandelo checkout root. Add a repository-wide regression that prevents closed recipe scripts from reintroducing broad checkout authority, and refresh the authenticated recipe manifests.
Closed recipe sources are authenticated and mounted read-only. Copy the four upstream projects that require in-tree writes into recipe-owned work directories before configure, generation, patching, or make.

Use declared gpatch, Bison, and Flex tools instead of ambient publisher commands. Refresh recipe manifests and Formula attestations, and document the contract.
Use wasm32posix-cc so the SDK remains the single owner of target flags, compiler glue, linker selection, shared memory, and ABI exports.

Refresh the sealed recipe manifest and Formula attestation.
Place generated bottle blocks and aligned keyword arguments where Homebrew style expects them so all eight Formulae in this batch pass brew style.
Closed source is root-owned, while each recipe runs as an unprivileged uid. Preserve source structure, links, modes, and timestamps without trying to transfer root ownership into private work space.

Refresh all four recipe manifests and Formula attestations.
Homebrew core installs the gpatch executable as patch on Linux. The
closed recipes were invoking the macOS-only gpatch name and hiding
command-not-found behind patch-drift diagnostics.

Bind both patch-using closed recipes to the declared versioned gpatch
keg, verify native keg paths precede system tools, and refresh the
recipe manifests and Formula attestations.
@brandonpayton
brandonpayton force-pushed the homebrew/close-shell-demo-recipes-qk044 branch from e705a19 to a9bddb5 Compare July 29, 2026 12:13
Formula browser tests previously invoked npx, so PATH or package-manager
behavior could select mutable code outside the publisher closure.

Derive one exact Vite CLI from the frozen Formula runtime, validate its
canonical file identity in a shared launcher, and execute it through the
current Node binary. All three browser helpers use that contract, with
coverage for Ruby injection and every rejected path shape.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant