Parent: #493 Related: #461, #478, #495, #501, #857
Problem
The Context-owned debugger statement-location registry is a persistent AutoHashMapUnmanaged(*const ast.Node, DebugStatementLocation). JavaScript controls source size, statement count, dynamic Function/eval creation, and AST allocation order. Deterministic pointer hashing therefore exposes collision-amplified insertion and lookup work. In a no-GIL realm, every registry miss holds the shared reentrant debugger lock, so a collision family also amplifies cross-thread latency.
The fixed-size interpreter-local hot cache bounds repeated hits but cannot protect cold statements, dynamic scripts, inspector enumeration, JIT source lookup, or registry publication.
Scope
- Replace the default pointer map with one Context-owned exact AST-identity index using a realm-secret keyed hash context derived from the root Shape key source.
- Keep empty/no-location scripts seed- and allocation-free.
- Make first non-empty publication failure-atomic: entropy or capacity failure publishes no context, location, script id, or partial registry entry.
- Preserve exact script ids, source coordinates, debugger-statement flags, late attach/history, reentrant notifications, interpreter-local cache behavior, and existing no-GIL lock ownership.
- Route interpreter, inspector, JIT observability, and test iteration through the same context-aware index.
No-workaround rules
- No statement filtering, history truncation, linear fallback, address-secrecy assumption, larger fixed cache, disabled dynamic code, or inspector-only special case.
- No new per-statement entropy call, global mutable hash seed, or lock held outside the existing registry transaction.
- No change to JavaScript/debugger protocol semantics or source-location precision.
Acceptance
- The default AST-pointer map is gone and every read/write/iteration uses the exact keyed index.
- Empty registries remain seed-free; failed first capacity acquisition leaves context, count, scripts, and next id unchanged.
- A direct legacy
AutoHashMap(*Node, ...)collision family disperses under a fixed realm seed without changing pointer equality. - Dynamic Function/eval publication, late inspector attach, JIT source mapping, and the four-way interpreter cache remain exact.
- Focused Debug/ReleaseSafe/TSan, full unit, threadfuzz, public C API inspector, and Home private-ABI gates pass without regressions.