You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stage immutable per-environment outputs before assembling runtime cohorts #74
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.
Closed-issue re-audit (G3) — VERIFIED.#85 (76de3add8) is on origin/main: examples/rsc-agent-runtime/src/dev/environment-checkpoint-store.ts stages an immutable per-environment checkpoint keyed by that environment's Stats hash and assembles a cohort only from a complete compatible set; generation-materializer.ts captures from checkpoints, never from live compiler roots. Acceptance tests exist and pass here: skewed completion (tests/environment-checkpoint-store.test.ts:75), superseding invalidation during assembly (:107), failed staging rejection (:134), pinned-cohort immutability + GC on release (:156), unchanged-hash dedupe (:209), close/cleanup paths (:228-322), and generation-materializer.test.ts:744-771 ("stages a checkpoint for every successful environment compilation", "recaptures an identical cohort from its immutable checkpoints").
Activity
feat(examples/rsc-agent-runtime): stage immutable per-environment out…
fix(dev): stage immutable per-environment output checkpoints before a…
ScriptedAlchemy commentedon Sep 3, 2026
Closed-issue re-audit (G3) — VERIFIED. #85 (
76de3add8) is onorigin/main:examples/rsc-agent-runtime/src/dev/environment-checkpoint-store.tsstages an immutable per-environment checkpoint keyed by that environment's Stats hash and assembles a cohort only from a complete compatible set;generation-materializer.tscaptures from checkpoints, never from live compiler roots. Acceptance tests exist and pass here: skewed completion (tests/environment-checkpoint-store.test.ts:75), superseding invalidation during assembly (:107), failed staging rejection (:134), pinned-cohort immutability + GC on release (:156), unchanged-hash dedupe (:209), close/cleanup paths (:228-322), andgeneration-materializer.test.ts:744-771("stages a checkpoint for every successful environment compilation", "recaptures an identical cohort from its immutable checkpoints").