Follow-up to the Rsbuild conformance audit: #72.
Problem
The runtime compile observer assigns an attempt ID in global onBeforeDevCompile and consumes IDs FIFO in onAfterDevCompile. Rsbuild documents lifecycle order but not a stable cycle ID, exact callback cardinality under coalesced invalidations, or one-to-one pairing when MultiCompiler children invalidate at different times. Rsbuild 2.2.1's shared-promise invalidation deduplication and synthesized global completion are implementation details.
A minor scheduling change can associate MultiStats with an older attempt, leave a newer activation barrier unsettled, or wedge generation supersession. The bounded conformance fix detects any non-singleton pending queue, fails all live attempts, and throws rather than silently misassociating them.
Proposed direction
- Treat each successful completed MultiStats cohort as the authoritative monotonic identity.
- Keep pre-compile observation advisory; it must not own an activation-blocking barrier.
- Base supersession on completed cohort ordinals and prepared-runtime authority.
- Add deterministic tests for coalesced, missing, duplicated, and reordered global callbacks plus skewed child invalidations.
Acceptance
- No generation identity depends on FIFO position between global hooks.
- Missing/duplicate/reordered callbacks cannot wedge activation or associate Stats with stale state.
- Existing failed/no-op attempt and commit-window protections remain intact.
Follow-up to the Rsbuild conformance audit: #72.
Problem
The runtime compile observer assigns an attempt ID in global
onBeforeDevCompileand consumes IDs FIFO inonAfterDevCompile. Rsbuild documents lifecycle order but not a stable cycle ID, exact callback cardinality under coalesced invalidations, or one-to-one pairing when MultiCompiler children invalidate at different times. Rsbuild 2.2.1's shared-promise invalidation deduplication and synthesized global completion are implementation details.A minor scheduling change can associate MultiStats with an older attempt, leave a newer activation barrier unsettled, or wedge generation supersession. The bounded conformance fix detects any non-singleton pending queue, fails all live attempts, and throws rather than silently misassociating them.
Proposed direction
Acceptance