Follow-up to the Rsbuild conformance audit: #72.
Problem
The runtime observer correlates MultiStats.children[] by environment name, then captures mutable writeToDisk roots after global completion. Rspack documents optional Stats name / hash fields, but Rsbuild does not promise child names equal environment keys. Rsbuild also documents parallel environments, not a transactional filesystem snapshot across compiler output roots.
A naming change fails loudly, but scheduling drift can let Stats hashes and copied RSC/widget/App files describe different child moments. The bounded conformance fix explicitly sets Rspack compiler names, retains exact-child assertions, serializes capture, and documents the empirical cross-root timing assumption.
Proposed direction
- Stage an immutable output checkpoint for each environment in
onAfterEnvironmentCompile.
- Associate each checkpoint with that environment's successful Stats hash.
- Assemble a runtime cohort only from a complete compatible checkpoint set.
- Garbage-collect superseded/incomplete checkpoints without mutating an admitted generation candidate.
Acceptance
- Generation capture never reads mutable live compiler roots as a cross-environment cohort.
- Stats hashes and copied bytes come from the same immutable per-environment checkpoints.
- Tests cover reordered/skewed child completion, invalidation during assembly, and checkpoint cleanup.
Follow-up to the Rsbuild conformance audit: #72.
Problem
The runtime observer correlates
MultiStats.children[]by environment name, then captures mutablewriteToDiskroots after global completion. Rspack documents optional Statsname/hashfields, but Rsbuild does not promise child names equal environment keys. Rsbuild also documents parallel environments, not a transactional filesystem snapshot across compiler output roots.A naming change fails loudly, but scheduling drift can let Stats hashes and copied RSC/widget/App files describe different child moments. The bounded conformance fix explicitly sets Rspack compiler names, retains exact-child assertions, serializes capture, and documents the empirical cross-root timing assumption.
Proposed direction
onAfterEnvironmentCompile.Acceptance