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:
morluto authored and GitHub committed 2026-11-16 23:09:17 -05:00
1 parent 4a6bee6cdb
commit af062e7a2d
21 files changed
+65 -122

No files matched your search

+4 -8
View File
@@ -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;