docs(process): preserve capture invariants

This commit is contained in:
morluto committed 2026-07-13 17:15:22 +08:00
1 parent ba15d16c58
commit 841990bde1
33 files changed
+214 -128

No files matched your search

+3
View File
@@ -96,6 +96,9 @@ export class ProcessCheckpoints {
capture(name: string): void {
if (this.#captured.has(name)) return;
this.#captured.add(name);
// Serialize scans even when time, terminal, and lifecycle triggers fire
// together. Each effect set is intentionally relative to the immediately
// preceding checkpoint, which preserves transient create/delete behavior.
this.#pending = this.#pending.then(async () => {
const snapshot = await snapshotRoots(this.scenario, this.signal);
const previous = this.#captures.at(-1)?.files ?? [];