Reuse checked bootstrap catalogs and coordinate execution deadlines

This commit is contained in:
Timothy J. Aveni
2026-10-09 17:10:14 -07:00
parent 041a9e26ad
commit 2ae7f00acb
4 changed files with 154 additions and 18 deletions
+11 -2
View File
@@ -2,7 +2,11 @@ import { graphExecutionRepresentation } from "./graph-execution.js";
import { lstat } from "node:fs/promises";
import { join } from "node:path";
import { hexDigest, ExecutionPlanError, type ExecutionPlan } from "./plan.js";
import { loadExecutionInstallation, type PackageInstallationSelection } from "./installation.js";
import {
loadExecutionInstallation,
createClientContractCatalog,
type PackageInstallationSelection,
} from "./installation.js";
import {
candidateMetadataBudget,
readCandidateMetadata,
@@ -153,6 +157,7 @@ export async function loadCheckedInstallationCandidate(
programs: artifacts.programs,
}),
};
const catalog = createClientContractCatalog(plan, installation, scope, kernel);
return {
reference,
workspace: plan.definition.workspace.workspaceId,
@@ -165,11 +170,15 @@ export async function loadCheckedInstallationCandidate(
queries,
installation,
executionPlan: plan as ExecutionPlan,
clientContractCatalog: catalog.select,
metadata: {
get bytes() {
return scope.bytes;
},
release: scope.release,
release: () => {
catalog.close();
scope.release();
},
},
};
} catch (error) {