Parents: #493, #478, #480 Related: #759, #762, #851
Problem
Dense Array hole bookkeeping uses std.AutoHashMapUnmanaged(usize, void). Zig hashes the exact integer bytes with fixed Wyhash seed 0, while JavaScript can select deleted dense indices below the engine dense cap (2^24). An attacker can therefore precompute same-bucket index families and force collision-heavy native probes behind indexed reads, writes, deletes, enumeration, and Array methods.
Scope
- Replace the default-context hole set with an exact-integer keyed index using one unpredictable context per sparse-array sidecar.
- Derive the seed from the owning Array Shape entropy source and store it only in the existing cold sidecar allocation; do not enlarge hot
Objectstate. - Use the context for every contains, insert, remove, clear, and finalization path.
- Publish the sidecar only after the first insertion succeeds; entropy or allocation failure must expose neither an index nor a context.
- Preserve dense/sparse transitions, elisions, deletion/fill/truncation semantics, enumeration order, backing ownership, moving/concurrent GC, shared-realm locking, OOM behavior, and VM/tree-walker parity.
No-workaround rules
- No array-length/index cap reduction, deleted-index rejection, deterministic/public/address/time-derived fallback seed, hash-only equality, linear scan presented as hardening, global mutable seed, per-hole entropy request, or retained dead entries.
- No unrelated named-property, collection, typed-array, public/private ABI, or Array semantic change.
Acceptance
- Every dense-hole lookup and mutation uses one installed Shape-derived exact-integer context.
- A fixed-seed default collision family disperses under a keyed context while exact index equality is preserved.
- First entropy/allocation/insertion failure publishes no hole sidecar/context; retry succeeds normally.
- Array elision/delete/fill/truncate/enumeration and moving/concurrent GC tests pass in Debug, ReleaseSafe, and TSan/no-GIL coverage.
- Exact-parent Array Test262 inventory has nonzero accounting and zero regressions; required-VM parity has zero new divergence.
- Full unit and threadfuzz gates pass.