Files
FreeCADWasmDev/tools/run_p6_cloud_action04_summary.mjs
wangdequan 9a7c4f0335 Save FreeCAD Web workspace sources and user validation evidence
IFC native binding remains incomplete; preserve accurate test results.
2026-09-15 22:01:58 +08:00

4 lines
1.5 KiB
JavaScript

#!/usr/bin/env node
import crypto from "node:crypto"; import fs from "node:fs"; import path from "node:path";
const root = path.resolve(path.dirname(new URL(import.meta.url).pathname), ".."); const docs = path.join(root, "docs/p6"); const files = { C: "cloud-action-04-kernel.json", D: "cloud-action-04-recovery.json", E: "cloud-action-04-facade.json", F: "cloud-action-04-chrome.json", G: "cloud-action-04-persistence.json" }; const contracts = Object.fromEntries(Object.entries(files).map(([step, file]) => { const bytes = fs.readFileSync(path.join(docs, file)); const report = JSON.parse(bytes); return [step, { task_id: `FW-P6-CLD-ACT-04-${step}`, status: report.status ?? report.result, artifact: `docs/p6/${file}`, sha256: crypto.createHash("sha256").update(bytes).digest("hex") }]; })); const report = { schema: "freecad-web-p6-cloud-action-04-summary/v1", task_id: "FW-P6-CLD-ACT-04", module: "Cloud", action: "save/reopen", status: Object.values(contracts).every((item) => item.status === "pass") ? "pass" : "fail", source_revision: "b5a086fda59b0325fe0996147e6e9b344414f9bc", contracts, applicable: false, module_status: "in_progress", boundaries: ["All five contracts close only the Cloud remote persistence applicability boundary; they do not claim local FCStd round-trip or network transfer."] }; fs.writeFileSync(path.join(docs, "cloud-action-04-save-reopen.json"), `${JSON.stringify(report, null, 2)}\n`); console.log(JSON.stringify({ result: report.status, contracts: Object.keys(contracts).length }));