ReviewOS

home-lang/home

Bun parity: harden structuredClone fast paths for exotic objects

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

Tracks Bun corpus frontier position 4186: js/web/structured-clone-fastpath.test.ts.

The first observed failure is an array with a replaced prototype: Blob graph detection calls value.some, which is no longer present. Scope is the complete upstream fast-path matrix, including prototype tampering and other exotic object behavior, with a permanent regression and actionable structured-clone diagnostics.

Parent: #66 Predecessor: #385

10 days ago

Completed and pushed in 67c90d8 (fix(clone): harden exotic array fast paths).

Verification:

  • Upstream js/web/structured-clone-fastpath.test.ts: 92 pass, 0 todo, 0 fail, 0 unsupported.
  • Permanent structured-clone regression: 4 pass, including prototype-tampered sparse arrays through both native and Blob-aware paths.
  • Full zig build --cache-dir /private/tmp/home-zig-abi-cache: pass.
  • Formatting and whitespace checks: pass.

The Blob detector no longer trusts user-controlled array methods, Map/Set traversal uses intrinsic methods, and the shared serializer now preserves array length, holes, named properties, cycles, and standard Array identity. Parent: #66. Predecessor: #385.

Sign in to comment on this issue.