Prepare verified laboratory 7 implementation and evidence

This commit is contained in:
rey
2026-11-17 17:32:06 +03:00
parent 20afc2c790
commit eb1b5c7b84
677 changed files with 208256 additions and 64 deletions
+17
View File
@@ -0,0 +1,17 @@
export type RuntimeMode = "canonical" | "checked-cache";
export function createRuntimePreparation(ports: {
build: () => Promise<void>;
verifyCache: () => Promise<void>;
}) {
if (
typeof ports?.build !== "function" ||
typeof ports?.verifyCache !== "function"
)
throw new Error("RUNTIME_PREPARATION_PORTS_REQUIRED");
return async (mode: RuntimeMode) => {
if (mode !== "canonical" && mode !== "checked-cache")
throw new Error("INVALID_RUNTIME_MODE");
if (mode === "canonical") await ports.build();
else await ports.verifyCache();
};
}