Export typed world lowering gaps

This commit is contained in:
Meta Vens 2026-07-09 02:44:11 +01:00
commit c2dd0044b0
6 changed files with 170 additions and 27 deletions

View file

@ -295,6 +295,10 @@ Recently cut:
EveUnity's pending `unity-scene` runtime, and `tui` gaps point at EveTui's
pending `tui` runtime. Eve only owns a world-lowering gap when no runtime
target has been declared.
- The conformance export now carries `worldSurfaceLoweringGaps[]` as typed
data in addition to the generic `capabilityGaps[]` ledger. Runtime owners can
consume provider id, surface id, target id, owner repo, runtime id, split
target, and runtime status without scraping prose or gap strings.
- EveUnity now has a pending Unity scene handoff at
`runtimes/incubating/eve-unity-scene/eveunity-scene-split-handoff.json`.
The active `unity-uitoolkit` runtime remains a semantic UI surface lowerer;

View file

@ -104,6 +104,10 @@ When a provider advertises a world-surface lowering target that no runtime
claims, the gap is assigned to the matching pending runtime owner when one
exists, such as `unity-scene` -> EveUnity or `tui` -> EveTui. Eve only owns the
gap when no runtime target has been declared at all.
The same facts are also exported as `worldSurfaceLoweringGaps[]` so runtime
owners can consume provider id, surface id, target id, owner repo, runtime id,
split target, and runtime status as typed fields instead of parsing the generic
gap text.
The conformance export includes runtime `capabilityManifestPath` and
`capabilityManifestErrors` fields so external consumers can distinguish a

View file

@ -95,6 +95,65 @@
"additionalProperties": true
}
},
"worldSurfaceLoweringGaps": {
"type": "array",
"items": {
"type": "object",
"required": [
"providerId",
"surfaceId",
"targetId",
"ownerRepo",
"runtimeId",
"severity"
],
"properties": {
"providerId": {
"type": "string",
"minLength": 1
},
"providerOwnerRepo": {
"type": "string"
},
"surfaceId": {
"type": "string",
"minLength": 1
},
"surfaceKind": {
"type": "string"
},
"projectionKind": {
"type": "string"
},
"targetId": {
"type": "string",
"minLength": 1
},
"ownerRepo": {
"type": "string",
"minLength": 1
},
"runtimeId": {
"type": "string",
"minLength": 1
},
"splitTarget": {
"type": "string"
},
"runtimeStatus": {
"type": "string"
},
"severity": {
"type": "string",
"minLength": 1
},
"detail": {
"type": "string"
}
},
"additionalProperties": true
}
},
"plugins": {
"type": "array"
},

View file

