Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer, web workflow engine and protocol, tooling, docs and task records. Large generated evidence, user-testing archives, build snapshots and imported test assets remain untracked. Co-Authored-By: Claude Code <noreply@anthropic.com>
38 lines
1.7 KiB
JavaScript
38 lines
1.7 KiB
JavaScript
import crypto from "node:crypto";
|
|
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { fileURLToPath } from "node:url";
|
|
|
|
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
|
|
const abs = (file) => path.join(root, file);
|
|
const readJson = (file) => JSON.parse(fs.readFileSync(abs(file), "utf8"));
|
|
const writeJson = (file, value) => fs.writeFileSync(abs(file), `${JSON.stringify(value, null, 2)}\n`);
|
|
const sha = (file) => crypto.createHash("sha256").update(fs.readFileSync(abs(file))).digest("hex");
|
|
|
|
const planPath = "tests/golden/WBV2-P1100-000/module-execution-plan.json";
|
|
const parentPath = "tests/golden/WBV2-P1129-001/manifest.json";
|
|
const rootPath = "tests/golden/WBV2-P1130-000/manifest.json";
|
|
const reportPath = "tests/golden/WBV2-P1130-000/successor-authorization-report.json";
|
|
const modulePath = "tests/golden/WBV2-P1130-001/manifest.json";
|
|
|
|
const parent = readJson(parentPath);
|
|
parent.artifacts.plan.sha256 = sha(planPath);
|
|
writeJson(parentPath, parent);
|
|
|
|
const report = readJson(reportPath);
|
|
report.parent.manifestSha256 = sha(parentPath);
|
|
writeJson(reportPath, report);
|
|
|
|
const authorization = readJson(rootPath);
|
|
authorization.artifacts.parentManifest.sha256 = sha(parentPath);
|
|
authorization.artifacts.plan.sha256 = sha(planPath);
|
|
authorization.artifacts.report.sha256 = sha(reportPath);
|
|
writeJson(rootPath, authorization);
|
|
|
|
const module = readJson(modulePath);
|
|
module.artifacts.parentManifest.sha256 = sha(rootPath);
|
|
module.artifacts.plan.sha256 = sha(planPath);
|
|
writeJson(modulePath, module);
|
|
|
|
process.stdout.write(`wbv2-p1130-handoff-hashes-repaired plan=${sha(planPath)} parent=${sha(parentPath)} root=${sha(rootPath)} module=${sha(modulePath)}\n`);
|