mirror of
https://github.com/morluto/rea.git
synced 2026-10-29 19:05:45 +00:00
refactor(artifacts): centralize completed file outcomes
Project completed values and cancellation from the descriptor owner once across artifact consumers. Preserve completed void outcomes and format-specific validation and cleanup policies. Keep later aborts from replacing captured APK and SQLite close failures, and retain the exact APK cancellation reason. Exercise real descriptors, public workflows and cleanup retries.
This commit is contained in:
1 parent
7fd6e486ae
commit
2bcd7e6d13
20 files changed
+291
-148
No files matched your search
@@ -10,9 +10,8 @@ import {
|
||||
import { ArtifactResourceScope } from "../artifacts/ArtifactResourceScope.js";
|
||||
import { ArtifactReaderFailure } from "../artifacts/ArtifactReader.js";
|
||||
import {
|
||||
ArtifactFileCleanupFailure,
|
||||
artifactFilePrimaryFailure,
|
||||
ArtifactFileCancelled,
|
||||
artifactFileCompletion,
|
||||
bindArtifactFileCleanup,
|
||||
artifactFileCancellationCause,
|
||||
assertArtifactReadActive,
|
||||
@@ -593,16 +592,11 @@ export class Il2cppMetadataProvider implements Il2cppMetadataPort {
|
||||
observe(sourceArtifact(path, snapshot));
|
||||
return snapshot;
|
||||
} catch (cause) {
|
||||
const outcome =
|
||||
cause instanceof ArtifactFileCleanupFailure
|
||||
? (cause as ArtifactFileCleanupFailure<StableArtifactSnapshot>)
|
||||
.fileCleanupFailure.outcome
|
||||
: cause instanceof ArtifactFileCancelled
|
||||
? (cause as ArtifactFileCancelled<StableArtifactSnapshot>)
|
||||
.fileCancellation.outcome
|
||||
: undefined;
|
||||
if (outcome?.kind === "completed")
|
||||
observe(sourceArtifact(path, outcome.value));
|
||||
const completion = artifactFileCompletion(cause);
|
||||
if (completion !== undefined)
|
||||
observe(
|
||||
sourceArtifact(path, completion.value as StableArtifactSnapshot),
|
||||
);
|
||||
throw cause;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user