Skip to content

[Homebrew/Validation] Keep fork imports under the shared ABI contract - #103

Closed
brandonpayton wants to merge 1 commit into
homebrew/close-shell-demo-recipes-qk044from
fix/dinit-abi-import-validator-qk044
Closed

[Homebrew/Validation] Keep fork imports under the shared ABI contract#103
brandonpayton wants to merge 1 commit into
homebrew/close-shell-demo-recipes-qk044from
fix/dinit-abi-import-validator-qk044

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Why

Kandelo adds a generated import surface when it instruments a
WebAssembly program for fork(). The shared artifact validator reads
that generated ABI contract. It checks the imports, their signatures,
the memory width, and the required exports together.

Dinit and Redis also audited unresolved build imports after
instrumentation. That forced each Formula to duplicate the generated
fork names. Those lists can drift when the fork contract changes, and
Dinit rejected a correct ABI 42 artifact after shared validation had
already proved the fork surface valid.

Moving the unresolved-import audits before instrumentation preserves
their useful protection against broken build inputs. It also leaves
generated fork imports under the one validator that owns their ABI.

What changed

  • Move Dinit's unresolved-import audit before fork instrumentation.
  • Move Redis's equivalent audit before instrumentation and retain its
    dynamic-loader imports.
  • Keep generated fork imports and signatures under
    kandelo_validate_wasm_artifact.
  • Add a tap-wide regression that rejects post-instrumentation import
    parsing or Formula-local __wpk_fork_* names.
  • Add WHY comments beside the ordering and ownership decisions.

Current stack

This draft is one commit atop tap #129:

The restack preserved the Dinit patch exactly:

  • the old and new stable patch ID is
    8bed8827bddb3ad0bdd03905f0025b5d4c3341c7;
  • git range-diff reports the commits as equal;
  • Git's independent merge-tree result is
    9d143c86b566478faa9be7cbb7a987c0b32f1a44, matching this tree;
  • only Dinit, Redis, and the shared support regression differ from
    [Homebrew/Packages] Build seven programs from sealed tap recipes #129.

Validation

Local and repository checks passed:

Redis passes Homebrew style. Dinit retains three pre-existing findings:
dependency order, bottle-block placement, and one trailing class blank
line. The exact #129 base reports the same three findings.

The fresh exact-head dry run used this PR head and
Kandelo source
85d2efccdf55f02eb23fde4e9a3d075a4b267104. Planning, source
validation, the Dinit source build, and its Node checks passed. The run
then stopped at the new sealed-Vite boundary before Chromium with:

Tier-2 source builds require a valid publisher attestation

That Kandelo commit predates #1138, which seals and attests the exact
Vite closure required by #129. This is the expected central-runtime
dependency, not a Dinit failure. The tap contract remains strict and
will be rerun after #1138 lands.

The pre-restack dry run passed the complete Dinit build
and Formula test against the same Kandelo source and the identical
Dinit patch. It passed:

  • the Dinit source build and bottle composition;
  • a credential-free force-pour of the exact local dry-run handoff;
  • Dinit's complete Formula test on Node and Chromium;
  • fresh source rechecks, sidecars, and the validated data-only handoff.

Neither dry run published or anonymously downloaded a new package.
Public readback remains part of the later write publication.

Rollout

Keep this PR draft and unmerged while the central runtime lands:

  1. Land Kandelo #1138 and rerun [Homebrew/Packages] Build seven programs from sealed tap recipes #129's seven-package validation first.
  2. Merge [Homebrew/Packages] Build seven programs from sealed tap recipes #129 after that exact validation is green.
  3. Retarget and rebase this commit onto exact tap main.
  4. Prove the resulting tree is unchanged and rerun the base checks.
  5. Rerun Dinit against the sealed-Vite Kandelo source.
  6. Merge this tap-only change and publish Dinit.
  7. Require public anonymous readback, brew test, Node and Chromium
    execution, sidecars, and Formula finalization.

Dinit is independent of the seven Formulae in #129. Its later
publication does not invalidate their artifacts or publication state.

@brandonpayton
brandonpayton force-pushed the fix/dinit-abi-import-validator-qk044 branch from cb1b988 to 6a96b77 Compare July 29, 2026 03:11
@brandonpayton brandonpayton changed the title [Homebrew/Validation] Stop rejecting valid dinit fork imports [Homebrew/Validation] Keep fork imports under the shared ABI contract Jul 29, 2026
@brandonpayton
brandonpayton changed the base branch from main to homebrew/close-shell-demo-recipes-qk044 July 29, 2026 03:12
@brandonpayton
brandonpayton force-pushed the fix/dinit-abi-import-validator-qk044 branch 3 times, most recently from 3bfe530 to 12fa9fc Compare July 29, 2026 08:19
@brandonpayton
brandonpayton force-pushed the homebrew/close-shell-demo-recipes-qk044 branch 4 times, most recently from e705a19 to a9bddb5 Compare July 29, 2026 12:13
@brandonpayton
brandonpayton force-pushed the fix/dinit-abi-import-validator-qk044 branch 2 times, most recently from 1eab59a to a3243c7 Compare July 29, 2026 13:17
Move Dinit’s and Redis’s unresolved-build-input checks before fork
instrumentation. Keep generated fork imports and signatures under the
shared ABI validator, where their contract cannot drift by Formula.

Add a tap-wide regression that prevents later Formulae from parsing or
naming fork imports after instrumentation.
@brandonpayton
brandonpayton force-pushed the fix/dinit-abi-import-validator-qk044 branch from a3243c7 to 0a5f97b Compare July 29, 2026 14:13
@brandonpayton

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #155.

The sole patch in this draft has stable patch ID
8bed8827bddb3ad0bdd03905f0025b5d4c3341c7, exactly matching the
corresponding patch already present on main through #155. No unique
change remains to land.

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