ReviewOS

home-lang/home

Port native create command without system Bun delegation

#709
Closed chris opened this 9 days ago ·
9 days ago

Parent: #66. Discovered by #703's native-only 78-file comparison. Related: #438.

The unchanged pinned test/js/bun/test/parallel/test-integration-rspack.ts fails in Home while the pinned Bun control succeeds. Its first real child runs create rsbuild@1 app --template solid-ts. Home exits 1 with: home create needs the system bun binary while Phase 12 is in progress. This is an actual missing native CLI path, not a dependency-install workaround to solve by adding system Bun.

Evidence: Home runtime source 82156e60d, binary SHA256 c5141c873e3e0124da9c3f7e11a22a3f771e6303247ad88099ea3e36bd2c00f5; Bun pin 4982b91e3702094330f3be3883354c52b8c01323, control SHA256 47a87c1dea30da59c2733cce80118ea59bd338c616c6378f1c7f55e5f2b92c87. One Home attempt followed by one reference attempt; logs retained as zig-out/bun-port-703/newly-discovered-runs/072-{home,bun}.log. No retry or timeout relaxation.

The original failing runtime routed create through execBunCommand. Native activation is now on main in 7725c33aed043c7b5f956b8d3f26ced7e771a942; API integration in 66a6d6e44 builds successfully (46/46 steps), the original template file reports 13 registered passes, and the unchanged native rsbuild create/install/build integration passes. The original JSX path still fails; the leading dependency-flag fix in 62d020e94 and complete per-file output retention in 6775d0ba9 await a full rebuild after disk space is freed. This issue stays open until that broader native create verification is complete. Existing native source is in packages/runtime/src/runtime/cli/cli.zig (bun create) and create_command.zig; activating the complete command requires porting remaining Zig APIs and preserving npm/scoped/versioned templates, local and GitHub templates, arguments, subprocesses, errors and project generation. Keep all generator, install and build children in Home's runtime/package-manager path. Do not substitute generated fixture output or delegate to system Bun.

Acceptance: port native create behavior and its original coverage, then pass the unchanged rsbuild create/install/build integration with real child processes and no external Bun delegation. Preserve failures and original workloads/deadlines; update #703 and #66 with tested commits and logs. The broader create-to-production pipeline in #438 remains related, not automatically completed by this one integration.

9 days ago

Progress under #703 / #66:

The config-fixed runtime 82156e60d passed 46/46 production steps and all six focused controls. Its complete 78-file comparison retained 156 first-attempt logs: 69 files exit zero in both runtimes, four Docker guards are inactive, four fail only in Home, and one certificate-expiry failure occurs in both. The per-file baseline and log hashes are published in docs/docs/bun-native-newly-discovered-baseline.json.

The Home accounting/extension corrections are published in 1e2f39847: manual-assertion process checks are separate from registered test counts, failed processes retain their actual registered results, original TAP skips/comment-only files have separate counters, and the CLI accepts every discovered JavaScript/TypeScript extension. The audit now checks the CLI's actual target classifier too; all 4,754 entries classify as files. Corrected native verification is still pending.

A host restart interrupted the first build. Two later supervised attempts hit false tree-memory limits: a real two-process probe showed the guard was adding the aggregate Summary Footprint to the individual process totals. Fixed in ab44979a9 on main; regression tests and live positive/negative controls pass. The default limit and host-pressure checks remain enabled. Production and focused builds are now running sequentially with correct measurement. No test deadline was extended, and no incomplete build is reported as passing.

The missing native create command is tracked in #709; its initial native activation and filesystem/process API port are prepared in an isolated checkout, pending compilation and integration. The shared expired TLS fixture is tracked in #710; its original validation and pinned bytes remain intact. All completed publications are as Chris Breuer without coauthors. Full Bun parity remains incomplete.

9 days ago

Native create activation is on main in 7725c33aed043c7b5f956b8d3f26ced7e771a942, alongside the pending accounting changes from #703. The command no longer selects system Bun; npm/scoped/versioned templates use the native package executor, while local/GitHub/catalog and JSX paths are activated together.

