Skip to content
This repository was archived by the owner on Jul 21, 2026. It is now read-only.

coreutils: add the filesystem and text CLI suite - #16

Merged
brandonpayton merged 1 commit into
mainfrom
migrate/coreutils-cli
Jul 17, 2026
Merged

coreutils: add the filesystem and text CLI suite#16
brandonpayton merged 1 commit into
mainfrom
migrate/coreutils-cli

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jul 11, 2026

Copy link
Copy Markdown
Member

Why

Kandelo users and package build scripts need the standard Unix filesystem, text, checksum, numeric, identity, and process commands. Those commands are not yet available as a first-class Homebrew package, so a Homebrew-built environment still has to fall back to Kandelo registry artifacts or one-off substitutes.

This PR packages the real GNU Coreutils suite. Downstream software can therefore obtain commands such as cp, sort, stat, and timeout through the normal Homebrew Formula, dependency, and VFS path instead of a demo-specific substitute.

What changed

  • Build GNU Coreutils 9.6 from its verified upstream source through Kandelo's wasm32 SDK and sysroot.
  • Build upstream's single multicall executable and install its 102 command aliases.
  • Apply Kandelo's required fork instrumentation after final link and reject stale ABI or Asyncify artifacts.
  • Install the selected manual pages, Info documentation, and upstream project documents.
  • Exercise normal command output, expected failure status, mounted filesystem mutations, multicall dispatch, and a real timeout -> /bin/true child process.

Coreutils has no target runtime Formula dependencies. Binaryen and WABT are native build tools only. This PR contains no bottle block, sidecar, receipt, provenance file, Wasm artifact, platform change, or Kandelo ABI change.

ABI 41 source-build evidence

The Formula is now based directly on tap main after Kandelo platform batch #967 merged at 6efb411f15df83819a4e21a961845084f8860f6c. The Formula and shared support inputs are byte-identical to the candidate used for the completed ABI 41 source build.

  • Exact tap base: 5a8e5555b83d5755953e68e6da7ebacf6a2b6e22
  • Exact PR head: a5cf6e7bcf73df79be761cd8d67948ae74d26fc3
  • Stable patch ID across the restack: 88828fb578d4cdf8876826b1c10520011cc4af93
  • Formula SHA-256: 4b17705149d7a7bb8d0982e4f1bdc9068fa32a0ff84c1c6fb521bb15636378ef
  • Kandelo platform: merged #967 tip 6efb411f15df83819a4e21a961845084f8860f6c (ABI 41), with the same final source tree as the tested candidate
  • Installed result: 214 files, 6.2 MB
  • Multicall artifact SHA-256: 6b307856d9fa652f884b18aac41884bf342ea72cb2be06ad89964fd0b5a8958a
  • Homebrew receipt: source-built (poured_from_bottle: false) with zero runtime dependencies
  • Artifact validation: ABI 41, wasm32, required wpk_fork_* continuation surface, no Asyncify surface
  • Full brew test --verbose automattic/kandelo-homebrew/coreutils: passed

The test runner's /bin/sh came from Dash 0.5.12 source-built from the same tap and ABI 41 candidate, SHA-256 d3aaf304ea340b784c1e846968b5892547e8b819935b20424cd54c100ffa5071. The temporary resolver copy was removed after the test. No Kandelo registry package supplied the shell.

Other validation

  • Formula Ruby syntax passed in Kandelo's dev shell.
  • Formula support: 48 tests / 380 assertions passed.
  • TypeScript runner support: 15 / 15 tests passed.
  • The canonical Formula source-closure validator accepted the exact head.
  • Tap trust checks passed on the live PR head.
  • git diff --check passed.
  • Independent devil review accepted the exact head and found no Formula or runtime blocker.

Scope and remaining gates

This PR is ready to merge as a source Formula. It proves that Coreutils builds and tests from source through the ABI 41 Kandelo SDK path.

It does not claim that a public bottle has been published or poured. Bottle publication remains a separate trusted-publisher step after platform PR #968 lands and the tap pins its exact rebase-merged commit. That step still requires public GHCR readback, stock Homebrew pour evidence, and Node.js/Chromium runtime validation.

@brandonpayton
brandonpayton force-pushed the migrate/coreutils-cli branch from d5fec23 to 502caf0 Compare July 11, 2026 03:25
@brandonpayton
brandonpayton force-pushed the migrate/coreutils-cli branch 4 times, most recently from 5746232 to 0999fc1 Compare July 12, 2026 03:38
@brandonpayton

Copy link
Copy Markdown
Member Author

Focused exact-head rebase review: ACCEPT at 0999fc1bda1e7b85b90354e3087b298c73037295 on base 36df17ec5395fb4531fddc2d9ab769eb1e6c19ca.

The accepted formula remains byte-exact at blob b0edc2d2c5c894e01c312e2e6345443255a08228, SHA-256 27d7fef4a2b6243fd36aaae1c4809275f4de5d70486345bbdfa32b9ff174ebb1. Merged tap #70 validates the sole final multicall executable after instrumentation with fork: :required; all 102 installed commands are upstream links to that same validated Wasm, so there is no secondary executable outside the guard.

Upstream installation, man/Info assertions, representative command coverage, and real timeout 1 /bin/true fork/exec/wait coverage remain unchanged from the accepted implementation. Fresh exact-head syntax/load, Homebrew style, 29 support tests / 216 assertions, diff check, source-only scope, clean worktree, and exact merge tree pass.

Accepted for source merge once Automattic/kandelo#882 lands. Bottle and pour gates remain separate; no publication claim is made.

