Repository navigation
Description
Parent: #480. Blocks stacksjs/the-settlers-iii-remake#244. Related source corrections: #1116, #1119, #1120, #1121. Separate lifetime work: #1118.
The unchanged 288,718-byte retained game fixture (SHA-256 0935723acdd8bc2007c991757bb13e7be04df23251aea97ad307c179cc4c5d31) now loads, runs the original 5,000 ticks, and restores its checkpoint at checksum b413c661, but its replay diverges. The 64 MiB heap, default guard, original 10,002-callback contract and automatic collection remain unchanged.
On the source corresponding to pushed engine 8002da3b38aef1c2e4975910475bbde1a9292035, the default-JIT ReleaseSafe consumer fails at callback 5,119. Replay state tick 117 (result tick 116) expects 0d77d36d and reports cad9d071. A failure-only diagnostic preserves the same first discrepancy and independently recomputes fullChecksum as 0d77d36d; the live state is therefore still capable of producing the expected checksum. Current native binary identity, logs and source equivalence are retained locally.
An earlier characterized trace on the Frame/sort/clone candidate captured valid canonical JSON missing only ledger key 1, while its full encoded state and stored chunk hashes matched the independent Bun oracle. That observation does not prove the precise omitted field or sole cause in the later default-JIT case. Keep the distinction explicit.
A public execution-mode control disables JIT only in its diagnostic host options. It still diverges at callback 5,093: replay state tick 91 (result tick 90), expected fadfd722, actual 02818a92. Its original simulation and restored checkpoint still match b413c661. Disabling JIT is not a fix or qualification path and does not by itself attribute the failure to one tier; the default consumer remains required.
The moving-callback Object.fromEntries crash in #1121 is independently reproduced and corrected, but does not resolve this replay discrepancy. Pure checksum/canonicalization controls, retained fresh-ledger controls, and a 5,001-call Object.entries identity control under retained byte pressure pass their exact diagnostic assertions. Instrumenting the full scenario changes its collection schedule, so altered-source successes cannot qualify the unchanged fixture.
Acceptance:
- Retain the original failing public consumer and first-divergence receipts at the existing limits.
- Minimize the missing or changed serialization result and identify the owning engine operation or lifetime error through an executed red regression.
- Correct the owning source while preserving exact state, keys, callback ordering, root publication and failure semantics.
- Pass the regression in applicable interpreter/native modes, allocation-pressure and moving/shared-GC controls, affected units/conformance and unsuppressed sanitizer gates.
- Complete the unchanged full default consumer with all 10,002 callbacks and exact simulation/checkpoint/replay result before qualifying Craft adoption.
No application checksum replacement, full-checksum fallback, alternate serialization path, manual GC, pinning, collection suppression, raised heap/step limits, shorter tick window or substituted runtime. Evidence is under Verification/settlers-retained-replay/native-growth-audit/managed-frames-integration: game-release-safe-from-entries-roots, replay-from-entries-failure-state-diagnostic, game-jit-disabled-control, and their receipts. The latter host binary SHA-256 is b23ef4e7b0de41af2e169e539581713656498379594651b5788321ed63620f8c.
Activity
chrisbbreuer commentedon Nov 10, 2026
The unchanged default consumer remains red on the lexical-lifetime candidate (
5cf9846b55169fa894d614c67b2cae8c23cb1b83plus patch SHA-2567f57211d852fa85db0dec117c6e8197cc4efef532b2b84245667cc331eb56a63). This candidate separately passed all 3,360 canonical lifecycle programs, 112 TSan lifecycle programs and 90 TSan mid-GC programs. Those lifetime results do not resolve this issue.The original simulation and restored checkpoint still match
b413c661. Replay fails at callback 5,012, state tick 10/result tick 9: expected2f21c790, actual93c278bf. The original 288,718-byte JS SHA-256 remains0935723acdd8bc2007c991757bb13e7be04df23251aea97ad307c179cc4c5d31. Native ReleaseSafe binary SHA-256 isc1f4af8bb4c716da6bc30e7da7e00914776874fa3a183e9db03175c2135ecaa2. Heap remains 67,108,864 bytes with default JIT/guard and automatic collection; all 10,002 callbacks remain required. No native adoption is qualified.Two additional integer-key Object.entries controls completed all 5,001 exact identity checks, including retained 54 MiB ballast inside the same 64 MiB Context limit. The high-pressure control peaked at 67,108,845 bytes. Each ends with an explicit diagnostic-complete error, so its exit 1 is not a game pass. These controls do not reproduce or attribute the missing serialization result.
Receipts and logs:
Verification/settlers-retained-replay/native-growth-audit/managed-frames-integration/weak-slot-lifetime-current/game-native-source-{build,run}-receipt.json, with separate integer-key control directories. A later debugger-safety refinement is being qualified separately; these results are attributed only to the exact candidate above.fix(gc): retire unobservable captured frame bindings
test(threadfuzz): synchronize late settlement score oracles
fix(regexp): allocate cached matcher headers on first use
chrisbbreuer commentedon Nov 11, 2026
The unchanged public consumer remains red on current engine source 11df4be7. A fresh ReleaseSafe build uses default JIT and automatic collection, the original 67,108,864-byte heap, unchanged host, and original fixture SHA-256
0935723acdd8bc2007c991757bb13e7be04df23251aea97ad307c179cc4c5d31.Simulation and checkpoint restoration match
b413c661. Replay fails at callback 6,955, state tick 1,953 / result tick 1,952, expected563d20a2, actual8ce9233e. This establishes a current first divergence; it does not establish that the earlier missing-ledger-key observation is this run's cause.The executed native binary SHA-256 is
04f02df07ee884e83bea697cbba6f25ead2604b3fc2d3944994885b73f31ab90. The host fixture is byte-for-byte unchanged from the preserved prior diagnostic consumer (failure reporting runs only after the original callback throws). No manual collection, increased limits, serialization replacement, shorter run or execution-mode substitution was used.Receipts, exact inputs, binary, full output and parsed first-divergence report are retained in
Verification/settlers-retained-replay/native-growth-audit/managed-frames-integration/replay-current-main-11df4be7/. Build and run receipts confirm source stability. Native adoption remains unqualified.chrisbbreuer commentedon Nov 11, 2026
Two diagnostic runs on the same 11df4be binary narrow the transient serialization failure. These alter source/GC timing and do not qualify the unchanged fixture.
A failure-only diagnostic fails at replay state tick 4,498. Its full recomputation returns expected
f9641495, while the original incremental call returnedc0719855. Bun 1.4.4 independently reconstructs that state and exactly matches all nine stored map hashes and the later canonical entity string. This does not reproduce a persistent state or dirty-map discrepancy.A second diagnostic retains the text used by each combine call, then captures that original text before the failure-only recomputation overwrites it. It fails at state tick 727: expected
cc5a0e76, actuala8d7d25c. The original text is invalid canonical JSON:"buildings":[,...], missing exactly the first building's serialized object. The later string includes that one object; all other bytes match. An independent byte-by-byte FNV calculation over the captured original text and oracle map hashes reproducesa8d7d25cexactly. This identifies a transient serialization-result loss in this diagnostic, rather than a mismatched arithmetic checksum over correct text.A third probe checks the array immediately after
value.map(canonical), before join. It throws at callback 5,610 / replay tick 608 with input length 2, output length 2, first output property present, type string, and the first output string empty; the first input object still has building id 1. Canonical serialization of that object must contain braces, so the empty callback result needs an owning lifetime regression. This does not yet distinguish callback-return lifetime from result storage or prove equivalence with every previous missing-key witness.Evidence:
replay-current-main-11df4be7/failure-diagnostic/{oracle-comparison,serialization-controls}.json,actual-text-diagnostic/{report,serialization-differences,oracle-comparison,captured-text-hash-control}.json, andmap-stage-diagnostic/{run.log,run-receipt.json}under the existing managed-frames verification directory. All use the original 64 MiB heap and default execution mode. No application fix or adoption claim.chrisbbreuer commentedon Nov 12, 2026
Fresh unchanged public-Context replay on current main ee65ec1 still fails at callback 6,955. Simulation and save restoration both produce b413c661. Replay reaches state tick 1,953 / result tick 1,952, expected 563d20a2, actual 8ce9233e. This exactly matches the earlier 11df4be witness, so the subsequent script-reentry/C-API budget improvements have not resolved this failure.
The original 288,718-byte JavaScript fixture remains SHA256 0935723acdd8bc2007c991757bb13e7be04df23251aea97ad307c179cc4c5d31, and the original host is unchanged. Default JIT, automatic GC, the 64 MiB native heap and 10,002-callback requirement are retained. Build and execution stayed within the unchanged 3,072 MiB process-tree guard. Build took 79.39 seconds; execution failed after 31.55 seconds. The resulting executable is SHA256 210e6c7fdb92bd41e14750b5bc9c2b6db38e53fc707269d191dfbcb28e10fdec.
Source, original fixture/host hashes, command receipts and the exact failure report are retained under native-growth-audit/managed-frames-integration/replay-current-main-ee65ec1a. Separate diagnostic probes have already narrowed a serialization failure to an empty mapped string and a small constant-state canonicalization witness. A JIT/tree comparison of that diagnostic is in progress; it will not substitute for the unchanged original replay qualification.
fix(gc): retain pending array result values during growth
chrisbbreuer commentedon Nov 12, 2026
Delivered source fix on main in 0ef38d0, with current dependency inventory synchronized in 363e8b8. The root cause is pending managed callback values during dense array backing growth: single-thread elements locks do not root the value before allocation recovery. arrayResultPush now uses the existing precise temporary root slice for both the result and pending value and restores its mark on every exit.
The maintained minimized regression fails before the fix at callback 3967 after 125 collections. It passes 5001 callbacks in each interpreter/JIT mode afterward, alongside 16 moving/realm/species/OOM controls. Unsuppressed TSan passes with engine/dependency instrumentation confirmed in the linked artifact. Existing Array.prototype and Array.from conformance remains 2810/2810 and 47/47, with zero flips.
The unchanged original 288718-byte fixture and host complete all 10002 default-JIT callbacks, with the original 64 MiB heap, automatic GC and existing guards. Fixture SHA-256 remains 0935723acdd8bc2007c991757bb13e7be04df23251aea97ad307c179cc4c5d31; host remains 7c2e116004eb57edfe34105695deb52b867f0891fe8e75d733d64d2bb4ad3fa2. Simulation/checkpoint/replay match the original full expected result. Before/after failure evidence is retained.
Qualification was executed on 6ba45ee68c55405f5065f75bea207cc9fe5b8d86; delivery integrates only the upstream ecosystem-workflow pin change, with every qualified source/dependency/inventory input byte-identical. Full hosted integration is running at https://github.com/zig-utils/zig-js/actions/runs/43171501956 and https://github.com/zig-utils/zig-js/actions/runs/43171502877. Keeping this open pending those gates and subsequent Craft adoption. Full local receipt: Verification/settlers-retained-replay/native-growth-audit/managed-frames-integration/canonical-string-root-regression/final-source-qualification.json.