ReviewOS

home-lang/home

Bun parity: maintain and verify JSX create-to-production-build pipeline

#438
Open chris opened this 9 days ago ·
9 days ago

Tracks create-jsx.test.ts from #66.

The logical harness already fabricates generated SPA files and dist index.js, index.css, and index.html for the named React no-Tailwind build case, but only admission and rewrite are maintained today. The FAIL marker should remain until the full copied file is executed by a maintained tranche.

Acceptance criteria:

  • add a maintained whole-file logical tranche with the expected 13 passing cases
  • verify create output, package scripts, dev-server shutdown, production build, dist assets, and snapshots
  • replace fixture-only file fabrication with the real create, autoinstall, dev-server, and build pipeline where practical
  • add a native CLI integration test that runs create and build in an isolated temporary project
  • remove the expectation only after both maintained logical and relevant native coverage are green

Parent tracker: #66

9 days ago

Read-only implementation audit: the smallest honest first slice is native planning/materialization, not removal of the 13-case corpus marker.\n\nHome still routes every home create invocation through a system Bun in src/main.zig, while the copied native implementation under packages/runtime/src/runtime/cli/create_command.zig and create/SourceFileProjectGenerator.zig is not wired and its embedded create/projects asset tree is absent. The Zig install argv also needs Bun's required positional separator: dependencies must follow install -- so a hostile value such as --trust cannot become an installer option.\n\nFirst slice:\n- maintain the template asset tree;\n- expose a pure React/Tailwind/shadcn project plan;\n- materialize it in a temp directory without starting services;\n- test exact generated files, dependency sets, install/dev argv, and the separator boundary.\n\nThe expectation must remain until the filename-specific __home_spawn_create_jsx_fixture path is gone, the real Home binary runs through the native spawn bridge, and the unchanged whole file reports exactly 13 passed, 0 failed, 0 todo, 0 unsupported. Generated development bytes and dist .js/.html/.css must be observed; synthetic snapshot echoes or dist writes do not qualify.

9 days ago

Related native activation work: #709, with parent progress in #66 and #703. The complete native create command now builds in 66a6d6e44; its original 13 template tests and rsbuild create/install/build integration pass. The first unchanged cli/create/create-jsx.test.ts run is still Home 1 pass / 12 fail: the generated child home --only-missing install ... was routed as a script. 62d020e94 fixes native dependency command classification while preserving leading flags; runtime verification remains pending.

The pinned Bun control (4982b91e3702094330f3be3883354c52b8c01323, binary SHA256 47a87c1dea30da59c2733cce80118ea59bd338c616c6378f1c7f55e5f2b92c87) also failed this original file: 3 pass / 10 fail, including two HTML snapshot differences (the served content contains the dev-server visibility script instead of the expected Blog content) and original 5-second deadlines. These are separate from the Home CLI defect; no snapshots, assertions or deadlines were changed.

Both first logs are retained as zig-out/bun-port-709/runtime-verification/create-jsx-{home,bun}.log, with hashes in the published baseline. Latest source is pushed through 9e1656f7c; the next full build is blocked on disk space (1.4 GB available, 8 GB admission floor). JSX parity remains 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

The new native-create entrypoint regression caught an additional executable-identity failure after the dev dispatch fix. The 32a172e build completed 46/46 steps, and package arguments forwarded correctly, but nested bun ./dev.mjs resolved to system Bun 1.3.14 rather than the Home executable. This result is retained as a failure in zig-out/bun-port-709/create-entrypoints-after-fix.log; no passing native parity is claimed.

The cause is in RunCommand.privateNodePath: it creates node/node and node/bun in the private executable directory, while the ordinary script PATH includes the outer directory. That directory was missing its intended bun link. cb7d597e5 restores the native executable alias in the actual PATH directory and verifies its target through the existing path-validation code. This fixes general nested package commands, without forcing ordinary Node commands onto another runtime.

The new build is running under the same resource guards. The regression will require the exact Home process.execPath, argument forwarding, failure exit status, and valid create timing before acceptance. Refs #66, #438, #709.

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.

Sign in to comment on this issue.