mirror of
https://github.com/morluto/rea
synced 2026-10-28 06:46:47 -04: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:
@@ -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