Reuse verified immutable plans and streamline cooperative hashing
Continue final hosted development reliability qualification.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { executionPlanDigest, type ExecutionPlan, ExecutionPlanError, hexDigest } from "./plan.js";
|
||||
import { portableReflectionType, portableReflectionValue } from "./reflection.js";
|
||||
import type {
|
||||
ValueType,
|
||||
@@ -7,7 +8,7 @@ import type {
|
||||
BoundDependency,
|
||||
PackageExport,
|
||||
} from "../capability-model/types.js";
|
||||
import { type ExecutionPlan, ExecutionPlanError, hexDigest } from "./plan.js";
|
||||
|
||||
import { portableValueSchema } from "../bindings/portable.js";
|
||||
import { subscriptionContract } from "../capability-model/journals.js";
|
||||
type PreparedStep = string | null | { case: string; id: string };
|
||||
@@ -25,7 +26,7 @@ function preparedInputPaths(type: ValueType, path: PreparedStep[] = []): Prepare
|
||||
}
|
||||
/** Small data-only interpreter input; no compiler, parser, Node module or SQL dependency reaches the browser. */
|
||||
export function compileKernelProgram(plan: ExecutionPlan): unknown {
|
||||
if (hexDigest(plan.definition) !== plan.digest)
|
||||
if (executionPlanDigest(plan) !== plan.digest)
|
||||
throw new ExecutionPlanError("INVALID_PLAN", "kernel", "Plan digest mismatch");
|
||||
const workspace = plan.definition.workspace;
|
||||
if (workspace.sharedAttachments.some((attachment) => attachment.kind !== "edge"))
|
||||
|
||||
Reference in New Issue
Block a user