fix(process): harden filesystem snapshot identity and cancellation (#956)
* fix(process): bind snapshots to captured file identity * fix(process): honor snapshot cancellation for empty files * test(process): verify snapshot descriptor cleanup * fix(process): preserve snapshot cancellation results * fix(process): preserve non-cancellation capture failures * test(process): verify descriptor cleanup with fstat * fix(process): detect snapshot changes by ctime * test(process): prove snapshot ctime invalidation
This commit is contained in:
@@ -449,6 +449,7 @@ export const resolveProcessResult = (
|
||||
export const prepareProcessCapture = async (
|
||||
scenario: ProcessScenario,
|
||||
signal: AbortSignal | undefined,
|
||||
captureSnapshot: typeof snapshotRoots = snapshotRoots,
|
||||
host: ProcessPreparationHost = systemProcessPreparationHost,
|
||||
): Promise<{
|
||||
readonly temporaryRoot: string;
|
||||
@@ -456,7 +457,7 @@ export const prepareProcessCapture = async (
|
||||
readonly before: SnapshotResult;
|
||||
}> => {
|
||||
assertNotCancelled(signal);
|
||||
const before = await snapshotRoots(scenario, signal);
|
||||
const before = await captureSnapshot(scenario, signal);
|
||||
const temporaryRoot = await host.createTemporaryRoot();
|
||||
try {
|
||||
const runId = randomUUID();
|
||||
|
||||
Reference in New Issue
Block a user