Reuse verified immutable plans and streamline cooperative hashing
Continue final hosted development reliability qualification.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { executionPlanDigestAsync, type ExecutionPlan, hexDigest, hexDigestAsync, ExecutionPlanError } from "./plan.js";
|
||||
import { portableReflectionValue } from "./reflection.js";
|
||||
import type {
|
||||
BoundDependency,
|
||||
@@ -6,7 +7,6 @@ import type {
|
||||
PersistentAttachment,
|
||||
} from "../capability-model/types.js";
|
||||
import { type ExecutionInstallation, type ExecutionGroupIdentity } from "./installation.js";
|
||||
import { type ExecutionPlan, hexDigest, hexDigestAsync, ExecutionPlanError } from "./plan.js";
|
||||
|
||||
export interface ExecutionEnvironment {
|
||||
/** Explicit host placement. Merely including an optional module does not select it. */
|
||||
@@ -28,7 +28,7 @@ export async function compileExecutionGroups(
|
||||
installation: ExecutionInstallation,
|
||||
environments: Readonly<Record<string, ExecutionEnvironment>>,
|
||||
): Promise<InstalledExecutionGroup[]> {
|
||||
if (installation.plan !== plan.digest || (await hexDigestAsync(plan.definition)) !== plan.digest)
|
||||
if (installation.plan !== plan.digest || (await executionPlanDigestAsync(plan)) !== plan.digest)
|
||||
throw new ExecutionPlanError("GROUP_PLAN_MISMATCH", plan.digest, "Expected one checked installation");
|
||||
const workspace = plan.definition.workspace;
|
||||
const packages = new Map(workspace.packageImports.map((p) => [p.revisionId as string, p]));
|
||||
|
||||
Reference in New Issue
Block a user