Parents: #478 Related: #531, #532, #480, #105, #310
Problem
Current-main diagnostics for representative_shape_transition_fanout still scale through four shared-realm lanes and fall at eight even though Shape publication records zero writer yields and #532 reduced named-property contention to near zero.
One-job diagnostics on 6dbe188f (1,000 scored publications per lane, exact frozen checksums) measured approximately 282k / 391k / 487k / 377k aggregate edges/s at 1/2/4/8 lanes. An amplified eight-lane run of 500,000 jobs per lane completed 4,000,000 scored edges in 16.538 seconds with checksum 4,500,013,000,000.
A three-second native sample of that exact amplified invocation recorded these collapsed leaves:
GcCellBacking.allocFn: 2,649 samples;swtch_pri: 1,085 samples;GcCellBacking.freeFn: 511 samples;GcCellBacking.ownedChunkIndexLocked: 91 samples.
The process reached about 4.1 GiB physical footprint because the row intentionally publishes unique retained Shape edges. The hot cell-slab size class still has one shared allocation lock. #105 amortizes explicit same-kind allocation batches, but this workload publishes one observable edge per operation and therefore enters the single-cell backing path. Repeating the rejected pressure-counter sharding from #310 would not address this lock.
Scope
- Add opt-in exact attribution for cell-backing allocation/free acquisitions, contention/spins or wait, size class, fresh/reused slots, chunk growth, and shard/owner selection.
- Freeze a benchmark-first allocation-pressure row or reuse the existing base/variant/contended Shape rows only after proving that the timed work and counters isolate this backing path.
- Implement bounded Context-owned allocation sharding or another measured design that lets independent mutators reserve/reuse same-size cell storage without one hot size-class lock.
- Preserve batch allocation/publication, realm ownership, published-bit ordering, address classification, stable identity epochs, moving/parallel GC, compaction, sweep batching, and exact teardown.
- Keep retained unused capacity bounded and reclaimable. Any mutator-local reserve needs an explicit publication, revocation, thread-exit, Context-destroy, and OOM rollback proof.
No-workaround rules
- No GIL, hidden serialization, global mutable TLS cache, unbounded per-thread slabs, leaking unpublished reservations, reduced scored work, prepublishing benchmark keys, predictable attacker-controlled shard selection, disabled compaction, or delayed safepoints.
- Do not retry #310's rejected pressure-counter design without new causal evidence.
- Do not touch stacks, queues, jobs, Promise/microtask, or Worker lifecycle code.
Acceptance
- Benchmark/counter source, jobs, checksums, warmup, timed boundary, and 1/2/4/8 lane inventory land before the runtime change.
- Exact attribution accounts for every eligible cell-backing allocation/free acquisition and identifies the affected size classes and ownership path.
- Independent shared publication throughput is non-decreasing across 1/2/4/8 lanes on stable repeated samples; same-parent serialization remains visible and bounded.
- Direct/independent allocation, short batches, mixed size classes, reused/fresh slots, and retained RSS do not regress materially.
- Allocation failure and partial-prefix ordering remain exact; bounded heap, thread exit, Context teardown, moving/parallel GC, compaction, stable identities, realm routing, and sweep reuse pass.
- Suppression-free TSan, threadfuzz profiles, full units, and exact Object/Array/Proxy test262 pass without regressions.
- Seven-pair exact-parent attribution and final scaling evidence publish wall, CPU, RSS, allocation/GC counters, instructions/cycles/energy availability, thermal state, and complete dispersion with no discarded samples.
Security boundary
Allocation width, size class, property names, mutator schedules, collection timing, and OOM pressure are attacker-controlled. The design must remove engine-state contention without exposing half-published cells, cross-realm ownership confusion, reusable-address identity bugs, unbounded retention, or allocator races.