The PR-249 semantics/oom-one-thread.js witness now exercises zig-js's real Context.Options.heap_limit_bytes cap instead of relying on the vendored JSC RAM-cap directive. That makes the remaining failure shape much sharper: the cap fires, but the allocation pressure escapes as a whole-Thread completion OutOfMemoryError instead of being caught by the allocating JS frame's local try/catch.
Current probe evidence:
FAIL semantics/oom-one-thread.js: OutOfMemoryError: Context heap limit exceededThis is different from the already-landed reserved thread OOM completion object: that path is correct for thread startup/completion pressure where JS execution cannot publish a fresh exception object. Here, the allocation happens inside running JS, so the ideal contract is a catchable JS exception at the allocation site.
Acceptance:
- Allocations that exceed
Context.Options.heap_limit_bytesinside an active JS frame throwOutOfMemoryErrorinto that frame. - A local JS
try/catcharound the allocating expression can observe theOutOfMemoryErrorbefore it becomes the wholeThreadcompletion result. - Host entry pressure before a JS frame exists may still surface as Zig
error.OutOfMemory/ top-level evaluation failure where appropriate. semantics/oom-one-thread.jspasses or progresses past the allocation-site catchability blocker.- Existing thread OOM survivor/recovery tests stay green, including sibling join behavior after one thread hits the heap cap.