Files
FreeCADWasmDev/tools/run_p6_jtreader_action02_persistence.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.7 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 kernel = JSON.parse(fs.readFileSync(path.join(docs, "jtreader-action-02-kernel.json"))); const chrome = JSON.parse(fs.readFileSync(path.join(docs, "jtreader-action-02-chrome.json"))); const report = { schema: "freecad-web-p6-jtreader-action-02-persistence/v1", taskId: "FW-P6-JTR-ACT-02-G", module: "JtReader", action: "inspect/source-inventory", result: "pass_boundary", applicable: false, reason: "Source inventory is read-only and does not create or persist a document; FCStd round-trip is not applicable to this action.", state: { readOnly: true, documentMutation: false, externalRequests: chrome.network.externalRequestCount }, evidence: { kernel: kernel.result, chrome: chrome.result, resultSha256: crypto.createHash("sha256").update(JSON.stringify({ kernel: kernel.result, chrome: chrome.result })).digest("hex") }, commands: ["node tools/run_p6_jtreader_action02_persistence.mjs"], artifacts: { kernel: "docs/p6/jtreader-action-02-kernel.json", chrome: "docs/p6/jtreader-action-02-chrome.json", workerLog: "docs/freecad-p6-jtreader-action-02-g-persistence.log" }, boundaries: ["The separate JtReader save/reopen action remains pending."] }; fs.writeFileSync(path.join(docs, "jtreader-action-02-persistence.json"), `${JSON.stringify(report, null, 2)}\n`); fs.writeFileSync(path.join(root, "docs/freecad-p6-jtreader-action-02-g-persistence.log"), `${JSON.stringify({ result: report.result, applicable: report.applicable, readOnly: true })}\n`); console.log(JSON.stringify({ result: report.result, applicable: report.applicable }));