feat: expand oracle and topology evidence gates
This commit is contained in:
@@ -74,6 +74,22 @@ const propertyFlags = report.objects.flatMap((object) => object.properties || []
|
||||
if (!propertyFlags.some((status) => status.includes('Hidden')) || !propertyFlags.some((status) => status.includes('Output'))) {
|
||||
fail('runtime property fixtures must include Hidden and Output status flags.')
|
||||
}
|
||||
const runtimeObjects = report.runtimeObjects
|
||||
if (!runtimeObjects?.available || runtimeObjects.candidateSource !== 'Document.supportedTypes' || !Array.isArray(runtimeObjects.types) || runtimeObjects.candidateCount !== runtimeObjects.types.length) {
|
||||
fail('complete Document.supportedTypes runtime object evidence is missing.')
|
||||
}
|
||||
if (runtimeObjects.availableCount + runtimeObjects.unavailableCount !== runtimeObjects.candidateCount) fail('runtime object summary counts are inconsistent.')
|
||||
const runtimeTypeIds = new Set()
|
||||
for (const candidate of runtimeObjects.types) {
|
||||
if (!candidate.typeId || runtimeTypeIds.has(candidate.typeId)) fail(`runtime object TypeId '${candidate.typeId || '<missing>'}' is invalid or duplicated.`)
|
||||
runtimeTypeIds.add(candidate.typeId)
|
||||
if (candidate.available) {
|
||||
if (candidate.probeStatus !== 'available' || typeof candidate.runtimeTypeId !== 'string' || !candidate.runtimeTypeId || !Array.isArray(candidate.properties)) fail(`${candidate.typeId} lacks runtime property metadata.`)
|
||||
if (candidate.properties.some((property) => !property.name || !property.typeId || !Array.isArray(property.status) || !Object.hasOwn(property, 'default'))) fail(`${candidate.typeId} has an incomplete property record.`)
|
||||
} else if (candidate.probeStatus !== 'unavailable' || !candidate.error) fail(`${candidate.typeId} lacks an explicit instantiation failure.`)
|
||||
}
|
||||
for (const typeId of expectedObjects) if (!runtimeTypeIds.has(typeId)) fail(`core TypeId ${typeId} is absent from Document.supportedTypes.`)
|
||||
const runtimePropertyCount = runtimeObjects.types.reduce((total, candidate) => total + (candidate.properties?.length ?? 0), 0)
|
||||
|
||||
console.log(JSON.stringify({
|
||||
status: 'freecad-desktop-oracle-pass',
|
||||
@@ -88,5 +104,9 @@ console.log(JSON.stringify({
|
||||
guiUp: report.guiUp,
|
||||
moduleStatusSummary: report.moduleStatusSummary,
|
||||
objectFixtureCount: report.objects.length,
|
||||
registeredObjectTypeCount: runtimeObjects.candidateCount,
|
||||
runtimeObjectCount: runtimeObjects.availableCount,
|
||||
unavailableObjectCount: runtimeObjects.unavailableCount,
|
||||
runtimePropertyCount,
|
||||
},
|
||||
}, null, 2))
|
||||
|
||||
Reference in New Issue
Block a user