Parents: #465, #473. Found while auditing #799; related to #784.
Source-audited mismatch
At main 2865b8b, Interpreter.evalUpdate has separate identifier/member/super/fallback branches that skip object coercion for primitive Symbols, then call infallible Value.toNumber (which yields NaN for those objects). Update Expressions require ToNumeric and must throw TypeError for Symbol without writing the target. The same branches increment/decrement bigIntValue with fixed-width wrapping arithmetic, losing the engine's arbitrary-precision BigInt representation. The VM's existing update operation uses checked conversion and general BigInt arithmetic instead.
This was a pre-existing tree-walker/VM mismatch, not the parameter-admission classifier itself. Runtime reproduction is now confirmed: Symbol increment stored NaN, the largest signed i128 BigInt wrapped negative, and incrementing 2^130 produced 1n. The original source-audit report was followed by exact before/after witnesses.
Acceptance
- Use one exact numeric update operation across tree-walker and VM/native runtime dispatch: ToNumeric once observably, Symbol TypeError, Number ±1, arbitrary-precision BigInt ±1.
- Preserve prefix/postfix result types and exact old/new values across identifier, member, and super References, with no store after failed conversion.
- Keep original Reference identity, getter/coercion/setter ordering, strict/const/TDZ behavior, and moving-GC ownership through every observable boundary.
- Add deterministic before/after Symbol, wrapped Symbol, wide/overflow-boundary BigInt, effect-order, GC and allocation-failure witnesses; verify ordinary and suspendable/required-bytecode entry paths.
- Measure affected pinned Test262 update subtrees, full units, TSan/no-GIL and fuzz; land issue-linked conventional commits and report pushed CI separately.
No lossy truncation, Number conversion of BigInt, wrapped arithmetic at the storage boundary, duplicate coercion, suppressed exception, disabled moving GC, AST callback, or native stack/queue/job/lifecycle redesign.
Landed numeric fix and remaining ownership audit
d2ad8a8f — fix(runtime): preserve exact numeric update results (#800) is on origin/main, authored and committed by Chris without trailers.
The shared operation implements checked ToNumeric, exact arbitrary-precision BigInt updates and an allocation-free primitive Number path. Update callers root the retained receiver/key/super base and old/new BigInts, including values returned after setters.
Measured against main 2865b8b and Test262 4249661:
- 16 paired semantic witnesses: 4 -> 16 passes, zero final failures.
- Four default-tier update subtrees: 142/142 before and after, 0 flips and no measured regressions. Postfix increment/decrement 38/37; prefix increment/decrement 33/34.
- Numeric Debug checks 3/3; ReleaseSafe+TSan 3/3, without reports/suppressions/leaks. Includes allocation replay, actual receiver relocation during conversion, and exact postfix BigInts after setter-triggered relocation.
- Combined integration with #799: 2,026 units passed, 1 platform skip, zero failures/leaks, 350.5 seconds across four timing-balanced shards. Seed-1 fuzz: 400 default + 300 exact-result programs, zero failures. Verification timings are not performance claims.
The callee-local ownership prerequisite is now implemented in ab23a1bb (#801): six moving reproductions improve 0/6 -> 6/6, with 63 actual-moving cases, full 2,031-pass Debug units and focused TSan/no-GIL/OOM/root-mapping checks passing. Caller roots are not used as a substitute for callee-local reloads. #801 records its complete evidence and independently remaining boundaries.
- Pushed required integration verified: CI 33130214332 at descendant
e4f76afcompleted successfully: 53 jobs passed, one scheduled-only job skipped, zero failures. Superseded/cancelled earlier runs are not counted as successful gates.
Evidence: /Users/chris/.cache/zig-js-799.NeLWpV/README.md. Final test binaries, hashes, source diffs, fixtures and shard plans remain; five generated build caches were removed (1.4 GB -> 144 MB). Temporary corpus fixtures are removed after byte-comparing retained copies. No native ownership or synchronization redesign.
- Complete pushed integration: CI 33144524467 at descendant 81978f7b completed successfully: 53 jobs passed, one scheduled-only job skipped, zero failures. This supersedes earlier pending, cancelled, or failed integration reports; those earlier runs are not counted as successful gates.
f83c4191 — feat(vm): retain live deferred class captures (#803) additionally implements #803 deferred class captures and construction ownership prerequisites #804/#805. Final local combined production checks pass 2,037 units (one platform skip), 20 added actual-moving class/construction cases, focused TSan/no-GIL/OOM and 700 fuzz programs. Existing #801 checks remain in the full suite. Local success does not replace pushed integration.
Cleanup update: superseded #799/#801 Debug/TSan unit binaries were removed after their hashes and logs were retained. Their evidence READMEs document retirement; source diffs, witnesses, transcripts, shard plans and available corpus runners remain.
Completed integration (2026-08-28 UTC)
Implementation: d2ad8a8f. The measured local evidence above and in the linked implementation comments remains unchanged.
- Complete pushed integration: CI 33144524467 at descendant 81978f7b completed successfully: 53 jobs passed, one scheduled-only job skipped, zero failures. This supersedes earlier pending, cancelled, or failed integration reports; those earlier runs are not counted as successful gates.
Closing this implemented issue as completed. Parent-roadmap work and independently tracked follow-ups remain open; this closure does not claim those broader scopes are finished.