Repository navigation
Description
Parent: #480. Related: #1118, #1028, #897. Required to qualify the lifecycle gate for stacksjs/the-settlers-iii-remake#244.
Executed failure and exact-parent control
The unchanged 60-seed lifecycle profile on 5cf9846b55169fa894d614c67b2cae8c23cb1b83 plus lexical-lifetime patch 2d0bc899deaa0557e6c495b98de4e69932a342273d20f474fbb5157c14f519bc executes 3,360 programs and fails seed 39's property waitAsync late-settlement score oracle. No weak-cleanup shortfall is reported. The 4,000-poll deadline and every expected score/count remain unchanged.
A focused diagnostic selects the original case without changing its script, poll budget or assertions and adds failure-only scalar score output. Across seeds 1..600:
- The lifetime candidate reports one failure, seed 408: async score/count
2441785/4, expected3052230/5; ordinary join score/count3052410/5, exactly expected. - The exact production parent
5cf9846b, with only that same diagnostic harness change, reports three failures. Seed 68 counts all four async callbacks, but its score is1830290instead of2440386. The omitted610096equals one callback's verified contribution. Ordinary join score/count are exact. Seeds 365 and 368 also lose async totals.
The parent control establishes that this failure predates the lexical-lifetime change. It also distinguishes lost shared-counter updates from missing callback delivery: seed 68 counted every callback but lost a score contribution. Thread.asyncJoin follows the settling-thread rule, while these lifecycle and mid-GC oracles update shared global numbers with ordinary += and ++. Those JavaScript operations do not form atomic read/modify/write transactions across Threads.
Required correction
- Retain the red result, parent control, source/binary identities and failure-only actual score/count diagnostics.
- Use the engine's property-backed Atomics operations for the lifecycle and matching mid-GC score/count updates and observations, including rejection publication.
- Preserve exact bundle identity/value verification, expected totals, callback counts, 4,000-poll deadline, seed windows and canonical profile membership. No serialization of Thread execution, extra retries or weakened assertion.
- Review analogous counter sites for the same ownership rule, separating genuinely shared callbacks from host-only cleanup counters.
- Run focused repeated-case diagnostics, the full 3,360-program lifecycle profile, unsuppressed TSan lifecycle/mid-GC profiles, and affected harness/audit checks.
Evidence: Verification/settlers-retained-replay/native-growth-audit/managed-frames-integration/waitasync-late-settlement/{focused-600,before-focused-600}-receipt.json and logs. Candidate diagnostic binary SHA-256 fc602bcff6c009c26643aaa17c7cd8fc772a600853d55adc09798744ba8162a1; exact-parent diagnostic binary d63119c1ee8d655179c2bf141f76890e8f4c9cf04feb75cc871efe7d07affe23. This is an oracle correction; it does not resolve the independent native replay discrepancy in #1122.
Activity
test(threadfuzz): synchronize late settlement score oracles
chrisbbreuer commentedon Nov 10, 2026
Delivered in 1d5f0588. The lifecycle and matching mid-GC profiles now use property-backed Atomics for all four totals, rejection publication and observations. Exact bundle checks, expected scores/counts, the 4,000-poll loop and canonical seed/profile membership are unchanged. Failure-only diagnostics retain actual and expected values without adding recovery polls.
The same focused diagnostic now passes all 600 cases. The canonical lifecycle profile passes all 3,360 programs, TSan mid-GC all 90, and TSan lifecycle all 112, without suppressions. All 19 benchmark-harness validators, dependency audit and format checks pass. The diagnostic-only selector is confined to the isolated diagnostic checkout and is not in the delivered canonical patch.
The ownership review distinguishes these multi-Thread pending-adoption observers from post-join observers. For example, the late-asyncJoin cleanup case calls synchronous join before registering asyncJoin and therefore settles on its caller; its ordinary cleanup counters were retained. The single-returned-waiter case has one adopting child. Promise prepared-settlement routing and the documented program-race contract were checked; no engine-wide serialization or blanket counter rewrite was introduced.
Hosted CI is pending before this issue is closed. The production runtime is unchanged by this oracle commit. The separate native replay and threaded OOM failures remain #1122 and #1124.