feat: advance FreeCAD parity verification and runtime boundaries
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-11 02:14:45 -04:00
parent 26ea9b57d7
commit 2be18a511e
31 changed files with 451 additions and 57 deletions

View File

@@ -21,7 +21,8 @@ async function walk(relative = '') {
}
const violations = []
for (const file of await walk()) {
const sourceFiles = await walk()
for (const file of sourceFiles) {
if (allowDirectRuntime.has(file)) continue
const content = await readFile(new URL(file, sourceRoot), 'utf8')
for (const pattern of forbidden) {
@@ -30,9 +31,18 @@ for (const file of await walk()) {
}
}
const productionFacade = await readFile(new URL('facade/productionFacade.ts', sourceRoot), 'utf8')
const application = await readFile(new URL('App.tsx', sourceRoot), 'utf8')
const runtimeProfile = await readFile(new URL('facade/runtimeProfile.ts', sourceRoot), 'utf8')
if (/from\s+["']\.\/mockFacade["']/.test(productionFacade)) violations.push('facade/productionFacade.ts: production entry imports mockFacade directly')
if (/createMockFacade|facade\/mockFacade/.test(application)) violations.push('App.tsx: production application references the mock Facade')
for (const declaration of ['bitbybit-occt', 'optional-worker', 'not-exposed', 'sqlite-opfs-with-memory-fallback', 'three-webgl2']) {
if (!runtimeProfile.includes(declaration)) violations.push(`facade/runtimeProfile.ts: missing explicit runtime boundary '${declaration}'`)
}
if (violations.length) {
console.error('Facade-only boundary failed:')
violations.forEach((violation) => console.error(`- ${violation}`))
process.exit(1)
}
console.log(`Facade-only boundary passed (${(await walk()).length} TypeScript source files checked).`)
console.log(`Facade-only boundary passed (${sourceFiles.length} TypeScript source files checked).`)