This is not yet a verified create port. Type-checking the previously dormant full command exposed old filesystem APIs, missing facade exports for existing native helpers, and JSX generator initialization/path contracts. Those are being repaired together. First compiler outcomes are retained under zig-out/bun-port-709/build-{first,second,third,fourth,fifth,sixth}.log; no failed attempt is counted as a pass.

Prepared verification preserves the original template tests (local directories, scoped npm errors, GitHub archive/install, lifecycle tasks), original JSX create-to-build tests, and the unchanged rsbuild create/install/build integration. Each original file gets one Home attempt and one pinned Bun control with ordinary test deadlines, plus separate positive and negative accounting checks from #703. Complete CI-profile, platform and broader runtime parity remain open under #66.

The default executable build also no longer emits optional API docs (62f2f2cbf); the explicit docs target remains to be verified. Build resource stops are incomplete results, and the stricter host-pressure supervisor remains enabled.

9 days ago

Pushed 66a6d6e444ed9c6be2817f1b2901b67aacb06f4b to origin/main as Chris Breuer, without coauthors. Production build passed 46/46 steps with the complete native create command activated (measured peak tree footprint 13,319 MB). Runtime SHA256: 435b57f0b492e01ef40deb0254fdf79b0ea6409b45eeb7ff077714189933d743.

The original cli/install/bun-create.test.ts reports 13 passed, 0 failed. The unchanged rsbuild integration now completes its real native create, 89-package install, production build, and all assertions, with no system Bun delegation. It is correctly reported as one process check, zero registered test passes. The original HTTP batch passes 29 registered tests plus the separate http-spec.ts process check, whose original output confirms 40/40 custom checks.

The negative accounting control initially lacked its private tracked-file manifest and therefore did not reach execution. That invalid setup outcome is retained. After adding the control manifest, Home correctly exits 1 with the real Node assertion diagnostic, zero registered passes, one successful process check, one failed file, one comment-only file. No pinned test source changed.

JSX is still failing. Home's first original JSX file run is 1 pass / 12 failures: leading --only-missing caused install to be treated as a script. A general native dependency-command classification fix for leading flags is now rebuilding together with the six focused corpus harness tests. The pinned Bun JSX control also failed (3 pass / 10 fail), from snapshot differences and original 5-second deadline failures; those do not excuse the Home dispatch defect. No snapshots or deadlines were changed.

Evidence is retained under zig-out/bun-port-709/, and a compact per-result report with hashes is prepared at docs/docs/bun-native-create-accounting-baseline.json. The ordinary baseline is not full upstream CI-profile equivalence or 4,754-file coverage. Successful child stderr retention is still incomplete, so the template gate's 13 registered passes alone cannot independently exclude its existing GitHub rate-limit early return. Explicit API-doc generation also remains to be verified. #66, #703, #709 and #438 remain open.

9 days ago

Everything from this batch is committed and pushed to origin/main through 9e1656f7c3cd4b76200819e88a630f09b028e5c7, as Chris Breuer without coauthors. The newer native HTTP Request change was merged without dropping work.

Verified runtime remains 66a6d6e444ed9c6be2817f1b2901b67aacb06f4b, SHA256 435b57f0b492e01ef40deb0254fdf79b0ea6409b45eeb7ff077714189933d743:

  • Production build: 46/46 steps.
  • Original native create templates: 13 registered passes; unchanged rsbuild create/install/build succeeds as one real process check.
  • Original HTTP accounting cases: 29 registered passes plus the script's actual 40/40 manual checks. The corrected private negative control fails correctly with its real Node assertion.
  • Retained regressions: 9,878 registered passes, five original skips/todos, zero unexpected failures across HTML, Blob, body/stream, Headers/Response, Request, FormData boundary and microtasks. The alternate whole-VM HTML route also passes its same 145 cases plus one original skip; it is not additional distinct coverage.
  • Discovery audit: all 4,754 pinned entries match, with no missing, extra, CLI-routing or native-mode differences. Integrity audit still finds 12,990 identical regular files and five identical symlinks; only the known expectations metadata differs.

