Skip to content

homebrew: recursively populate VFS directory links; port dinit service supervisor#812

Open
brandonpayton wants to merge 4 commits into
mainfrom
gascity/kd-1mr/kd-xhdd-language-dependent-runtimes
Open

homebrew: recursively populate VFS directory links; port dinit service supervisor#812
brandonpayton wants to merge 4 commits into
mainfrom
gascity/kd-1mr/kd-xhdd-language-dependent-runtimes

Conversation

@brandonpayton

Copy link
Copy Markdown
Member

Purpose

Two kd-xhdd (homebrew-all) deliverables:

  1. Platform integration fix — the Homebrew VFS image builder now recursively
    populates directory-link entries (regular files, subdirectories, and symlinks)
    instead of creating an empty target directory and stopping. Any package that
    ships a linked directory tree (e.g. bin/, share/, lib/ subdirs) previously
    landed in the built VFS image without its contents.

  2. dinit service supervisor — new Homebrew Formula plus a resolver-contract
    build for dinit 0.19.4 (Apache-2.0), producing dinit, dinitctl, dinitcheck.

Scope

Deliberately scoped to kd-xhdd's exclusive deliverables. The homebrew-all convoy
uses one scoped PR per bead, so this PR does not re-publish work owned elsewhere:

  • Language runtimes (cpython/perl/ruby/php/erlang/texlive) and shared library/infra
    changes stay with their owning waves — kd-p3hr / Add Homebrew formulas for language runtimes #810 and beads
    kd-egn1, kd-k7zy, kd-mt3u, kd-fyqz.
  • Dependent-program formulae (bash/curl/nethack) stay with kd-1mr.4.

