feat: close ordered pairs and property codec batches
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-17 04:58:46 -04:00
parent 00ed27b7b8
commit d11566403d
265 changed files with 92107 additions and 809 deletions

View File

@@ -0,0 +1,16 @@
import { isDeepStrictEqual } from 'node:util'
import { readFile } from 'node:fs/promises'
import { resolve } from 'node:path'
const root = resolve(new URL('..', import.meta.url).pathname)
const report = JSON.parse(await readFile(resolve(root, 'config/chrome-property-direction-verification.json'), 'utf8'))
const fail = (message) => { throw new Error(`Chrome PropertyDirection check failed: ${message}`) }
if (report.schemaVersion !== 1 || report.status !== 'pass' || report.browserId !== 'chrome' || !/Chrome\//.test(report.userAgent || '') || report.crossOriginIsolated !== true) fail('browser boundary is invalid')
const requiredWorkerRequests = ['initialize', 'save-document', 'load-document', 'load-checkpoint', 'recovery-report', 'put-resource', 'get-resource', 'release-resource', 'dispose']
if (!report.worker?.constructed?.some(({ name }) => name === 'bitbybit-persistence') || !requiredWorkerRequests.every((type) => report.worker.requestTypes?.includes(type)) || report.worker.terminated?.includes('bitbybit-persistence') !== true) fail('persistence Worker lifecycle is incomplete')
const initial = { x: 0, y: 0, z: 1 }
const target = { x: 0.25, y: -0.5, z: 1.5 }
if (report.ui?.inputTypes?.some((type) => type !== 'number') || !isDeepStrictEqual(report.ui?.labels, ['Normal x', 'Normal y', 'Normal z']) || !isDeepStrictEqual(report.ui?.beforeValue, initial) || !isDeepStrictEqual(report.ui?.afterValue, target) || report.ui?.documentVersion !== 4 || report.ui?.dirty !== true || report.ui?.objectState !== 'touched' || report.ui?.errors?.length !== 0) fail('production UI direction edit evidence is incomplete')
if (report.persistence?.mode !== 'sqlite-opfs' || report.persistence.sqliteWasm !== true || report.persistence.opfs !== true || report.persistence.savedMode !== 'sqlite-opfs' || !isDeepStrictEqual(report.persistence.loadedValue, target) || report.persistence.loadedType !== 'App::PropertyDirection' || report.persistence.checkpointVersion !== 4 || report.persistence.recoveryIntegrity !== 'ok' || report.persistence.fcstdElement !== 'PropertyVector' || report.persistence.fcstdValue !== JSON.stringify(target)) fail('OPFS/FCStd persistence evidence is incomplete')
if (!(report.resource?.byteLength > 0) || report.resource.roundTrip !== true || report.resource.released !== true || report.resource.markerRemoved !== true || report.release?.shapeCount !== 0 || report.release?.kernelReferenceCount !== 0 || report.release?.workerTerminated !== true) fail('resource release evidence is incomplete')
console.log(JSON.stringify({ status: 'chrome-property-direction-pass', ui: report.ui, persistence: report.persistence, workerRequests: report.worker.requestTypes, resource: report.resource, release: report.release }, null, 2))