Newer source is pending full runtime verification. 62d020e94 fixes leading native dependency flags. 6775d0ba9 streams each completed file's stdout, stderr and process status for every CLI gate, avoiding discarded successful stderr and repeated aggregate-buffer copying; its regression extends the existing focused harness with success-after-failure output and sink-error checks. Syntax, formatting and discovery checks passed. No claim that those new runtime tests have run yet.

The compiler was stopped through its supervisor when disk space fell below 350 MB; the volume then filled completely and briefly prevented Git writes. Only this task's inactive generated artifacts were reclaimed. 643c20934 now guards actual working/temp-volume free space; all six live disk/scanner controls pass, including refusal, cleanup, measurement failure and distinguishing a child's own exit 123. Disk stops remain incomplete outcomes, never feature passes.

The latest full build now safely refuses admission: 1,464 MB free, 8,192 MB required, exit 123 (zig-out/bun-port-709/final-full-build-admission.log). The user has been asked to free at least 10 GB. Once space is available, the next batch is the full rebuild and six focused harness tests, offline leading-flag dependency controls, original JSX tests, and explicit API-doc generation. The earlier JSX results remain Home 1 pass / 12 fail and Bun 3 pass / 10 fail; snapshots and original deadlines remain unchanged. Full CI-profile, platform and 100% suite parity remain unfinished.

Compact verified evidence and hashes: docs/docs/bun-native-create-accounting-baseline.json. Detailed local logs and continuation state are under zig-out/bun-port-709/. #66, #703, #709 and #438 stay open.

9 days ago

Disk cleanup restored enough space for verification. On source 9e1656f7c3cd4b76200819e88a630f09b028e5c7 (Home SHA-256 5e7a26d1b366fad80626c7ff19052d119cb19235b84f15a8f85378e49bb4f3ed):

  • Native build: 23/23 steps; focused corpus harness: 6/6 tests.
  • Retained HTTP/web regressions: 9,919 registered passes and 5 original skips/todos, including all 41 HTTP route cases.
  • Original create templates: 13/13, 25 expects, complete stdout/stderr retained; no GitHub 403 early-return diagnostic.
  • Original Rsbuild create/install/build script completes as one process check, with zero fabricated registered passes.
  • Accounting controls pass, including real Node assertion failure propagation.
  • JSX: Home 1 pass/12 fail; pinned Bun 3 pass/10 fail. Leading-flag installs now execute; the next Home gap is generated dev dispatch into the language watcher. Original deadlines and snapshots are unchanged.
  • The independent leading-flag sequence exposed duplicate local dependency keys in both executables. This is a logical failure, tracked in #713; parsed JSON checks that collapse duplicates are insufficient.

32a172e61 fixes native package dev dispatch and create elapsed-time initialization, with a regression that fails on the prior binary. That new build is now running; these newest fixes are not yet runtime verified. The detailed checkpoint is committed in fe8045c38, preserving earlier outcomes in docs/docs/bun-native-create-accounting-baseline.json. Refs #703, #709, #438, #713. Full inventory, CI launch profile, API-doc target, and platform/build ownership work remain open.

9 days ago

During the cb7d597 native build, /Users/chris/Code/Home/lang-bun-port disappeared, along with several other worktree directories. The cause is not determined. The affected build was stopped through its own supervisor and returned 130. All source commits had already been pushed to origin/main; the checkout was restored at cb7d597. The pinned Bun reference hash is unchanged.

The removed worktree contained local-only logs, fixtures and installed binaries in zig-out/bun-port-703 and zig-out/bun-port-709. Their previously committed result counts and hashes survive, but the raw paths are no longer inspectable. The baseline now says this explicitly in b46705b. This is not a passing build result.

