Reuse verified immutable plans and streamline cooperative hashing
Continue final hosted development reliability qualification.
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import { executionPlanDigest, ExecutionPlanError, type ExecutionPlan } from "./plan.js";
|
||||
import { compileKernelProgram } from "./kernel.js";
|
||||
import { compileInspectionTemplates } from "./inspection.js";
|
||||
import { portableValueSchema } from "../bindings/portable.js";
|
||||
import { ExecutionPlanError, hexDigest, type ExecutionPlan } from "./plan.js";
|
||||
|
||||
import type { ValueType } from "../capability-model/types.js";
|
||||
import { compileQueryComposition } from "../query/composition.js";
|
||||
import { queryTreeBlueprint } from "./query-trees.js";
|
||||
@@ -24,7 +25,7 @@ const lowerTypes = (value: unknown): unknown =>
|
||||
/** Checked query IR and installed getter identities, without GraphQL schemas/parsers or SQL adapters.
|
||||
* Keep authored selection names only for output paths; field access uses resolved interface/member IDs. */
|
||||
export function compileQueryProgram(plan: ExecutionPlan): unknown {
|
||||
if (hexDigest(plan.definition) !== plan.digest)
|
||||
if (executionPlanDigest(plan) !== plan.digest)
|
||||
throw new ExecutionPlanError("INVALID_PLAN", "queries", "Plan digest mismatch");
|
||||
const allQueries = new Map(plan.definition.queries.map(({ id, query }) => [id, query.checked]));
|
||||
const compositions = plan.definition.workspace.packageImports.flatMap((pkg) =>
|
||||
|
||||
Reference in New Issue
Block a user