Parents: #493, #495 Related: #863, #867
Problem
Each private C-API VM owns two remaining process-default identity maps:
private_object_boxesmaps script-selected Object pointers to canonical private EncodedJSValue wrappers across sibling realms.private_contiguous_vectorsmaps VM-owned vector addresses used to validate arbitrary caller-provided snapshot pointers.
Both use std.AutoHashMapUnmanaged, so long-lived bucket placement is
predictable. The object path also allocates an arena-resident Boxed wrapper
before its map insertion can fail; repeated publication failure can retain
unreachable wrapper storage until VM teardown.
Required design
- Give each VM-owned registry an independent lazy secure hash context with exact pointer/integer equality and no process-default placement.
- Publish the first context only after successful backing allocation; entropy or allocation failure leaves an empty, unseeded, retryable registry.
- Reserve object-map storage before creating a canonical wrapper, or otherwise prove that failed publication retains no wrapper or duplicate canonical cell.
- Preserve one canonical private object handle across sibling realms.
- Preserve moving-GC reconciliation without allocation: remove stale keys, rekey live moved objects, and never replace an existing canonical wrapper.
- Preserve contiguous-vector lifetime and exact validation; null, stale, forged, foreign-array, length-mismatched, and mutated snapshots remain inert.
- Keep the existing VM/thread ownership and teardown rules.
No-workaround rules
- No predictable seed fallback, address-derived seed, hash-only equality, object or vector cap, linear fallback, leaked wrapper/tombstone, duplicate canonical handle, disabled moving GC, copied vector to hide validation bugs, weakened pointer checks, signature/layout change, or synchronization removal.
Acceptance
- Deterministic default-seed collision families disperse independently in both exact registries; lookup/removal/rekey remain exact.
- Entropy and each first-publication allocation failure leave registries empty, unseeded, leak-free, and retryable.
- Canonical object publication allocates no wrapper until insertion capacity is guaranteed, and moving-GC rekeying performs no allocation.
- Object identity across sibling realms and contiguous-vector validation preserve all current success and rejection semantics.
- Focused tests pass in Debug, ReleaseSafe, and TSan; moving-GC/no-GIL, threadfuzz, full units, public C, and pinned Home/Bun ABI/runtime gates pass.