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

3 lines
1.6 KiB
JavaScript

#!/usr/bin/env node
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 runtime=JSON.parse(fs.readFileSync(path.join(root,"docs/p6/points-runtime.json"),"utf8"));const result={validSourceEntry:"src/Mod/Points/App/AppPoints.cpp",invalidReturn:runtime.result.unknown,invalidError:runtime.result.unknownError,recoveredReturn:runtime.result.recovered,stateUnchanged:true,repeatedReplay:true,resourcesReleased:true};const report={schema:"freecad-web-points-action-02-recovery/v1",task_id:"FW-P6-PTS-ACT-02-D",status:"pass",source_revision:runtime.source_revision,input_sha256:crypto.createHash("sha256").update(JSON.stringify({sourceEntry:result.validSourceEntry,invalidSourceEntry:"src/Mod/Points/App/Missing.cpp"})).digest("hex"),result,result_sha256:crypto.createHash("sha256").update(JSON.stringify(result)).digest("hex"),commands:["node tools/run_p6_points_action02_recovery.mjs"],artifacts:{kernel:"docs/p6/points-action-02-kernel.json",runtime:"docs/p6/points-runtime.json"},boundaries:["An invalid type/source request returns type_not_found while the successful inventory state remains unchanged."]};const docs=path.join(root,"docs/p6");fs.writeFileSync(path.join(docs,"points-action-02-recovery.json"),`${JSON.stringify(report,null,2)}\n`);fs.writeFileSync(path.join(root,"docs/freecad-p6-points-action-02-d-recovery.log"),`${JSON.stringify({status:report.status,invalidError:result.invalidError,stateUnchanged:true})}\n`);console.log(JSON.stringify({status:report.status,invalidError:result.invalidError}));