Export world surface lowering coverage
This commit is contained in:
parent
2d35c23208
commit
b86a905be5
6 changed files with 189 additions and 14 deletions
|
|
@ -299,6 +299,11 @@ Recently cut:
|
|||
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.
|
||||
- The conformance export also carries `worldSurfaceLoweringCoverage[]`, a full
|
||||
provider-surface-to-target ledger that marks each advertised lowering target
|
||||
as `claimed`, `missing-claim`, or `missing-runtime`. The generic conformance
|
||||
consumer now asserts Aetheria's claimed web/UI Toolkit targets and missing
|
||||
Unity scene/TUI targets from the same typed surface.
|
||||
- The conformance export schema and consumer smoke now require minimum typed
|
||||
item shapes for plugins, providers, runtimes, and split targets. Owner repos
|
||||
can rely on exported ids, owners, statuses, split targets, manifest or
|
||||
|
|
|
|||
|
|
@ -113,6 +113,12 @@ 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 full advertised-target ledger is exported as
|
||||
`worldSurfaceLoweringCoverage[]`. Each record joins a provider-owned world
|
||||
surface to one advertised lowering target and reports whether that target is
|
||||
`claimed`, `missing-claim`, or `missing-runtime`, along with the runtime owner
|
||||
and runtime id. Consumer smokes can assert complete coverage facts with
|
||||
`--expect-world-lowering-coverage <providerId:surfaceId:targetId:status:ownerRepo:runtimeId>`.
|
||||
Provider-owned world/editor surfaces are exported as
|
||||
`interactiveWorldSurfaces[]`. These records index the provider id, owner repo,
|
||||
surface id, surface kind, projection kind, state schemas, command boundary,
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
"providers",
|
||||
"runtimes",
|
||||
"interactiveWorldSurfaces",
|
||||
"worldSurfaceLoweringCoverage",
|
||||
"splitTargetBlockers",
|
||||
"splitTargets"
|
||||
],
|
||||
|
|
@ -340,6 +341,77 @@
|
|||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"worldSurfaceLoweringCoverage": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"providerId",
|
||||
"providerOwnerRepo",
|
||||
"surfaceId",
|
||||
"surfaceKind",
|
||||
"projectionKind",
|
||||
"targetId",
|
||||
"status",
|
||||
"severity",
|
||||
"runtimeId",
|
||||
"runtimeOwnerRepo"
|
||||
],
|
||||
"properties": {
|
||||
"providerId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"providerOwnerRepo": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"surfaceId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"surfaceKind": {
|
||||
"type": "string"
|
||||
},
|
||||
"projectionKind": {
|
||||
"type": "string"
|
||||
},
|
||||
"targetId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"runtimeId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"runtimeOwnerRepo": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"splitTarget": {
|
||||
"type": "string"
|
||||
},
|
||||
"runtimeStatus": {
|
||||
"type": "string"
|
||||
},
|
||||
"supportLevel": {
|
||||
"type": "string"
|
||||
},
|
||||
"loweringOwnership": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"plugins": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
|
|||
|
|
@ -35,6 +35,10 @@ 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-coverage aetheria:aetheria.daemon.game:web-reference:claimed:Eve:web `
|
||||
--expect-world-lowering-coverage aetheria:aetheria.daemon.game:unity-uitoolkit:claimed:EveUnity:unity-uitoolkit `
|
||||
--expect-world-lowering-coverage aetheria:aetheria.daemon.game:unity-scene:missing-claim:EveUnity:unity-scene `
|
||||
--expect-world-lowering-coverage aetheria:aetheria.daemon.editor:tui:missing-claim:EveTui:tui `
|
||||
--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 `
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ if (!exportDirectory) {
|
|||
" --expect-capability-matrix",
|
||||
" --expect-capability-gap <substring>",
|
||||
" --expect-runtime-plugin-gap <runtimeId:pluginId:ownerRepo>",
|
||||
" --expect-world-lowering-coverage <providerId:surfaceId:targetId:status:ownerRepo:runtimeId>",
|
||||
" --expect-world-lowering-gap <providerId:surfaceId:targetId:ownerRepo:runtimeId>",
|
||||
" --expect-conformance-handoff",
|
||||
" --expect-plugin-operation <pluginId:operation>",
|
||||
|
|
@ -127,6 +128,7 @@ function validateIndex(index, directory, expectations, errors) {
|
|||
const capabilityGaps = Array.isArray(index.capabilityGaps) ? index.capabilityGaps : [];
|
||||
const runtimePluginProjectionGaps = Array.isArray(index.runtimePluginProjectionGaps) ? index.runtimePluginProjectionGaps : [];
|
||||
const interactiveWorldSurfaces = Array.isArray(index.interactiveWorldSurfaces) ? index.interactiveWorldSurfaces : [];
|
||||
const worldSurfaceLoweringCoverage = Array.isArray(index.worldSurfaceLoweringCoverage) ? index.worldSurfaceLoweringCoverage : [];
|
||||
const splitTargetBlockers = Array.isArray(index.splitTargetBlockers) ? index.splitTargetBlockers : [];
|
||||
const worldSurfaceLoweringGaps = Array.isArray(index.worldSurfaceLoweringGaps) ? index.worldSurfaceLoweringGaps : [];
|
||||
|
||||
|
|
@ -148,6 +150,7 @@ function validateIndex(index, directory, expectations, errors) {
|
|||
validateCapabilityGaps(index.capabilityGaps, errors);
|
||||
validateRuntimePluginProjectionGaps(index.runtimePluginProjectionGaps, errors);
|
||||
validateSplitTargetBlockers(index.splitTargetBlockers, errors);
|
||||
validateWorldSurfaceLoweringCoverage(index.worldSurfaceLoweringCoverage, errors);
|
||||
validateWorldSurfaceLoweringGaps(index.worldSurfaceLoweringGaps, errors);
|
||||
for (const expectedGap of expectations.capabilityGaps) {
|
||||
if (!capabilityGaps.some(gap => capabilityGapText(gap).includes(expectedGap))) {
|
||||
|
|
@ -169,6 +172,25 @@ function validateIndex(index, directory, expectations, errors) {
|
|||
errors.push(`runtimePluginProjectionGaps:${expectation.runtimeId}:${expectation.pluginId}:reason:missing`);
|
||||
}
|
||||
}
|
||||
for (const expectation of expectations.worldLoweringCoverage) {
|
||||
const coverage = worldSurfaceLoweringCoverage.find(candidate =>
|
||||
candidate.providerId === expectation.providerId &&
|
||||
candidate.surfaceId === expectation.surfaceId &&
|
||||
candidate.targetId === expectation.targetId);
|
||||
if (!coverage) {
|
||||
errors.push(`worldSurfaceLoweringCoverage:${expectation.providerId}:${expectation.surfaceId}:${expectation.targetId}:missing`);
|
||||
continue;
|
||||
}
|
||||
if (coverage.status !== expectation.status) {
|
||||
errors.push(`worldSurfaceLoweringCoverage:${expectation.providerId}:${expectation.surfaceId}:${expectation.targetId}:status:expected ${expectation.status} got ${coverage.status || ""}`);
|
||||
}
|
||||
if (coverage.runtimeOwnerRepo !== expectation.ownerRepo) {
|
||||
errors.push(`worldSurfaceLoweringCoverage:${expectation.providerId}:${expectation.surfaceId}:${expectation.targetId}:runtimeOwnerRepo:expected ${expectation.ownerRepo} got ${coverage.runtimeOwnerRepo || ""}`);
|
||||
}
|
||||
if (coverage.runtimeId !== expectation.runtimeId) {
|
||||
errors.push(`worldSurfaceLoweringCoverage:${expectation.providerId}:${expectation.surfaceId}:${expectation.targetId}:runtimeId:expected ${expectation.runtimeId} got ${coverage.runtimeId || ""}`);
|
||||
}
|
||||
}
|
||||
for (const expectation of expectations.worldLoweringGaps) {
|
||||
const gap = worldSurfaceLoweringGaps.find(candidate =>
|
||||
candidate.providerId === expectation.providerId &&
|
||||
|
|
@ -655,6 +677,18 @@ function validateSplitTargetBlockers(blockers, errors) {
|
|||
}
|
||||
}
|
||||
|
||||
function validateWorldSurfaceLoweringCoverage(records, errors) {
|
||||
if (!Array.isArray(records)) {
|
||||
errors.push("worldSurfaceLoweringCoverage:missing");
|
||||
return;
|
||||
}
|
||||
for (const [index, record] of records.entries()) {
|
||||
for (const field of ["providerId", "providerOwnerRepo", "surfaceId", "targetId", "status", "severity", "runtimeId", "runtimeOwnerRepo"]) {
|
||||
if (!record?.[field]) errors.push(`worldSurfaceLoweringCoverage:${index}:${field}:missing`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function validateWorldSurfaceLoweringGaps(gaps, errors) {
|
||||
if (!Array.isArray(gaps)) {
|
||||
errors.push("worldSurfaceLoweringGaps:missing");
|
||||
|
|
@ -795,6 +829,7 @@ function parseArguments(args) {
|
|||
capabilityMatrix: false,
|
||||
capabilityGaps: [],
|
||||
runtimePluginGaps: [],
|
||||
worldLoweringCoverage: [],
|
||||
worldLoweringGaps: [],
|
||||
conformanceHandoff: false,
|
||||
};
|
||||
|
|
@ -837,6 +872,7 @@ function parseArguments(args) {
|
|||
["--expect-split-target-proof", expectations.splitTargetProofs],
|
||||
["--expect-capability-gap", expectations.capabilityGaps],
|
||||
["--expect-runtime-plugin-gap", expectations.runtimePluginGaps],
|
||||
["--expect-world-lowering-coverage", expectations.worldLoweringCoverage],
|
||||
["--expect-world-lowering-gap", expectations.worldLoweringGaps],
|
||||
]);
|
||||
|
||||
|
|
@ -920,6 +956,8 @@ function parseArguments(args) {
|
|||
target.push(parseSplitTargetExpectation(value, "proof"));
|
||||
} else if (option === "--expect-world-lowering-gap") {
|
||||
target.push(parseWorldLoweringGapExpectation(value));
|
||||
} else if (option === "--expect-world-lowering-coverage") {
|
||||
target.push(parseWorldLoweringCoverageExpectation(value));
|
||||
} else if (option === "--expect-runtime-plugin-gap") {
|
||||
target.push(parseRuntimePluginGapExpectation(value));
|
||||
} else {
|
||||
|
|
@ -946,6 +984,22 @@ function parseWorldLoweringGapExpectation(value) {
|
|||
};
|
||||
}
|
||||
|
||||
function parseWorldLoweringCoverageExpectation(value) {
|
||||
const parts = value.split(":");
|
||||
if (parts.length !== 6 || parts.some(part => !part)) {
|
||||
console.error(`Expected world lowering coverage in <providerId:surfaceId:targetId:status:ownerRepo:runtimeId> form, got: ${value}`);
|
||||
process.exit(2);
|
||||
}
|
||||
return {
|
||||
providerId: parts[0],
|
||||
surfaceId: parts[1],
|
||||
targetId: parts[2],
|
||||
status: parts[3],
|
||||
ownerRepo: parts[4],
|
||||
runtimeId: parts[5],
|
||||
};
|
||||
}
|
||||
|
||||
function parseRuntimePluginGapExpectation(value) {
|
||||
const parts = value.split(":");
|
||||
if (parts.length !== 3 || parts.some(part => !part)) {
|
||||
|
|
|
|||
|
|
@ -1671,6 +1671,7 @@ function buildConformanceExport(report) {
|
|||
capabilityMatrix: buildCapabilityMatrix(report),
|
||||
runtimePluginProjectionGaps: collectRuntimePluginProjectionGaps(report),
|
||||
interactiveWorldSurfaces: collectInteractiveWorldSurfaces(report),
|
||||
worldSurfaceLoweringCoverage: collectWorldSurfaceLoweringCoverage(report),
|
||||
worldSurfaceLoweringGaps: collectWorldSurfaceLoweringGaps(report),
|
||||
splitTargetBlockers: collectSplitTargetBlockers(report),
|
||||
capabilityGaps: collectCapabilityGaps(report),
|
||||
|
|
@ -1976,6 +1977,35 @@ function collectInteractiveWorldSurfaces(report) {
|
|||
`${left.providerId}:${left.surfaceId}`.localeCompare(`${right.providerId}:${right.surfaceId}`));
|
||||
}
|
||||
|
||||
function collectWorldSurfaceLoweringCoverage(report) {
|
||||
const { claimByTarget, runtimeByTarget } = buildWorldSurfaceLoweringTargetIndex(report);
|
||||
const coverage = [];
|
||||
for (const surface of collectInteractiveWorldSurfaces(report)) {
|
||||
for (const targetId of surface.loweringTargets || []) {
|
||||
const claim = claimByTarget.get(targetId);
|
||||
const runtime = runtimeByTarget.get(targetId);
|
||||
const status = claim ? "claimed" : runtime ? "missing-claim" : "missing-runtime";
|
||||
coverage.push({
|
||||
providerId: surface.providerId,
|
||||
providerOwnerRepo: surface.ownerRepo || "",
|
||||
surfaceId: surface.surfaceId,
|
||||
surfaceKind: surface.surfaceKind || "",
|
||||
projectionKind: surface.projectionKind || "",
|
||||
targetId,
|
||||
status,
|
||||
severity: status === "claimed" ? "ok" : "blocker",
|
||||
runtimeId: runtime?.id || "world-surface-lowering",
|
||||
runtimeOwnerRepo: runtime ? resolveRuntimeProjectionOwnerRepo(runtime) : "Eve",
|
||||
splitTarget: runtime?.splitTarget || "",
|
||||
runtimeStatus: runtime?.status || "",
|
||||
supportLevel: claim?.supportLevel || "",
|
||||
loweringOwnership: claim?.ownership || "",
|
||||
});
|
||||
}
|
||||
}
|
||||
return coverage;
|
||||
}
|
||||
|
||||
function resolveRuntimeProjectionOwnerRepo(runtime) {
|
||||
return runtime.lifecycle?.release?.ownerRepo
|
||||
|| runtime.lifecycle?.test?.ownerRepo
|
||||
|
|
@ -1986,23 +2016,13 @@ function resolveRuntimeProjectionOwnerRepo(runtime) {
|
|||
}
|
||||
|
||||
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 { claimByTarget, runtimeByTarget } = buildWorldSurfaceLoweringTargetIndex(report);
|
||||
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);
|
||||
if (claimByTarget.has(targetId)) continue;
|
||||
const targetRuntime = runtimeByTarget.get(targetId);
|
||||
gaps.push({
|
||||
providerId: provider.providerId,
|
||||
providerOwnerRepo: provider.ownerRepo || "",
|
||||
|
|
@ -2010,7 +2030,7 @@ function collectWorldSurfaceLoweringGaps(report) {
|
|||
surfaceKind: surface.surfaceKind || "",
|
||||
projectionKind: surface.worldInteraction?.projectionKind || "",
|
||||
targetId,
|
||||
ownerRepo: targetRuntime?.ownerRepo || "Eve",
|
||||
ownerRepo: targetRuntime ? resolveRuntimeProjectionOwnerRepo(targetRuntime) : "Eve",
|
||||
runtimeId: targetRuntime?.id || "world-surface-lowering",
|
||||
splitTarget: targetRuntime?.splitTarget || "",
|
||||
runtimeStatus: targetRuntime?.status || "",
|
||||
|
|
@ -2025,6 +2045,20 @@ function collectWorldSurfaceLoweringGaps(report) {
|
|||
return gaps;
|
||||
}
|
||||
|
||||
function buildWorldSurfaceLoweringTargetIndex(report) {
|
||||
const claimByTarget = new Map();
|
||||
const runtimeByTarget = new Map();
|
||||
for (const runtime of report.runtimes || []) {
|
||||
if (runtime.id) runtimeByTarget.set(runtime.id, runtime);
|
||||
for (const claim of runtime.worldSurfaceLowering || []) {
|
||||
if (!claim.targetId) continue;
|
||||
claimByTarget.set(claim.targetId, claim);
|
||||
runtimeByTarget.set(claim.targetId, runtime);
|
||||
}
|
||||
}
|
||||
return { claimByTarget, runtimeByTarget };
|
||||
}
|
||||
|
||||
async function writeConformanceExport(conformanceExport, directory) {
|
||||
await mkdir(path.join(directory, "packs"), { recursive: true });
|
||||
await mkdir(path.join(directory, "handoffs"), { recursive: true });
|
||||
|
|
|
|||
Loading…
Reference in a new issue