Reuse verified immutable plans and streamline cooperative hashing
Continue final hosted development reliability qualification.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { graphExecutionRepresentation } from "./graph-execution.js";
|
||||
import { lstat } from "node:fs/promises";
|
||||
import { join } from "node:path";
|
||||
import { hexDigest, hexDigestAsync, ExecutionPlanError, type ExecutionPlan } from "./plan.js";
|
||||
import { hexDigest, hexDigestAsync, sealExecutionPlan, ExecutionPlanError, type ExecutionPlan } from "./plan.js";
|
||||
import {
|
||||
loadExecutionInstallation,
|
||||
createClientContractCatalog,
|
||||
@@ -72,7 +72,7 @@ export async function loadCheckedInstallationCandidate(
|
||||
const [plan, artifacts, source, entryRequest, kernel, queries] = values;
|
||||
if (
|
||||
plan?.definition?.codec !== "camino-execution-plan-v1" ||
|
||||
(await hexDigestAsync(plan.definition)) !== plan.digest ||
|
||||
!(await sealExecutionPlan(plan)) ||
|
||||
workspaceDigest !== (await hexDigestAsync(plan.definition.workspace))
|
||||
)
|
||||
throw new ExecutionPlanError(
|
||||
|
||||
Reference in New Issue
Block a user