ReviewOS

home-lang/home

test(runtime): admit the Atomics / SharedArrayBuffer / BroadcastChannel corpus on the native VM across platforms

#810
Open chris opened this 8 days ago ·
8 days ago

Problem

Atomics.waitAsync was recorded as "parked" and there is no Home evidence that js/web/atomics.test.ts, regression/issue/atomics-waitasync-wtftimer-uaf.test.ts, js/node/test/parallel/test-atomics-wake.js or js/web/broadcastchannel/ pass. Worker results (34/34 worker_threads.test.ts) are Darwin-only.

Evidence (origin/main @ d4b219507)

Scope

  • Run the listed files unmodified on the native VM on macOS and Linux; fix what fails.
  • Record the results in the parity docs.

Acceptance criteria

  • All listed files pass on macOS and Linux, recorded with commit SHA.

Depends on: #809 Related: #66, #465 Part of #814.

8 days ago

Native BroadcastChannel/MessageEvent source ownership is published on main in db130b6f1, with retained source and execution evidence.

Home compiles the channel, shared subscriber registry, JavaScript channel wrapper, MessageEvent and JavaScript event wrapper from its mirrored source. Generation validates matching headers, preserves unowned companion includes and rejects missing/duplicate ownership before output. The corresponding external unity object is excluded; source and ABI-header edits invalidate the generation cache. The native-runtime-bindings target and complete home target use the same object producers. The optional symbol-stripping setting preserves compiler/runtime features.

After integrating current main, the complete Debug build passes 28/28 steps, peaking at 5,687 MB under an 8,192 MB build ceiling. Native binding compilation passes 22/22 steps, peak 719 MB. Controls pass 4/4 Zig bindings, 8/8 generator/ABI tests (251 assertions), and 6/6 native worker/message-port lifecycle files. The private fixture's missing ScriptExecutionContext input is corrected; negative checks now verify each intended rejection reason. The first unsuccessful fixture run remains retained.

Both the pre-rebase and combined-source runs complete all six original selected entries with 46 registered passes, zero failures, zero skips, zero TODOs, plus one successful standalone Node process check. All six captures reach verified EOF, with validated raw capture and JUnit hashes. The standalone Node file contributes zero passing registered cases. The committed archives restore into fresh directories and reproduce successful validation. All 146 manifest-listed compressed artifacts are tracked and their decompressed hashes verified. All 22 audited original sources, headers, tests, helpers and configuration files match pinned Bun 4982b91e3702094330f3be3883354c52b8c01323 before and after execution. Combined executable SHA256: d686344103f9ac639c3273a05aaa37c191349206ccf706848866879542421824.

Release compilation remains unfinished in #855. Resource-supervised attempts retain observed 3,879/3,855/4,186 MB against 3,840 MB, 5,276 MB against 5,120 MB, and 8,215 MB (ReleaseFast) / 8,391 MB (ReleaseSmall) against 8,192 MB. A first PATH toolchain also failed configuration. The Debug sample records LLVM AArch64 code generation; it does not identify the release allocation cause or establish release performance. Build budgets changed as recorded; original corpus bodies, workloads, deadlines and the 3,840 MB test-run budget were preserved. None of the stopped builds receives successful-build credit.

The initial existing-binary 44-case diagnostic remains a separate baseline. Git's archive ignore rule excluded compressed files from the first evidence commit; publication 6d278e3a3 adds every manifest-listed archive and verifies its tracked contents.

Darwin source ownership and scoped execution are verified. #810 remains open for Linux; Windows, ASAN, the complete applicable primary/vendor suite and ownership of remaining external bindings/native dependencies are still unfinished. Full logical Bun parity is not achieved; #66 remains open.

Sign in to comment on this issue.