Files
FreeCADWasmDev/tools/run_p6_robot_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

2 lines
1.6 KiB
JavaScript

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),".."),docs=path.join(root,"docs/p6"),read=f=>JSON.parse(fs.readFileSync(path.join(docs,f),"utf8")),k=read("robot-kernel.json"),d=read("robot-recovery.json"),e=read("robot-facade.json"),f=read("robot-chrome.json"),ev={kernel:k.details,recovery:d.recovery,facade:e.sequencing,chrome:{result:f.result,externalRequests:f.network.externalRequestCount,exceptions:f.exceptions.length}},report={schema:"freecad-web-p6-robot-persistence/v1",taskId:"FW-P6-ROB-G",module:"Robot",action:"create/recompute",result:"pass_boundary",applicable:false,reason:"Robot create/recompute closes an in-memory native document and has no save/reopen action in the first slice; the separate ACT-04 persistence contract remains pending.",state:{documentMutation:true,localFcstdRoundTrip:false,readOnly:false,resourcesReleased:true},evidence:{...ev,resultSha256:crypto.createHash("sha256").update(JSON.stringify(ev)).digest("hex")},artifacts:{kernel:"docs/p6/robot-kernel.json",recovery:"docs/p6/robot-recovery.json",facade:"docs/p6/robot-facade.json",chrome:"docs/p6/robot-chrome.json"},boundaries:["No persistence is inferred from create/recompute; Robot save/reopen remains a later action."]};fs.writeFileSync(path.join(docs,"robot-persistence.json"),JSON.stringify(report,null,2)+"\n");fs.writeFileSync(path.join(root,"docs/freecad-p6-robot-g-persistence.log"),JSON.stringify({result:report.result,applicable:false})+"\n");console.log(JSON.stringify({result:report.result,applicable:false}));