feat: complete production naming and reference lifecycle gates
Some checks failed
real-verification / chrome (push) Has been cancelled
real-verification / freecad-oracle (push) Has been cancelled
real-verification / wasm (push) Has been cancelled

This commit is contained in:
2026-08-14 10:10:30 -04:00
parent f97eae4153
commit f64b78865c
75 changed files with 57290 additions and 15675 deletions

View File

@@ -8,6 +8,7 @@ const executable = process.env.FREECAD_CMD || resolve(root, '.cache/freecad/inst
const pythonPath = resolve(root, '.cache/freecad/sysroot/usr/lib/python3/dist-packages')
const script = resolve(root, 'scripts/freecad-composite-history-elementmap-oracle.py')
const outputPath = resolve(root, 'config/freecad-composite-history-elementmap-oracle.json')
const resaveOutputPath = resolve(root, 'config/freecad-composite-history-resave-verification.json')
if (!existsSync(executable)) throw new Error(`FreeCAD composite oracle executable is missing: ${executable}`)
const execution = spawnSync(executable, ['--python-path', pythonPath, script], {
cwd: root,
@@ -28,5 +29,29 @@ const markerIndex = output.indexOf(marker)
const payload = markerIndex >= 0 ? output.slice(markerIndex + marker.length).match(/\{.*\}/s)?.[0] : undefined
if (execution.error || execution.status !== 0 || !payload) throw new Error(`FreeCAD composite history oracle failed with status ${execution.status}: ${execution.error?.message || output.trim()}`)
const report = JSON.parse(payload)
const resaveReport = {
schemaVersion: 1,
baselineId: report.baselineId,
freecadVersion: report.freecadVersion,
gitCommit: report.gitCommit,
status: report.status,
cases: report.cases.map(({ id, roundtripNameDrift, resaveNameDrift, nativeDesktopResaveCovered }) => ({ id, roundtripNameDrift, resaveNameDrift, nativeDesktopResaveCovered })),
summary: {
cases: report.summary.cases,
passed: report.summary.passed,
failed: report.summary.failed,
roundtripNameDrift: report.summary.roundtripNameDrift,
resaveNameDrift: report.summary.resaveNameDrift,
nativeDesktopResaveCases: report.summary.nativeDesktopResaveCases,
},
}
await writeFile(resaveOutputPath, `${JSON.stringify(resaveReport, null, 2)}\n`)
for (const caseReport of report.cases) {
delete caseReport.resaveNameDrift
delete caseReport.nativeDesktopResaveCovered
}
delete report.summary.roundtripNameDrift
delete report.summary.resaveNameDrift
delete report.summary.nativeDesktopResaveCases
await writeFile(outputPath, `${JSON.stringify(report, null, 2)}\n`)
console.log(JSON.stringify(report, null, 2))