[Packaging/CI] Make shell source fallback builds self-contained - #1086
Closed
brandonpayton wants to merge 2 commits into
Closed
[Packaging/CI] Make shell source fallback builds self-contained#1086brandonpayton wants to merge 2 commits into
brandonpayton wants to merge 2 commits into
Conversation
brandonpayton
force-pushed
the
packaging/closure-mkrootfs-prereqs-qk044
branch
from
July 24, 2026 13:32
0883c55 to
91be65e
Compare
Contributor
Phase B-1 matrix build status —
|
| Package | Arch | Status | Sha |
|---|---|---|---|
| shell | wasm32 | built | 8491816d |
| lamp | wasm32 | built | 80ed352c |
| nginx-php-vfs | wasm32 | built | 2a73a387 |
| nginx-vfs | wasm32 | built | af83f43e |
| node-vfs | wasm32 | built | f9b06103 |
| wordpress | wasm32 | built | d98078b1 |
Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.
A package archive can be present but unusable, including when a same-run staging overlay has a stale cache identity. In that case the resolver must be able to run the shell recipe from any direct or transitive caller without caller-specific npm setup. Create a resolver-owned Git source snapshot, install both locked JavaScript dependency trees there with a scrubbed public-registry npm environment, and run the composer only from that private snapshot. Isolate every snapshot Git command from ambient attributes, replacement refs, selectors, and external diff configuration. Remove predictive setup from CI and run.sh, bind the preparer into the package cache identity, and cover stale-overlay fallback, concurrent builds, path substitution, Git/npm configuration, and credential isolation. Regenerate the authoritative program-package projection so shell and every composite package that depends on it carry the new manifest and cache identities.
brandonpayton
force-pushed
the
packaging/closure-mkrootfs-prereqs-qk044
branch
from
July 24, 2026 17:39
91be65e to
d3eea3d
Compare
Member
Author
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
A package archive can exist but still be rejected because its checksum, architecture, ABI, or cache identity is stale. The package resolver then correctly falls back to building that package from source.
For example, a
lampbuild can pull in theshellpackage indirectly. If the staged shell archive is stale, the resolver starts the shell source recipe. Previously, only CI jobs that selectedshelldirectly installed the JavaScript tools used to compose its VFS image, so the indirect fallback failed even though the resolver was doing the right thing. Local callers and overlapping builds had the same hidden dependency on shared checkout state.A source recipe must work from every direct or transitive resolver caller. It must not depend on a caller guessing that fallback will happen, and concurrent builds must not replace one another’s
node_modulestrees.What changed
mkrootfslockfiles there and runs the VFS composer only from that snapshot.info/attributesfail clearly before npm runs.NODE_OPTIONS/NODE_PATHcannot reach the installer or composer.run.shand package-publishing workflows no longer predict whether the resolver will source-build shell or mutate checkout-global dependencies.build.toml.inputs; npm and tar are declared host tools. The package revision is unchanged because the intended VFS bytes did not change, while the changed build inputs still produce a new cache identity.program-packages.jsonprojection is regenerated so shell and every composite package that depends on shell carry the new manifest and cache identities.Validation
Passed on corrected head
91be65e4236714e6a6ac830a54f5d89b0230840b:bash scripts/dev-shell.sh bash scripts/test-package-build-roots.shbrowser-binary-package-roots.mjs --exclude-package shell --include-package rootfsbash scripts/dev-shell.sh bash scripts/test-homebrew-main-shell-closure.shbash scripts/dev-shell.sh bash packages/registry/shell/test-prepare-build-tools.shbash scripts/dev-shell.sh bash scripts/test-homebrew-publish-workflow.sh(run before the generated projection-only correction; all implementation inputs are unchanged)AR=llvm-ar cargo test -p xtask --target <host> stale_direct_pr_overlay_falls_through_to_source_build -- --nocapture(1 passed)cargo run -p xtask --target <host> -- build-deps parse shellSC2006warning atforce-rebuild.yml:113git diff --checkThe final declared-tool-path correction on
faef5ead8also passed the shell tool-preparer test, the complete Homebrew main-shell closure contract (17 assertions plus two concurrent real npm installs), the package build-root suite, Bash syntax validation, andgit diff --check.The aggregate publisher suite includes publisher trust, immutable VFS release recovery, 17 shell image-contract cases, and two concurrent shell source-fallback builds.
The first CI head correctly reported that
program-packages.jsonwas stale after the shell manifest/cache inputs changed. Both failing jobs had this same cause; it was a PR freshness defect, not an ABI 42 or tap-catalog blocker. The corrected head contains the generator-produced projection and passes both failing commands locally.Scope and rollout
This is a packaging/build fix. It does not change the kernel, ABI, host runtime, browser runtime, formula catalog, or intended VFS contents.
This packaging-only PR is rebased on current
mainafter #1091 and can merge independently of the frozen #1079 ABI 42 publication lineage. Future publication pins still must use immutable commits from the merged ancestry.Residual boundary: integrity-pinned npm lifecycle scripts still execute with ordinary operating-system permissions for the runner user, although their credentials, configuration, and build paths are isolated.