mirror of
https://github.com/morluto/rea.git
synced 2026-11-17 04:04:25 +00:00
fix(session): retain cleanup blockers and snapshot request identity
This commit is contained in:
1 parent
e00b2eda0b
commit
9becdfe8f4
6 files changed
+57
-10
No files matched your search
@@ -19,6 +19,7 @@ import type { JsonObjectMemberReader } from "../JsonInputFile.js";
|
||||
import type { ArtifactResourceScope } from "../../artifacts/ArtifactResourceScope.js";
|
||||
|
||||
type SnapshotFailure = EvidenceFileError | EvidenceIntegrityError;
|
||||
const READ_OPERATION = "open_binary";
|
||||
|
||||
/** Read and validate an analysis snapshot from the caller's path. */
|
||||
export const readAnalysisSnapshot = async (
|
||||
@@ -63,6 +64,7 @@ export const readAnalysisSnapshot = async (
|
||||
],
|
||||
signal,
|
||||
resources,
|
||||
READ_OPERATION,
|
||||
);
|
||||
if (!loaded.ok) return loaded;
|
||||
signal?.throwIfAborted();
|
||||
@@ -77,7 +79,9 @@ export const readAnalysisSnapshot = async (
|
||||
return ok(snapshot);
|
||||
} catch (cause: unknown) {
|
||||
if (signal?.aborted === true)
|
||||
return err(new AnalysisCancelledError("read_evidence_file", { cause }));
|
||||
return err(
|
||||
new AnalysisCancelledError(READ_OPERATION, { cause: signal.reason }),
|
||||
);
|
||||
return err(
|
||||
new EvidenceIntegrityError(snapshotValidationMessage(cause), { cause }),
|
||||
);
|
||||
|
||||
@@ -1033,6 +1033,7 @@ export class BinarySession
|
||||
requestActivitySnapshots: client?.requestActivitySnapshots?.() ?? [],
|
||||
providerOperationHealth: client?.operationHealthSnapshot?.() ?? null,
|
||||
cleanupPending:
|
||||
this.#externalMutationCleanupFailure?.cleanupIncomplete === true ||
|
||||
this.#pendingCleanup !== undefined ||
|
||||
this.#pendingBundleResourceCleanup.length > 0 ||
|
||||
this.hasPendingFileResources ||
|
||||
|
||||
Reference in new issue
Block a user