ReviewOS

zig-utils/zig-js

tools: keep algorithmic-growth self-test within the supported evaluator budget

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

Problem

zig build benchmark-comparison-test fails under the repository's zig-js home-tool backend because tools/algorithmic-growth.ts --self-test exhausts the evaluator's default step budget after its accepted-artifact phase.

This reproduces locally in isolation in about 50 seconds, so it is deterministic validation work rather than hosted machine speed. The self-test repeatedly rebuilds and revalidates the same complete nested artifacts: successful construction, explicit validation, default validation, and render() each traverse the whole input; every legacy version repeats build + validate + validating render. The later mutation checks also place the changed row after unchanged rows, paying validation work that cannot affect the asserted failure.

This is separate from #933's human-blocked policy choice for the engine's default step budget. The validator should fit the current supported host by removing redundant traversals while preserving every schema, compatibility, report-byte, and fail-closed assertion.

Definition of done

  • The algorithmic-growth self-test completes through the zig-js home-tool backend at the existing default evaluator budget.
  • Successful artifacts are not rebuilt or revalidated solely to exercise formatting; formatting has a validated internal boundary and public render() remains fail-closed.
  • Default v4 schema pairing, legacy v1-v3 construction/report compatibility, the checked historical report, zero-allocation replay, and every mutation failure remain covered.
  • zig build benchmark-comparison-test passes without increasing or bypassing the engine step budget.
  • Direct JSC and zig-js Home self-tests agree.
9 days ago

Landed in 9d435e3.

The self-test now reuses already-validated fixtures for formatting, keeps public render() fail-closed, uses the schema-minimum alternating pair count, and moves mutation witnesses to the first width. Matrix V48 re-pins only the validator; evidence schemas, scored workloads, validation rules, and publication acceptance are unchanged.

Validation:

  • zig-js Home self-test completes at the unchanged default evaluator budget
  • JavaScriptCore Home self-test passes the same contract
  • zig build benchmark-comparison-test -Dhome-tool=/tmp/home-checker-prefix/bin/home-tool: 19/19 validators passed
  • representative matrix structural tests: 84/84
  • documentation: 51 pages, manifest exact, 378 links resolved
  • 0 test262 cases affected
9 days ago

CI exposed one missing dependency classification after the V48 matrix landed: tools/algorithmic-growth.ts was referenced by the new immutable matrix and its validator without both callers being registered. Fixed in 7cc902f0; the local dependency audit now passes with 16 classified edges and 65 repository tools.

Sign in to comment on this issue.