ReviewOS

zig-utils/zig-js

Tools: keep exact-parent self-test portable across Home engines

#660
Closed chris opened this 8 days ago ·
8 days ago

Parent: #614 Related: #494, #659

Problem

The existing zig build benchmark-comparison-test gate fails when Home selects its supported JSC engine because tools/exact-parent-regression.ts --self-test calls the unavailable host global structuredClone:

home-tool (jsc): ReferenceError: Can't find variable: structuredClone
benchmark-comparison-test
+- run ... tools/exact-parent-regression.ts --self-test failure

The cloned fixture is the tool's own JSON-shaped sample artifact: numbers, strings, arrays, and plain objects only. Depending on a newer host convenience global is outside the repository-tool portability contract.

Required change

  • Replace the unsupported host-global dependency with an owned exact deep copy for this JSON fixture.
  • Do not add a global polyfill or change the production evidence schema/collector.
  • Run the exact-parent self-test directly and through the complete benchmark-comparison gate.

Acceptance

  • tools/exact-parent-regression.ts --self-test passes under the JSC-backed Home runtime.
  • zig build benchmark-comparison-test passes completely.
  • Evidence schema, collector behavior, and Test262 runtime behavior are unchanged (0 flips).
8 days ago

Implemented and pushed in fix(tools): keep exact-parent self-test portable (#660).

The JSON-shaped mutation fixture now uses an owned JSON deep copy and runs under the JSC-backed Home engine without a polyfill. Frozen V17 is unchanged; V18 hash-inherits every scored workload and collector/publication contract while re-pinning only this self-test source change.

Local evidence: exact-parent self-test passed; representative matrix 22/22; representative benchmark and tier-attribution self-tests passed; complete benchmark-comparison gate 31/31; docs 50 pages; offline links 268 files; 0 Test262 flips. Fresh pushed CI: https://github.com/zig-utils/zig-js/actions/runs/32410670302

8 days ago

Completed in 8aabe412.

The JSON-shaped self-test fixture now uses an owned JSON round-trip copy under the supported JSC-backed Home runtime; no global polyfill and no collector/schema behavior change were introduced. V17 remains byte-for-byte unchanged, while V18 inherits every scored contract and repins only this portable self-test source.

Validation:

  • direct JSC-backed Home exact-parent self-test: pass
  • complete local benchmark-comparison-test: 31/31 pass
  • fresh Linux benchmark-comparison-harness: pass
  • fresh docs gate: pass
  • docs build: 50 pages; offline links: 268
  • evidence schema and production collector behavior unchanged; flips 0 Test262 cases

Sign in to comment on this issue.