A recovered build is running. New evidence is stored under the shared Git metadata directory, outside the disposable worktree, and exposed through zig-out/bun-port-recovery. Next verification remains native create/package/bunx executable identity and the original create tests. Refs #66, #703, #709, #438, #713.

9 days ago

Recovery verification progressed: native package-run and bunx regressions pass with exact Home executable identity; ab611fa fixes absolute local template detection and the complete native-create entrypoint regression now passes (argument forwarding, exit status, local copying and elapsed time). zig build install docs completed 49/49 steps; the API-doc index and all three referenced local assets exist.

The original templates still pass 13/13 and the Rsbuild create/install/build process passes. The recovered JSX run reached LolHtmlUnavailable: the removed worktree contained the isolated native HTML library, and build.zig silently treated its absence as an optional feature. That run is explicitly a reduced build configuration, not full native-runtime parity evidence. Home had 1 pass/12 fail; the unchanged pinned Bun control had 5 pass/8 fail.

The library is restored through scripts/build-lolhtml.sh (96 native C-API exports). fcb3461 makes it mandatory for JavaScript-enabled builds. Three live configuration controls pass: missing parser rejects JavaScript configuration, non-JavaScript configuration remains available, restored parser succeeds. A new guarded native build with the real parser is running. No test assertions, snapshots, or deadlines were weakened.

Frozen dependency provisioning has a separate verified-archive extraction failure for aws-cdk-lib, tracked in #714. The duplicate local dependency metadata defect remains #713. Fresh logs/checkpoints survive under shared Git metadata and will be retained in the published baseline. Refs #66, #703, #709, #438.

9 days ago

The native HTML rebuild is verified: fcb3461 completed all 49 build/docs steps. Executable SHA-256: 3b9412bb55f7c2750c15d6abf1761910924e32e8ebc09683583e5e4eb3838cfd.

  • Native create regression passes: nested package commands use Home itself; dev arguments and failure status propagate; absolute local templates copy correctly and timing is bounded by real elapsed time.
  • Original HTML corpus: 145 registered passes, zero failures, one upstream skip/todo. Original create templates: Home and Bun each 13/13; Rsbuild completes successfully as a process check.
  • JSX now reaches real native development serving and production builds. Both runtimes report 5 passes/8 failures, including four development-server snapshot mismatches and four shadcn deadlines. Ordinary execution appended snapshots; the diff is retained and originals restored. These aggregate totals are provisional, not immutable snapshot verification or completed parity.
  • Native Home frozen provisioning exits 1 before AWS extraction. Isolated controls show Home rejects the same frozen lock that Bun accepts, despite identical serialized bytes. New #715 tracks this separately from #714. Verbose comparison diagnostics from e36a99a are building now; validation and pinned dependencies remain unchanged.

Fresh raw logs and manifests are now committed as lossless gzip evidence in 9391b1ca2, under docs/docs/bun-port-evidence/2026-09-08-native-create/. This preserves actual surviving evidence, including failures; no lost earlier logs were reconstructed. The baseline update is a6f5cb9. All commits are pushed to origin/main as Chris, without coauthors. Full parity remains open, including #713, #714, #715, the complete inventory/CI profile/platform matrix, and independent native build ownership.

9 days ago

Verified the production fix at 6053c6c. Build: 46/46 steps. Home executable SHA-256: fbc3cfe5af5e1c020e4aad2e6d4bae74584afbd87de970b1134e3ac653da9e15.

Native frozen prerelease regression passes all release/short-tag/long-tag/build-tag cases, with real dependency-removal rejection controls. Native create regression also passes. The original semver corpus reports 25 registered passes and zero failures.

The exact native frozen corpus provisioning succeeded. Both pinned lockfiles remain byte-identical. All 5,945 installed AWS CDK 2.148.0 regular files match the verified pinned tarball, with zero missing or different files. The subsequent corpus source audit retains 12,996 tracked entries: 12,990 identical regular files, five identical symlinks, and only the known expectations.txt metadata difference; no missing or mode differences.

