Review execution semantic-major changes without storage migration planning

This commit is contained in:
Timothy J. Aveni
2026-09-21 01:38:15 -07:00
parent 01a3ec5ae2
commit 70344ca06a
3 changed files with 111 additions and 17 deletions
+21 -3
View File
@@ -7,7 +7,12 @@ import type { convergeAuthoring } from "./authoring-converge.js";
import { execFile as callback } from "node:child_process";
import { promisify } from "node:util";
import { buildImmutableCandidate, checkerIdentity } from "./checked-build.js";
import { planEvolution, type WorkspaceRevision, type EvolutionReview } from "../capability-model/index.js";
import {
planEvolution,
reviewSemanticMajors,
type WorkspaceRevision,
type EvolutionReview,
} from "../capability-model/index.js";
export const checkRecordName = (directory: string) => createHash("sha256").update(directory).digest("hex") + ".json";
export async function checkAuthoring(
@@ -105,7 +110,20 @@ export async function checkAuthoring(
} catch (error) {
if ((error as NodeJS.ErrnoException).code !== "ENOENT") throw error;
}
if (resource.kind === "workspace" && !options.contractOnly && report.runtime !== "execution") {
if (resource.kind === "workspace" && !options.contractOnly && report.runtime === "execution") {
report.phase = "semantic-review";
if (options.reviews && !options.baseline)
throw new Error("Execution semantic reviews require an explicit --baseline candidate");
const baseline = options.baseline
? (JSON.parse(await fs.readFile(options.baseline, "utf8")) as WorkspaceRevision)
: null;
const receipts = options.reviews
? (JSON.parse(await fs.readFile(options.reviews, "utf8")) as EvolutionReview[])
: [];
const review = reviewSemanticMajors(baseline, JSON.parse(candidateText), receipts);
await fs.writeFile(path.join(output, "semantic-review.json"), JSON.stringify(review, null, 2));
report.blockers.push(...review.blockers);
} else if (resource.kind === "workspace" && !options.contractOnly) {
report.phase = "evolution";
await progress();
let baseline = options.baseline;
@@ -154,7 +172,7 @@ export async function checkAuthoring(
await fs.writeFile(temporary, JSON.stringify(value, null, 2), { flag: "wx", mode: 0o600 });
await fs.rename(temporary, filename);
};
if (report.artifactPath) {
if (report.artifactPath && report.compilation === "passed" && !report.blockers.length) {
const graph = JSON.parse(await fs.readFile(path.join(report.artifactPath, "graph.json"), "utf8"));
for (const checked of graph.resources) {
const managed = context.resources.find(