mirror of
https://github.com/morluto/rea.git
synced 2026-11-19 05:02:40 +00:00
refactor(kernel): eliminate remaining record predicate copies and compose cleanup dependencies through shared owner (#11799)
* refactor(kernel): eliminate remaining record predicate copies and compose cleanup dependencies through shared owner * fix(firmware,tests): remove unused cleanup import and align CI shard and CLI registration tests
This commit is contained in:
1 parent
4a6bee6cdb
commit
af062e7a2d
21 files changed
+65
-122
No files matched your search
@@ -19,7 +19,7 @@ import {
|
||||
cancelledBy,
|
||||
carriedReason,
|
||||
} from "../domain/analysisErrorCore.js";
|
||||
import { analysisErrorWithCleanupFailure } from "../domain/analysisErrorCleanup.js";
|
||||
import { analysisErrorWithCleanupDependencies } from "../domain/analysisErrorCleanup.js";
|
||||
import { projectAnalysisError } from "../domain/analysisErrorProjection.js";
|
||||
import {
|
||||
fixedAllowanceOptions,
|
||||
@@ -433,11 +433,7 @@ export class ArtifactAnalysisResources {
|
||||
(primary ?? failure).retainPartialObservation(cause.partialObservation);
|
||||
return primary === undefined
|
||||
? failure
|
||||
: analysisErrorWithCleanupFailure(
|
||||
primary,
|
||||
failure,
|
||||
operation,
|
||||
).bindCleanupDependencies([primary, failure]);
|
||||
: analysisErrorWithCleanupDependencies(primary, failure, operation);
|
||||
}
|
||||
|
||||
commandFailure(
|
||||
@@ -532,11 +528,11 @@ export class ArtifactAnalysisResources {
|
||||
await this.release();
|
||||
} catch (cause: unknown) {
|
||||
if (descriptorFailure !== undefined && cause instanceof AnalysisError)
|
||||
throw analysisErrorWithCleanupFailure(
|
||||
throw analysisErrorWithCleanupDependencies(
|
||||
descriptorFailure,
|
||||
cause,
|
||||
this.#artifacts.operation,
|
||||
).bindCleanupDependencies([descriptorFailure, cause]);
|
||||
);
|
||||
throw cause;
|
||||
}
|
||||
if (descriptorFailure !== undefined) throw descriptorFailure;
|
||||
|
||||
Reference in new issue
Block a user