ReviewOS

zig-utils/zig-js

tools(generators): migrate deterministic tooling to Home TypeScript

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

Parent: #497 Runtime foundation: home-lang/home#170

Scope

Migrate the remaining deterministic artifact generators, acquisition helpers, bootstrap helper, and maintenance operator from Python/JavaScript/shell to standalone TypeScript executed by ~/Code/Home/lang/zig-out/bin/home-tool.

The checked inventory currently assigns 20 tools to artifact_generator, 3 to operator_acquisition, 1 to bootstrap, and 1 to maintenance_operator. tools/wasm-conformance-matrix.ts is the completed reference migration, leaving 24 tools in this family.

Contract

  • Home's TypeScript frontend performs emission.
  • zig-js is the default execution engine; -Dtool-js-engine=jsc remains a differential lane.
  • No Bun, Node, or Python fallback.
  • Preserve checked bytes, ordering, schemas, pin/checksum validation, and failure diagnostics.
  • Network-capable acquisition stays explicit and pinned; ordinary builds remain offline.
  • Expand the narrow Home host API only for concrete needs and cover each addition in Home's shared engine smoke fixture.

Acceptance criteria

  • Every tool in these four contract profiles is TypeScript and invoked through home-tool.
  • Each generator is byte-for-byte equivalent against its current checked artifact or a versioned schema change is separately reviewed.
  • Each negative path (malformed input, drift, missing pin, out-of-scope maintenance target) retains a nonzero exit.
  • Build/package/docs callers and both dependency inventories are updated in the same logical commit.
  • Python/JS/shell counts fall by exactly the migrated set, with no compatibility wrappers left behind.
  • Relevant Zig gates pass with the conventional Home installation and a HOME_TOOL/-Dhome-tool override.
9 days ago

Closing as superseded by the selective disposition workflow in #497. Migrating all 24 tools in these profiles is not a project objective: existing implementations remain authoritative unless a tool is independently shown to be durable and Home already provides the real required contract. The inventory remains useful; script-count reduction is not an acceptance target.

9 days ago

Implemented the full generator/acquisition/bootstrap/maintenance migration to Home-executed TypeScript.

Delivered on main across the logical commits from 450b3dd8 through e39e5c0b, including Unicode/CLDR/IANA/IDNA/encoding generators, pinned text-codec and Wasm acquisition, shell-operator replacement, cache maintenance, test262 evidence generation, and the platform release matrix. The last npm/Bun Wasm generator dependency and all repository .sh/.mjs tools are removed.

Evidence:

  • dependency audit: 70/70 tools classified
  • inventory: every artifact_generator, operator_acquisition, bootstrap, and maintenance_operator entry is home_typescript_complete
  • platform matrix output is byte-identical JSON; Markdown differs only by generated provenance
  • wg-1.0 pack: full 202,859-byte binary and 7 MB manifest exact on Home/JSC; focused 2,020-byte/238-directive pack exact on default Home/zig-js
  • single-byte decoder: 26 tables and 183 labels reproduced exactly on both backends
  • no test262 semantic changes (0 flips)

Home runtime support landed in home-lang/home through 351dc2c59f80effa286bffc00d3b0d1743c10230.

Sign in to comment on this issue.