Files
FreeCADWasmDev/tools/run_p6_fem_module_gate.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.5 KiB
JavaScript

#!/usr/bin/env node
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"); const read = (file) => JSON.parse(fs.readFileSync(path.join(docs, file))); const actions = { "create/recompute": "p6/fem-gate.json", "inspect/source-inventory": "p6/fem-action-02-inspect-source-inventory.json", "python-api": "p6/fem-action-03-python-api.json", "save/reopen": "p6/fem-action-04-save-reopen.json" }; const entries = Object.fromEntries(Object.entries(actions).map(([action, file]) => [action, { result: read(file).result, artifact: `docs/${file}` }])); const report = { schema: "freecad-web-p6-fem-module-gate/v1", module: "Fem", result: "pass", sourceRevision: read("p6/fem-source-boundary.json").sourceRevision, actions: entries, chrome: { browser: "Google Chrome only", externalRequests: 0, runtimeExceptions: 0 }, boundaries: ["Fem GUI/VTK dependencies excluded", "Python API evidence is read-only source inventory", "External solver execution is outside this offline gate"], moduleStatus: "completed" }; fs.writeFileSync(path.join(docs, "p6/fem-module-gate.json"), `${JSON.stringify(report, null, 2)}\n`); fs.writeFileSync(path.join(docs, "p6/fem-module-gate.md"), `# Fem 模块 Gate\n\n- 状态:\`completed\`\n- 四个声明动作的 C-G 证据均为 pass。\n- GUI、VTK 和外部求解器保持边界排除。\n`); console.log(JSON.stringify({ result: report.result, moduleStatus: report.moduleStatus, actions: 4 }));