Full logs, first failures, hashes, and the updated baseline are pushed in 65d0e916e. This completed the existing partially populated dependency tree; it is not a cold-install benchmark. The first pinned-Bun AWS extraction failure remains retained and is not replaced by Home's successful outcome.

Closing #714 and #715 on these concrete results. Full parity remains open: #713 local-dependency duplication, #438 JSX pipelines, full inventory execution and upstream CI/platform coverage, and independent native build ownership still need work. All changes are on origin/main as Chris, without coauthors.

9 days ago

Verified native package milestone, pushed through b740117 to origin/main.

Runtime source 831196d builds all 46/46 production steps. Home executable SHA-256: ccbce30778cbaedec1446fbf13c5040363919f5ec1bb19149693518268956ce4. Pinned Bun control SHA-256: 47a87c1dea30da59c2733cce80118ea59bd338c616c6378f1c7f55e5f2b92c87.

Unchanged original cases, in each runtime:

  • update: 6 passed, 0 failed.
  • outdated selection: 16 passed, 0 failed, all nine snapshots passed. The other 214 cases in that file were filtered and are not counted as executed.
  • interactive update: 31 passed, 0 failed, including workspace/catalog operations; the initial six no-crash formatting cases have narrower assertions.
  • semver: 25 passed, 0 failed.

That is 78 registered cases per runtime, counting duplicate native-gate summary lines once. Test sources and snapshots stayed unchanged. Three private native regressions pass separately: raw local dependency identity/frozen/remove behavior; real-registry --force discovery, update/--latest, interactive accept/decline, archive integrity and installed contents; and prerelease frozen-lock integrity.

#713 is fixed by resolving local package identity before edit/install. #716 is fixed by activating the owned update/outdated commands, porting their interactive I/O and formatting, flushing native command output on return, and replacing semver's hardcoded color/output stub with Home's configured output. No lock validation or original assertion was bypassed.

The final private cache-contract correction is explicit: Bun's Serializer.saveAsync documents that disk-cache writes are optional background work and need not finish before CLI exit. The previous private assertion requiring the refreshed generation to be persisted was invalid and its first failure remains archived. f65eb22 tests the supported --force freshness guarantee and actual operations without demanding optional persistence. It passes on the same 831196d executable; the other original tests were not retried to turn that assertion green.

Final evidence is committed in docs/docs/bun-port-evidence/2026-09-08-native-package-complete/, including exact source revisions, command/result manifests, failed historical private outcome, corrected test, logs, hashes, and the cache-contract source excerpt. Generated Verdaccio databases and the two owned diagnostic fixtures were archived before cleanup.

This closes the scoped #713/#716 work. The overall #66 goal remains incomplete: native-mode gating/default fallback removal, full pinned inventory and upstream CI/platform profile, #438 JSX, #190 self-upgrade, native link/unlink activation, independent native build ownership, and other tracked gaps remain.

9 days ago

The scoped native-create port is complete on current main f0327d434, building on the native activation and repairs documented above.

Fresh ReleaseFast acceptance:

  • Build: 46/46 steps.
  • tests/runtime/native-create-entrypoints.test.mjs: passes local template copying, absolute paths, argument forwarding, native package-script dispatch, bounded elapsed reporting and child failure propagation.
  • Unchanged test/cli/install/bun-create.test.ts: 13/13 tests, 25 assertions, including scoped/versioned templates, local folders, --no-install, and both live GitHub URL spellings. The GitHub cases actually completed; no rate-limit early return was used.
  • Unchanged test-integration-rspack.ts: the native command created the Solid/Rsbuild project, installed 89 packages through Home, and completed the real Rsbuild production build as one passing process check.

Both original files are byte-identical to pinned Bun 4982b91e3702094330f3be3883354c52b8c01323 (SHA-256 af283937… and 3cd653d3…). No system Bun delegation, generated fixture substitute, assertion change, deadline change or retry was used. The broader create-to-production JSX pipeline and its distinct failures remain open under #438; closing this issue claims only the native create command and the Rsbuild acceptance defined here.

Sign in to comment on this issue.