ReviewOS

home-lang/home

Port JSC DOMJIT intrinsic stress corpus

#131
Closed chris opened this 10 days ago ·
10 days ago

Scope

Activate Bun’s byte-identical js/bun/jsc/domjit.test.ts corpus. It runs the original 1,000 / 10,000 / 100,000 / 1,000,000 iteration ladders across Buffer allocation, performance timing, TextEncoder/TextDecoder, crypto operations, filesystem Stats predicates, plus the million-iteration Node VM contexts.

Baseline

  • native-todo wrapper: 0 passed, 0 failed, 0 unsupported, 1 todo
  • corpus matches ~/Code/bun byte-for-byte

Acceptance criteria

  • preserve all original iteration counts and VM-context loops
  • support the real imported crypto/fs/vm modules and general crypto.timingSafeEqual byte validation/comparison behavior
  • no reduced counts, skipped active tests, or fabricated stress results
  • exact corpus passes all 46 active tests with 0 failures/unsupported; retain the 4 upstream-declared FFI todos
  • add a permanent home_test regression
  • full home_test gate passes
  • commit/push as Chris Breuer without coauthors and update #66
10 days ago

Implemented and pushed in bb39dc5 (test: port Bun DOMJIT stress corpus).

What landed:

  • activated the byte-identical upstream js/bun/jsc/domjit.test.ts
  • retained the original 1,000 / 10,000 / 100,000 / 1,000,000 iteration ladders and the million-iteration VM-context loops
  • added narrow static import lowering for the corpus’s existing bun:ffi, crypto, fs, and node:vm imports
  • added a general crypto.timingSafeEqual implementation with byte-view type checks, equal-length validation, and a full-byte XOR comparison; no test-only return value
  • added a permanent regression that pins both stress ladders, requires the native-todo wrapper to stay absent, and checks the exact upstream active/todo counts

Validation:

  • corpus verified byte-identical with ~/Code/bun
  • ./pantry/.bin/zig build debug --summary failures — pass
  • exact corpus — 46 passed, 0 failed, 0 unsupported, 4 upstream-declared todos
  • ./pantry/.bin/zig build test -Dfilter=home_test --summary failures — pass

Closing as complete. Tracking continues in #66.

Sign in to comment on this issue.