@ -35,6 +35,9 @@ try {
--expect-capability-gap runtime:Fensalir:direct2d:capture:missing `
--expect-capability-gap "runtime:EveUnity:unity-scene:provider:aetheria:surface:aetheria.daemon.game:world-lowering-target:unity-scene:missing-runtime" `
--expect-capability-gap "runtime:EveTui:tui:provider:aetheria:surface:aetheria.daemon.game:world-lowering-target:tui:missing-runtime" `
--expect-world-lowering-gap aetheria:aetheria.daemon.game:unity-scene:EveUnity:unity-scene `
--expect-world-lowering-gap aetheria:aetheria.daemon.game:tui:EveTui:tui `
--expect-world-lowering-gap aetheria:aetheria.daemon.editor:tui:EveTui:tui `
--expect-capability-gap "split-target:EveUnity:EveUnity:proof:Tagged UPM release" `
--expect-conformance-handoff
if ($LASTEXITCODE -ne 0) {

View file

@ -18,6 +18,7 @@ if (!exportDirectory) {
" --expect-split-target <id>",
" --expect-capability-matrix",
" --expect-capability-gap <substring>",
" --expect-world-lowering-gap <providerId:surfaceId:targetId:ownerRepo:runtimeId>",
" --expect-conformance-handoff",
" --expect-plugin-operation <pluginId:operation>",
" --expect-plugin-capability <pluginId:capability>",
@ -120,6 +121,7 @@ function validateIndex(index, directory, expectations, errors) {
const runtimes = mergeRuntimeRecords(Array.isArray(index.runtimes) ? index.runtimes : [], exportedRuntimeTargets);
const splitTargets = Array.isArray(index.splitTargets) ? index.splitTargets : [];
const capabilityGaps = Array.isArray(index.capabilityGaps) ? index.capabilityGaps : [];
const worldSurfaceLoweringGaps = Array.isArray(index.worldSurfaceLoweringGaps) ? index.worldSurfaceLoweringGaps : [];
if (expectations.conformanceHandoff && !index.conformanceHandoffPath) {
errors.push("conformanceHandoffPath:missing");
@ -131,11 +133,28 @@ function validateIndex(index, directory, expectations, errors) {
validateCapabilityMatrix(index.capabilityMatrix, packs, plugins, providers, runtimes, splitTargets, errors);
}
validateCapabilityGaps(index.capabilityGaps, errors);
validateWorldSurfaceLoweringGaps(index.worldSurfaceLoweringGaps, errors);
for (const expectedGap of expectations.capabilityGaps) {
if (!capabilityGaps.some(gap => capabilityGapText(gap).includes(expectedGap))) {
errors.push(`capabilityGaps:${expectedGap}:missing`);
}
}
for (const expectation of expectations.worldLoweringGaps) {
const gap = worldSurfaceLoweringGaps.find(candidate =>
candidate.providerId === expectation.providerId &&
candidate.surfaceId === expectation.surfaceId &&
candidate.targetId === expectation.targetId);
if (!gap) {
errors.push(`worldSurfaceLoweringGaps:${expectation.providerId}:${expectation.surfaceId}:${expectation.targetId}:missing`);
continue;
}
if (gap.ownerRepo !== expectation.ownerRepo) {
errors.push(`worldSurfaceLoweringGaps:${expectation.providerId}:${expectation.surfaceId}:${expectation.targetId}:ownerRepo:expected ${expectation.ownerRepo} got ${gap.ownerRepo || ""}`);
}
if (gap.runtimeId !== expectation.runtimeId) {
errors.push(`worldSurfaceLoweringGaps:${expectation.providerId}:${expectation.surfaceId}:${expectation.targetId}:runtimeId:expected ${expectation.runtimeId} got ${gap.runtimeId || ""}`);
}
}
for (const expectedFixture of expectations.fixtures) {
if (!fixtureIds.has(expectedFixture)) errors.push(`fixture:${expectedFixture}:missing`);
@ -535,6 +554,18 @@ function validateCapabilityGaps(gaps, errors) {
}
}
function validateWorldSurfaceLoweringGaps(gaps, errors) {
if (!Array.isArray(gaps)) {
errors.push("worldSurfaceLoweringGaps:missing");
return;
}
for (const [index, gap] of gaps.entries()) {
for (const field of ["providerId", "surfaceId", "targetId", "ownerRepo", "runtimeId", "severity"]) {
if (!gap?.[field]) errors.push(`worldSurfaceLoweringGaps:${index}:${field}:missing`);
}
}
}
function capabilityGapText(gap) {
return [
gap.kind,
@ -584,6 +615,7 @@ function parseArguments(args) {
splitTargetProofs: [],
capabilityMatrix: false,
capabilityGaps: [],
worldLoweringGaps: [],
conformanceHandoff: false,
};
const optionTargets = new Map([
@ -621,6 +653,7 @@ function parseArguments(args) {
["--expect-split-target-blocker", expectations.splitTargetBlockers],
["--expect-split-target-proof", expectations.splitTargetProofs],
["--expect-capability-gap", expectations.capabilityGaps],
["--expect-world-lowering-gap", expectations.worldLoweringGaps],
]);
for (let index = 1; index < args.length; index += 1) {
@ -695,6 +728,8 @@ function parseArguments(args) {
target.push(parseSplitTargetExpectation(value, "blocker"));
} else if (option === "--expect-split-target-proof") {
target.push(parseSplitTargetExpectation(value, "proof"));
} else if (option === "--expect-world-lowering-gap") {
target.push(parseWorldLoweringGapExpectation(value));
} else {
target.push(value);
}
@ -704,6 +739,21 @@ function parseArguments(args) {
return { exportDirectory: exportPath, expectations };
}
function parseWorldLoweringGapExpectation(value) {
const parts = value.split(":");
if (parts.length !== 5 || parts.some(part => !part)) {
console.error(`Expected world lowering gap in <providerId:surfaceId:targetId:ownerRepo:runtimeId> form, got: ${value}`);
process.exit(2);
}
return {
providerId: parts[0],
surfaceId: parts[1],
targetId: parts[2],
ownerRepo: parts[3],
runtimeId: parts[4],
};
}
function parsePluginExpectation(value, field) {
const separator = value.indexOf(":");
if (separator <= 0 || separator === value.length - 1) {

View file

@ -1588,6 +1588,7 @@ function buildConformanceExport(report) {
conformanceHandoffExportPath: makeHandoffExportPath("conformance", "EveConformance", report.repoStrategy.conformanceHandoffPath || ""),
packs,
capabilityMatrix: buildCapabilityMatrix(report),
worldSurfaceLoweringGaps: collectWorldSurfaceLoweringGaps(report),
capabilityGaps: collectCapabilityGaps(report),
plugins: (report.plugins || []).map(plugin => ({
pluginId: plugin.pluginId,
@ -1815,33 +1816,15 @@ function collectCapabilityGaps(report) {
}
}
const worldLoweringTargets = new Set();
const runtimeByWorldTarget = new Map();
for (const runtime of report.runtimes || []) {
if (runtime.id) runtimeByWorldTarget.set(runtime.id, runtime);
for (const claim of runtime.worldSurfaceLowering || []) {
if (claim.targetId) worldLoweringTargets.add(claim.targetId);
if (claim.targetId) runtimeByWorldTarget.set(claim.targetId, runtime);
}
}
for (const provider of report.providers || []) {
for (const surface of provider.surfaceContracts || []) {
for (const targetId of surface.worldInteraction?.loweringTargets || []) {
if (!worldLoweringTargets.has(targetId)) {
const targetRuntime = runtimeByWorldTarget.get(targetId);
addGap({
kind: "runtime",
ownerRepo: targetRuntime?.ownerRepo || "Eve",
subjectId: targetRuntime?.id || "world-surface-lowering",
gap: `provider:${provider.providerId}:surface:${surface.surfaceId}:world-lowering-target:${targetId}:missing-runtime`,
severity: "blocker",
detail: targetRuntime
? `splitTarget:${targetRuntime.splitTarget || ""}:status:${targetRuntime.status || ""}`
: "no-runtime-target-declared",
});
}
}
}
for (const gap of collectWorldSurfaceLoweringGaps(report)) {
addGap({
kind: "runtime",
ownerRepo: gap.ownerRepo,
subjectId: gap.runtimeId,
gap: `provider:${gap.providerId}:surface:${gap.surfaceId}:world-lowering-target:${gap.targetId}:missing-runtime`,
severity: gap.severity,
detail: gap.detail,
});
}
for (const target of report.splitTargets || []) {
@ -1859,6 +1842,46 @@ function collectCapabilityGaps(report) {
return gaps;
}
function collectWorldSurfaceLoweringGaps(report) {
const claimedTargets = new Set();
const runtimeByWorldTarget = new Map();
for (const runtime of report.runtimes || []) {
if (runtime.id) runtimeByWorldTarget.set(runtime.id, runtime);
for (const claim of runtime.worldSurfaceLowering || []) {
if (!claim.targetId) continue;
claimedTargets.add(claim.targetId);
runtimeByWorldTarget.set(claim.targetId, runtime);
}
}
const gaps = [];
for (const provider of report.providers || []) {
for (const surface of provider.surfaceContracts || []) {
for (const targetId of surface.worldInteraction?.loweringTargets || []) {
if (claimedTargets.has(targetId)) continue;
const targetRuntime = runtimeByWorldTarget.get(targetId);
gaps.push({
providerId: provider.providerId,
providerOwnerRepo: provider.ownerRepo || "",
surfaceId: surface.surfaceId,
surfaceKind: surface.surfaceKind || "",
projectionKind: surface.worldInteraction?.projectionKind || "",
targetId,
ownerRepo: targetRuntime?.ownerRepo || "Eve",
runtimeId: targetRuntime?.id || "world-surface-lowering",
splitTarget: targetRuntime?.splitTarget || "",
runtimeStatus: targetRuntime?.status || "",
severity: "blocker",
detail: targetRuntime
? `splitTarget:${targetRuntime.splitTarget || ""}:status:${targetRuntime.status || ""}`
: "no-runtime-target-declared",
});
}
}
}
return gaps;
}
async function writeConformanceExport(conformanceExport, directory) {
await mkdir(path.join(directory, "packs"), { recursive: true });
await mkdir(path.join(directory, "handoffs"), { recursive: true });