@brandonpayton
brandonpayton force-pushed the migrate/coreutils-cli branch from 0999fc1 to 79ce7f9 Compare July 12, 2026 08:49
@brandonpayton

Copy link
Copy Markdown
Member Author

Independent devil review: APPROVE for source-only merge after Automattic/kandelo#882 at exact head 79ce7f9d67883349bc5856a87daa96596b922932 on base 33b15ba4503605f51058cc75a4a49ac278169772.

No package-layer blocker was found. Official GNU Coreutils 9.6 source/hash/license were independently verified. The Formula has no target dependency or registry bridge, uses the wasm32 SDK/config.site, adds only the package-specific strerror(0) fact, disables undeclared optional surfaces, instruments after final link, and applies the shared fork: :required guard before upstream install. An ABI 18 artifact independently showed the real fork import, all continuation exports, no Asyncify, and no host path.

Fresh evidence through Kandelo's dev shell: Ruby syntax passed; Homebrew style inspected 1 file with no offenses; shared support passed 30 runs / 221 assertions; diff check and worktree are clean. A temporary exact instrument -> upstream install preserved the validated SHA byte-for-byte and produced 103 bin entries (1 executable + 102 upstream symlinks), 102 manpages, and 2 Info files. The installed timeout 1 /bin/true path ran through Kandelo with a required fork descendant and exited 0, proving alias dispatch plus fork/exec/wait.

No fresh full clean install, bottle/pour, or browser run is claimed; those remain publication gates.

@brandonpayton
brandonpayton force-pushed the migrate/coreutils-cli branch 2 times, most recently from 2b6451b to 8ad5c14 Compare July 12, 2026 17:50
@brandonpayton
brandonpayton force-pushed the migrate/coreutils-cli branch from 8ad5c14 to b7f4ed8 Compare July 12, 2026 19:58
@brandonpayton

Copy link
Copy Markdown
Member Author

Exact-head devil review: APPROVE b7f4ed8a023d574d34a75fff92cff1a77fa5788d. Two clean builds are byte-identical; the 102-command alias and documentation surfaces exactly match main #878; the ABI/fork/host-path contract passes through #882/#903; and the literal timeout test now requires and validates its real child exit. Source gates are main #873/#874/#878/#882/#883/#888-on-#889/#903. Final publication still requires the consolidated ABI, trusted merged-head provenance, and stock Node/Chromium pours.

@brandonpayton
brandonpayton force-pushed the migrate/coreutils-cli branch from b7f4ed8 to e8c3f61 Compare July 12, 2026 20:50
@brandonpayton

Copy link
Copy Markdown
Member Author

Independent post-rebase check: ACCEPT exact head e8c3f61bdcfd1e0ae2dd9c98a33d6f803afcfc07.

The five-commit range-diff and Formula SHA-256 4b17705149d7a7bb8d0982e4f1bdc9068fa32a0ff84c1c6fb521bb15636378ef are unchanged from the previously reviewed head. Syntax, style, diff check, and the full installed-keg Formula test pass on tap main c570566, including the required timeout descendant. Existing main-platform gates remain open, so merge remains held.

@brandonpayton

Copy link
Copy Markdown
Member Author

Independent ABI-39 exact-head devil review: ACCEPT PR #16 at e8c3f61bdcfd1e0ae2dd9c98a33d6f803afcfc07 / tree cb45bd76e554199951df289c6c9c87f3a646a04d on current tap main c5705667a90b05754d2244a362f3f7fc95d2f9c3. No Formula amendment is needed.

An exact Homebrew source build plus two clean off-prefix rebuilds all produced the same 4,110,769-byte ABI 39 program, SHA-256 0c425acb7b27f154dcf31ffe400eacea07387d536b22aeccf93aa9302b673faf. The artifact imports kernel_fork, has the complete wpk_fork_* continuation contract, contains no Asyncify or producer paths, and installs one executable plus exactly 102 relative command symlinks matching #878's authoritative alias set (including kill and [), 102 upstream man pages, and Info.

The literal Formula test passed on Node, including timeout -> /bin/true with one observed fork descendant. Chromium passed both ls --version and real timeout 1 /usr/local/bin/timeout --version fork/exec/wait. Upstream source hash, Ruby syntax, style, strict audit, tap readall, shared Formula-support tests (37 runs/279 assertions), focused SDK tests, large-Wasm ABI extraction, and fork-instrument determinism checks passed. Native coreutils 9.11 was restored and verified after the test.

Final bottle publication remains gated on the merged platform semantics from ABI-39 #907 plus #874, #878, #882, #883, #888 (stacked through #889), #903, and the trusted publisher stack. #873 is already content-equivalent in #907. These main-repo prerequisites must not be absorbed into the Formula PR, and no local build bytes should be published.

@brandonpayton
brandonpayton force-pushed the migrate/coreutils-cli branch 2 times, most recently from b1afa16 to 4990085 Compare July 16, 2026 19:02
Kandelo users and package builds need the real standard Unix filesystem, text, checksum, numeric, identity, and process commands as Homebrew packages instead of registry artifacts or command-specific substitutes.

Build the upstream GNU Coreutils multicall binary through the Kandelo SDK, apply required fork instrumentation, install its command aliases and documentation, and exercise normal output, failures, mounted filesystem mutations, and a real timeout child.
@brandonpayton
brandonpayton force-pushed the migrate/coreutils-cli branch from 4990085 to a5cf6e7 Compare July 17, 2026 04:52
@brandonpayton
brandonpayton merged commit da9d718 into main Jul 17, 2026
2 checks passed
@brandonpayton
brandonpayton deleted the migrate/coreutils-cli branch July 17, 2026 04:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant