mirror of
https://github.com/morluto/rea.git
synced 2026-10-30 19:35:56 +00:00
fix(filesystem): preserve digest failures through cleanup cancellation
Record cancellation at file checkpoints and before owner handoff. Keep physical hash failures, exact reasons, completed facts and failed-close owners distinct through artifact and provider projections and cleanup retries. Refs #4598. Validated with 566 passing affected tests and 22 platform skips; final Kuna cleanup reason rerun passed 43 tests. No Android device or real JADX/Kuna execution claimed.
This commit is contained in:
1 parent
0d22474280
commit
e65c3955f9
36 files changed
+854
-234
No files matched your search
@@ -1,3 +1,4 @@
|
||||
import { regularFileCancellation } from "../../filesystem/OwnedRegularFile.js";
|
||||
import { createHash } from "node:crypto";
|
||||
import { lstat, mkdir, opendir, writeFile } from "node:fs/promises";
|
||||
import { dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
|
||||
@@ -37,7 +38,11 @@ const scanRecoveryFile = async (
|
||||
// A descriptor whose close failed stays owned by its error, even when
|
||||
// cancellation was also requested.
|
||||
if (cause instanceof RegularFileAdmissionFailure) throw cause;
|
||||
checkRecoveryCancellation(signal);
|
||||
const cancellation = regularFileCancellation(cause);
|
||||
if (cancellation !== undefined)
|
||||
throw new AnalysisCancelledError(OPERATION, {
|
||||
cause: cancellation.reason,
|
||||
});
|
||||
if (cause instanceof NonRegularFileReadError)
|
||||
throw new AnalysisOutputError(
|
||||
OPERATION,
|
||||
|
||||
Reference in new issue
Block a user