fix: preserve source closure during snapshot replay (#8870)

* fix: preserve source closure during snapshot replay

* fix: revalidate restored snapshot sources lazily

* fix: bound and share source-closure checks
This commit is contained in:
morluto authored and GitHub committed 2026-11-07 16:22:21 +08:00
1 parent b31fc5d5fb
commit 441ba94086
9 files changed
+661 -63

No files matched your search

@@ -323,14 +323,16 @@ export abstract class BinarySessionRecords {
>,
): AnalysisExecution | undefined {
if (this.#snapshotInvalidated) return undefined;
return this.#snapshot.lookup(target, profile, operation, parameters);
return this.#snapshot.lookup(target, profile, operation, parameters, (id) =>
this.evidenceForAnalysis(id),
);
}
protected recordSnapshot(
input: Parameters<AnalysisSnapshotCache["record"]>[0],
): void {
if (this.#snapshotInvalidated) return;
this.#snapshot.record(input);
this.#snapshot.record(input, (id) => this.evidenceForAnalysis(id));
this.#emitSnapshotChanged();
}