feat: add candidate FreeCAD naming SDK and attachment oracles
Build and verify the candidate-only FreeCAD naming bridge and OCCT worker path, including three-stage StringHasher restoration. Add Datum, ShapeBinder, attachment-mode, and PartDesign structure oracles plus offline SDK build plans and CI boundary checks.
This commit is contained in:
@@ -1,8 +1,22 @@
|
||||
import createProbe from './dist/freecad-private-naming-source-probe.js'
|
||||
import { inspectWasmStaticArchive } from '../../scripts/freecad-naming-sdk-lib.mjs'
|
||||
|
||||
const archive = await inspectWasmStaticArchive(new URL('./dist/libFreeCADPrivateNamingProbe.a', import.meta.url))
|
||||
if (archive.memberCount !== 7 || archive.wasmObjectCount !== 7 || archive.llvmBitcodeCount !== 0) {
|
||||
throw new Error(`Unexpected FreeCAD private naming source archive: ${JSON.stringify(archive)}`)
|
||||
}
|
||||
|
||||
const probe = await createProbe()
|
||||
const result = probe.freecadPrivateNamingSourceProbe()
|
||||
if (result !== 'Edge12;:M;CUT;:H2a:7,E') throw new Error(`Unexpected FreeCAD private naming source probe result: ${result}`)
|
||||
const stringHasherResult = probe.freecadPrivateStringHasherSourceProbe()
|
||||
if (stringHasherResult !== 'plain=1;hashed=2;mapped=5;index=12;related=2') {
|
||||
throw new Error(`Unexpected FreeCAD StringHasher source probe result: ${stringHasherResult}`)
|
||||
}
|
||||
const elementMapResult = probe.freecadPrivateElementMapSourceProbe()
|
||||
if (elementMapResult !== 'stored=#1;:H2a,F;tag=42;original=Edge12;:M;CUT;serialized=115;restored=1') {
|
||||
throw new Error(`Unexpected FreeCAD ElementMap source probe result: ${elementMapResult}`)
|
||||
}
|
||||
for (const forbidden of ['freecadNamingAbiVersion', 'freecadNamingCapabilitiesJson', 'freecadNamingEvidenceJson']) {
|
||||
if (typeof probe[forbidden] === 'function') throw new Error(`Source prerequisite probe must not export production ABI callback ${forbidden}.`)
|
||||
}
|
||||
@@ -10,7 +24,22 @@ console.log(JSON.stringify({
|
||||
status: 'source-prerequisite-pass',
|
||||
freecadVersion: '1.1.1',
|
||||
sourceCommit: '0108fd4b4850cc46e625b60e53cea7a7bbe69f8d',
|
||||
linkedSources: ['App/IndexedName.cpp', 'App/MappedName.cpp'],
|
||||
linkedSources: [
|
||||
'App/IndexedName.cpp',
|
||||
'App/MappedName.cpp',
|
||||
'App/StringHasher.cpp',
|
||||
'App/MappedElement.cpp',
|
||||
'App/ElementNamingUtils.cpp',
|
||||
'App/ElementMap.cpp',
|
||||
'Base/Handle.cpp',
|
||||
],
|
||||
sourceArchive: {
|
||||
name: 'libFreeCADPrivateNamingProbe.a',
|
||||
...archive,
|
||||
productionEligible: false,
|
||||
},
|
||||
result,
|
||||
stringHasherResult,
|
||||
elementMapResult,
|
||||
productionWorkerLinked: false,
|
||||
}, null, 2))
|
||||
|
||||
Reference in New Issue
Block a user