Stacks on the dependency-root (#792) and core-cli (#793) waves; the diff includes
those ancestor commits until they merge into main.

Changes

  • host/src/homebrew-vfs-builder.ts: add copyDirectoryLink, which recursively
    copies files, subdirectories, and symlinks under a directory-link entry. Fails
    loudly on unsupported child file types and on pre-existing target children.
  • packages/registry/dinit/build-dinit.sh: source sdk/activate.sh; honor
    WASM_POSIX_DEP_* (work/source/out dirs, source url+sha256, libcxx prefix);
    verify the source tarball sha256; link against the declared libcxx prefix rather
    than mutating the shared repo sysroot; fail loudly when libcxx is unresolved.
  • packages/registry/dinit/package.toml: real v0.19.4 source url + sha256
    (previously a placeholder all-zero digest).
  • homebrew/kandelo-homebrew/Formula/dinit.rb: new formula (uses the existing
    KandeloPackageFormula mixin; --version smoke test).

Verification

  • ABI snapshot (scripts/check-abi-version.sh): in sync; ABI_VERSION consistent.
  • Kernel lib (cargo test -p kandelo --lib, aarch64-apple-darwin): 963 passed / 0 failed.
  • Host vitest (cd host && npx vitest run): the change's own suites pass —
    homebrew-vfs-builder (8), homebrew-vfs-planner (7), homebrew-vfs-fetch (2).
    After building rootfs.vfs (required host-gate setup), the full suite is
    800 passed / 5 failed / 85 skipped. All 5 failures are unrelated to this change:
    2× missing programs/wasm64/hello64.wasm artifact, 1× Erlang BEAM ring demo
    (out-of-scope language runtime), 2× dlopen-e2e timeouts that pass in isolation
    (resource contention).
  • dinit package: resolves/builds through the Kandelo resolver and passes the
    Node and browser sidecar smokes (kd-xhdd bead evidence).
  • libc/posix conformance suites target libc/syscall/POSIX-API behavior, which
    this host-TypeScript + package-recipe change does not touch
    (per docs/agent-guidance/validation.md suite selection).

Bead: kd-xhdd (initiative: homebrew-all)

🤖 Generated with Claude Code

brandonpayton and others added 4 commits June 30, 2026 11:27
…e supervisor

Integration fix + dependent-program port for the homebrew-all wave (kd-xhdd).

host/src/homebrew-vfs-builder.ts: directory-link entries previously created an
empty target directory and stopped, so any package that ships a linked directory
tree (bin/, share/, lib/ subdirs) landed in the VFS image without its contents.
Recursively copy files, subdirectories, and symlinks under a directory link so
the built VFS image reflects the real package payload. Fail loudly on unsupported
child file types and on pre-existing target children.

dinit 0.19.4 (Apache-2.0): new Formula + resolver-contract build. build-dinit.sh
now sources sdk/activate.sh, honors WASM_POSIX_DEP_* (work/source/out dirs,
source url+sha256, libcxx prefix), verifies the source tarball sha256, links
against the declared libcxx prefix instead of mutating the shared repo sysroot,
and fails loudly when the libcxx dependency is unresolved. package.toml records
the real v0.19.4 source url and sha256 (was a placeholder all-zero digest).

Scope: limited to kd-xhdd's exclusive deliverables. Language runtimes and shared
library/infra changes remain with their owning waves (kd-p3hr / PR #810) and
beads (kd-egn1/kd-k7zy/kd-mt3u/kd-fyqz); dependent-program formulae
(bash/curl/nethack) remain with kd-1mr.4. Stacks on the dependency-root (#792)
and core-cli (#793) waves.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Regression tests for the copyDirectoryLink change: assert a directory link is
copied recursively (top-level file, nested subdir file, and symlink child) rather
than left as an empty directory, and that a directory link whose source is not a
directory fails loudly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

Phase B-1 matrix build status — pr-812-staging

ABI v16. 56 built, 12 failed, 68 total.

Package Arch Status Sha
libcurl wasm32 built e555b9aa
libcxx wasm32 built e9bb60b4
libcxx wasm64 built dcb175bc
libpng wasm32 built d5776b16
libxml2 wasm32 built ecd4f487
libxml2 wasm64 built 6bed3651
openssl wasm32 built 4ea4bf1b
openssl wasm64 built 647c885d
sqlite wasm32 built 36fe40f3
sqlite wasm64 built 9ee828c2
zlib wasm32 built 107d93dd
zlib wasm64 built 099a5ba6
bc wasm32 built e1bccc81
bzip2 wasm32 built 541c679a
coreutils wasm32 built 563ff76c
curl wasm32 built caee0a68
dash wasm32 built 370c2741
diffutils wasm32 built 1f22e847
dinit wasm32 built 3aa43058
fbdoom wasm32 built 2e88b44b
file wasm32 built 7c68c63e
findutils wasm32 built e36ab8d8
gawk wasm32 built d92c583c
git wasm32 built 7a98205a
grep wasm32 built 09a16928
gzip wasm32 built 87104f6e
hello wasm32 built a35f331d
kandelo-sdk wasm32 built d8307c1c
kernel wasm32 built 99b04996
less wasm32 built a6ce1ee8
lsof wasm32 built f34f5b9a
m4 wasm32 built 92378db0
make wasm32 built c14a17c2
mariadb wasm32 built 57603082
mariadb wasm64 built 9fa7cdb5
modeset wasm32 built 6da7586c
msmtpd wasm32 built b06d7fa3
nano wasm32 failed
ncurses wasm32 failed
netcat wasm32 built 85271d4b
nginx wasm32 built b597e39e
php wasm32 built 717d9dc3
posix-utils-lite wasm32 built fce605df
sed wasm32 built 91541baf
spidermonkey wasm32 built 7ba2a98c
tar wasm32 built 0d64a7da
tcl wasm32 built 14a8eef0
unzip wasm32 built ac4fe644
userspace wasm32 built 59415379
vim wasm32 failed
wget wasm32 built 1e2b3190
xz wasm32 built ead3a075
zip wasm32 built 2fdf80be
zstd wasm32 built 1bf2b9dc
bash wasm32 failed
mariadb-test wasm32 built c5305c05
mariadb-vfs wasm32 built 82b5f97c
mariadb-vfs wasm64 built a88f26c6
nethack wasm32 failed
node wasm32 built 0444a979
spidermonkey-node wasm32 built b1de9005
vim-browser-bundle wasm32 failed
nethack-browser-bundle wasm32 failed
rootfs wasm32 failed
shell wasm32 failed
lamp wasm32 failed
node-vfs wasm32 failed
wordpress wasm32 failed

Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.

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