Parent: #473
Measured problem
After #1011, the production representative_json invocation still performs 1,998,848 unpublication callbacks. Each callback advances GcCellBacking.stable_identity_epoch with an atomic compare/exchange, even though zig-gc already publishes exact sweep begin/end boundaries and reclaimed storage cannot be reused until per-cell finalization completes.
This is distinct from the bucket-lock telemetry: single-owner locks are already no-ops, but the epoch RMW remains real work in scored builds.
Candidate
While a sweep is active:
- publish a temporary cache-disabled epoch (
maxInt(u64)) so stable identity always takes the exact metadata path; - invalidate once at sweep begin;
- continue withdrawing each publication bit before finalization;
- invalidate once more before re-enabling range caching at sweep end.
Unpublication outside a sweep and relocation keep their immediate per-cell epoch invalidation.
A three-pair exact-parent screen against pushed #1011 produced:
representative_json: 0.998834x instructions, 0.978103x CPU, 0.978523x wall- anti-specialization variant: 0.995801x instructions, 0.988031x CPU
- escaped strings: 0.998966x instructions, 0.985320x CPU
- reviver source: 0.998089x instructions (CPU/wall noisy)
- depth/shallow stringify controls: 1.001500x / 1.001416x instructions
- all checksums exact
Definition of done
- Pin per-cell publication withdrawal, cache-disabled exact lookup during sweep, two boundary invalidations, and immediate invalidation outside sweep.
- Prove every successful minor/full sweep balances begin/end; aborted pre-sweep collections cannot leave caching disabled.
- Pass focused Debug and TSan tests, conservative-root/moving-GC integration, JSON OOM/GC units, shared no-GIL TSan, and deep-input tree/VM probes.
- Preserve JSON test262 and required VM/tree agreement.
- Record seven interleaved exact-parent pairs with exact checksums and no hidden control regression.
- Land as one conventional commit on
main, close this issue with raw evidence, and update #473.