Export provider runtime plugin coverage
This commit is contained in:
parent
ca01596b35
commit
44db1a2190
6 changed files with 250 additions and 0 deletions
|
|
@ -341,6 +341,12 @@ Recently cut:
|
|||
Unity UI Toolkit support for `sai.vn` and `norn.graph`, its declared TeX gap,
|
||||
and the pending Unity scene/Electron unsupported Sai projection until their
|
||||
generic lowerers exist.
|
||||
- Provider/runtime/plugin projection coverage is now exported as
|
||||
`providerRuntimePluginProjectionCoverage[]`. The runtime-owner smoke proves
|
||||
the Sai VN provider surface lowers fully in web, lowers in Unity UI Toolkit
|
||||
with Norn support and TeX as a degraded optional nested plugin, and does not
|
||||
let UIKit's generic embedded-document path impersonate full Sai/Norn
|
||||
projection.
|
||||
- Runtime/plugin projection gaps are now exported as
|
||||
`runtimePluginProjectionGaps[]`. The runtime-owner smoke asserts Unity and
|
||||
Electron plugin gaps as typed records, so missing Sai, Norn, or TeX projection
|
||||
|
|
|
|||
|
|
@ -148,6 +148,13 @@ Sai/Norn projection" and "Unity scene/Electron do not have generic plugin
|
|||
projection yet" instead of walking nested runtime records. Consumer smokes can
|
||||
assert entries with
|
||||
`--expect-runtime-plugin-projection <runtimeId:pluginId:status:ownerRepo>`.
|
||||
Provider surface plugin requirements are also joined with runtime projection
|
||||
support as `providerRuntimePluginProjectionCoverage[]`. These records answer
|
||||
the real lowering question: whether a provider surface's required or
|
||||
optional-nested plugin can be projected by a concrete runtime. Required plugin
|
||||
failures are blockers; optional nested failures are degraded lowerings. Consumer
|
||||
smokes can assert them with
|
||||
`--expect-provider-runtime-plugin-projection <providerId:surfaceId:runtimeId:pluginId:status:runtimeOwnerRepo>`.
|
||||
|
||||
The conformance export includes runtime `capabilityManifestPath` and
|
||||
`capabilityManifestErrors` fields so external consumers can distinguish a
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
"pluginAbiOperationCoverage",
|
||||
"providerPluginRequirementCoverage",
|
||||
"runtimePluginProjectionCoverage",
|
||||
"providerRuntimePluginProjectionCoverage",
|
||||
"interactiveWorldSurfaces",
|
||||
"worldSurfaceLoweringCoverage",
|
||||
"commandBoundaryCoverage",
|
||||
|
|
@ -222,6 +223,105 @@
|
|||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"providerRuntimePluginProjectionCoverage": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"providerId",
|
||||
"providerOwnerRepo",
|
||||
"surfaceId",
|
||||
"fixtureId",
|
||||
"runtimeId",
|
||||
"runtimeStatus",
|
||||
"runtimeOwnerRepo",
|
||||
"pluginId",
|
||||
"pluginOwnerRepo",
|
||||
"availability",
|
||||
"status",
|
||||
"severity",
|
||||
"requiredCapabilities",
|
||||
"optionalCapabilities",
|
||||
"runtimeCapabilities",
|
||||
"missingRuntimeRequiredCapabilities",
|
||||
"missingRuntimeOptionalCapabilities"
|
||||
],
|
||||
"properties": {
|
||||
"providerId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"providerOwnerRepo": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"surfaceId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"surfaceKey": {
|
||||
"type": "string"
|
||||
},
|
||||
"fixtureId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"runtimeId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"runtimeStatus": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"runtimeOwnerRepo": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"splitTarget": {
|
||||
"type": "string"
|
||||
},
|
||||
"pluginId": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"pluginOwnerRepo": {
|
||||
"type": "string"
|
||||
},
|
||||
"availability": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"status": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"severity": {
|
||||
"type": "string",
|
||||
"minLength": 1
|
||||
},
|
||||
"requiredCapabilities": {
|
||||
"type": "array"
|
||||
},
|
||||
"optionalCapabilities": {
|
||||
"type": "array"
|
||||
},
|
||||
"runtimeCapabilities": {
|
||||
"type": "array"
|
||||
},
|
||||
"missingRuntimeRequiredCapabilities": {
|
||||
"type": "array"
|
||||
},
|
||||
"missingRuntimeOptionalCapabilities": {
|
||||
"type": "array"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"additionalProperties": true
|
||||
}
|
||||
},
|
||||
"splitTargetBlockers": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,13 @@ node $consumerScript $consumerExport `
|
|||
--expect-runtime-plugin-projection unity-uitoolkit:tex.math:unsupported:EveUnity `
|
||||
--expect-runtime-plugin-projection unity-scene:sai.vn:unsupported:EveUnity `
|
||||
--expect-runtime-plugin-projection electron-shell:sai.vn:unsupported:EveElectron `
|
||||
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:web:sai.vn:supported:Eve `
|
||||
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:web:tex.math:optional-supported:Eve `
|
||||
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:unity-uitoolkit:sai.vn:supported:EveUnity `
|
||||
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:unity-uitoolkit:norn.graph:optional-supported:EveUnity `
|
||||
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:unity-uitoolkit:tex.math:optional-unsupported-runtime-projection:EveUnity `
|
||||
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:ios-uikit:sai.vn:unsupported-runtime-projection:EveIOS `
|
||||
--expect-provider-runtime-plugin-projection gamecult.home.vn:sai.visual_novel.surface:ios-uikit:norn.graph:optional-unsupported-runtime-projection:EveIOS `
|
||||
--expect-runtime-plugin-gap unity-uitoolkit:tex.math:EveUnity `
|
||||
--expect-runtime-plugin-gap unity-scene:sai.vn:EveUnity `
|
||||
--expect-runtime-plugin-gap unity-scene:norn.graph:EveUnity `
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ if (!exportDirectory) {
|
|||
" --expect-capability-matrix",
|
||||
" --expect-capability-gap <substring>",
|
||||
" --expect-runtime-plugin-projection <runtimeId:pluginId:status:ownerRepo>",
|
||||
" --expect-provider-runtime-plugin-projection <providerId:surfaceId:runtimeId:pluginId:status:runtimeOwnerRepo>",
|
||||
" --expect-runtime-plugin-gap <runtimeId:pluginId:ownerRepo>",
|
||||
" --expect-world-lowering-coverage <providerId:surfaceId:targetId:status:ownerRepo:runtimeId>",
|
||||
" --expect-command-boundary-coverage <providerId:surfaceId:targetId:status:ownerRepo:runtimeId>",
|
||||
|
|
@ -134,6 +135,7 @@ function validateIndex(index, directory, expectations, errors) {
|
|||
const providerPluginRequirementCoverage = Array.isArray(index.providerPluginRequirementCoverage) ? index.providerPluginRequirementCoverage : [];
|
||||
const capabilityGaps = Array.isArray(index.capabilityGaps) ? index.capabilityGaps : [];
|
||||
const runtimePluginProjectionCoverage = Array.isArray(index.runtimePluginProjectionCoverage) ? index.runtimePluginProjectionCoverage : [];
|
||||
const providerRuntimePluginProjectionCoverage = Array.isArray(index.providerRuntimePluginProjectionCoverage) ? index.providerRuntimePluginProjectionCoverage : [];
|
||||
const runtimePluginProjectionGaps = Array.isArray(index.runtimePluginProjectionGaps) ? index.runtimePluginProjectionGaps : [];
|
||||
const interactiveWorldSurfaces = Array.isArray(index.interactiveWorldSurfaces) ? index.interactiveWorldSurfaces : [];
|
||||
const worldSurfaceLoweringCoverage = Array.isArray(index.worldSurfaceLoweringCoverage) ? index.worldSurfaceLoweringCoverage : [];
|
||||
|
|
@ -161,6 +163,7 @@ function validateIndex(index, directory, expectations, errors) {
|
|||
}
|
||||
validateCapabilityGaps(index.capabilityGaps, errors);
|
||||
validateRuntimePluginProjectionCoverage(index.runtimePluginProjectionCoverage, errors);
|
||||
validateProviderRuntimePluginProjectionCoverage(index.providerRuntimePluginProjectionCoverage, errors);
|
||||
validateRuntimePluginProjectionGaps(index.runtimePluginProjectionGaps, errors);
|
||||
validateSplitTargetBlockers(index.splitTargetBlockers, errors);
|
||||
validateSplitHandoffMoveCoverage(index.splitHandoffMoveCoverage, errors);
|
||||
|
|
@ -187,6 +190,23 @@ function validateIndex(index, directory, expectations, errors) {
|
|||
errors.push(`runtimePluginProjectionCoverage:${expectation.runtimeId}:${expectation.pluginId}:runtimeOwnerRepo:expected ${expectation.ownerRepo} got ${record.runtimeOwnerRepo || ""}`);
|
||||
}
|
||||
}
|
||||
for (const expectation of expectations.providerRuntimePluginProjectionCoverage) {
|
||||
const record = providerRuntimePluginProjectionCoverage.find(candidate =>
|
||||
candidate.providerId === expectation.providerId &&
|
||||
candidate.surfaceId === expectation.surfaceId &&
|
||||
candidate.runtimeId === expectation.runtimeId &&
|
||||
candidate.pluginId === expectation.pluginId);
|
||||
if (!record) {
|
||||
errors.push(`providerRuntimePluginProjectionCoverage:${expectation.providerId}:${expectation.surfaceId}:${expectation.runtimeId}:${expectation.pluginId}:missing`);
|
||||
continue;
|
||||
}
|
||||
if (record.status !== expectation.status) {
|
||||
errors.push(`providerRuntimePluginProjectionCoverage:${expectation.providerId}:${expectation.surfaceId}:${expectation.runtimeId}:${expectation.pluginId}:status:expected ${expectation.status} got ${record.status || ""}`);
|
||||
}
|
||||
if (record.runtimeOwnerRepo !== expectation.runtimeOwnerRepo) {
|
||||
errors.push(`providerRuntimePluginProjectionCoverage:${expectation.providerId}:${expectation.surfaceId}:${expectation.runtimeId}:${expectation.pluginId}:runtimeOwnerRepo:expected ${expectation.runtimeOwnerRepo} got ${record.runtimeOwnerRepo || ""}`);
|
||||
}
|
||||
}
|
||||
for (const expectation of expectations.runtimePluginGaps) {
|
||||
const gap = runtimePluginProjectionGaps.find(candidate =>
|
||||
candidate.runtimeId === expectation.runtimeId &&
|
||||
|
|
@ -763,6 +783,24 @@ function validateRuntimePluginProjectionCoverage(records, errors) {
|
|||
}
|
||||
}
|
||||
|
||||
function validateProviderRuntimePluginProjectionCoverage(records, errors) {
|
||||
if (!Array.isArray(records)) {
|
||||
errors.push("providerRuntimePluginProjectionCoverage:missing");
|
||||
return;
|
||||
}
|
||||
for (const [index, record] of records.entries()) {
|
||||
for (const field of ["providerId", "providerOwnerRepo", "surfaceId", "fixtureId", "runtimeId", "runtimeStatus", "runtimeOwnerRepo", "pluginId", "availability", "status", "severity"]) {
|
||||
if (!record?.[field]) errors.push(`providerRuntimePluginProjectionCoverage:${index}:${field}:missing`);
|
||||
}
|
||||
for (const field of ["requiredCapabilities", "optionalCapabilities", "runtimeCapabilities", "missingRuntimeRequiredCapabilities", "missingRuntimeOptionalCapabilities"]) {
|
||||
if (!Array.isArray(record?.[field])) errors.push(`providerRuntimePluginProjectionCoverage:${index}:${field}:expected array`);
|
||||
}
|
||||
if (record?.severity === "blocker" && record.availability !== "required") {
|
||||
errors.push(`providerRuntimePluginProjectionCoverage:${index}:severity:optional entries cannot be blocker`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function validateRuntimePluginProjectionGaps(gaps, errors) {
|
||||
if (!Array.isArray(gaps)) {
|
||||
errors.push("runtimePluginProjectionGaps:missing");
|
||||
|
|
@ -1005,6 +1043,7 @@ function parseArguments(args) {
|
|||
capabilityMatrix: false,
|
||||
capabilityGaps: [],
|
||||
runtimePluginProjectionCoverage: [],
|
||||
providerRuntimePluginProjectionCoverage: [],
|
||||
runtimePluginGaps: [],
|
||||
worldLoweringCoverage: [],
|
||||
commandBoundaryCoverage: [],
|
||||
|
|
@ -1053,6 +1092,7 @@ function parseArguments(args) {
|
|||
["--expect-split-target-proof", expectations.splitTargetProofs],
|
||||
["--expect-capability-gap", expectations.capabilityGaps],
|
||||
["--expect-runtime-plugin-projection", expectations.runtimePluginProjectionCoverage],
|
||||
["--expect-provider-runtime-plugin-projection", expectations.providerRuntimePluginProjectionCoverage],
|
||||
["--expect-runtime-plugin-gap", expectations.runtimePluginGaps],
|
||||
["--expect-world-lowering-coverage", expectations.worldLoweringCoverage],
|
||||
["--expect-command-boundary-coverage", expectations.commandBoundaryCoverage],
|
||||
|
|
@ -1153,6 +1193,8 @@ function parseArguments(args) {
|
|||
target.push(parseRuntimePluginGapExpectation(value));
|
||||
} else if (option === "--expect-runtime-plugin-projection") {
|
||||
target.push(parseRuntimePluginProjectionCoverageExpectation(value));
|
||||
} else if (option === "--expect-provider-runtime-plugin-projection") {
|
||||
target.push(parseProviderRuntimePluginProjectionCoverageExpectation(value));
|
||||
} else {
|
||||
target.push(value);
|
||||
}
|
||||
|
|
@ -1236,6 +1278,22 @@ function parseRuntimePluginProjectionCoverageExpectation(value) {
|
|||
};
|
||||
}
|
||||
|
||||
function parseProviderRuntimePluginProjectionCoverageExpectation(value) {
|
||||
const parts = value.split(":");
|
||||
if (parts.length !== 6 || parts.some(part => !part)) {
|
||||
console.error(`Expected provider runtime plugin projection coverage in <providerId:surfaceId:runtimeId:pluginId:status:runtimeOwnerRepo> form, got: ${value}`);
|
||||
process.exit(2);
|
||||
}
|
||||
return {
|
||||
providerId: parts[0],
|
||||
surfaceId: parts[1],
|
||||
runtimeId: parts[2],
|
||||
pluginId: parts[3],
|
||||
status: parts[4],
|
||||
runtimeOwnerRepo: parts[5],
|
||||
};
|
||||
}
|
||||
|
||||
function parseSplitTargetBlockerRecordExpectation(value) {
|
||||
const parts = value.split(":");
|
||||
if (parts.length < 3 || !parts[0] || !parts[1] || !parts.slice(2).join(":")) {
|
||||
|
|
|
|||
|
|
@ -723,6 +723,7 @@ function collectProviderPluginRequirements(advertisement) {
|
|||
for (const requirement of surface.requiresPlugins || []) {
|
||||
requirements.push({
|
||||
surfaceId: surface.surfaceId || "",
|
||||
surfaceKey: surface.key || surface.url || "",
|
||||
pluginId: requirement.pluginId || "",
|
||||
versionRange: requirement.versionRange || "",
|
||||
availability: requirement.availability || "required",
|
||||
|
|
@ -1673,6 +1674,7 @@ function buildConformanceExport(report) {
|
|||
capabilityMatrix: buildCapabilityMatrix(report),
|
||||
runtimePluginProjectionCoverage: collectRuntimePluginProjectionCoverage(report),
|
||||
runtimePluginProjectionGaps: collectRuntimePluginProjectionGaps(report),
|
||||
providerRuntimePluginProjectionCoverage: collectProviderRuntimePluginProjectionCoverage(report),
|
||||
interactiveWorldSurfaces: collectInteractiveWorldSurfaces(report),
|
||||
worldSurfaceLoweringCoverage: collectWorldSurfaceLoweringCoverage(report),
|
||||
commandBoundaryCoverage: collectCommandBoundaryCoverage(report),
|
||||
|
|
@ -2003,6 +2005,76 @@ function collectRuntimePluginProjectionCoverage(report) {
|
|||
`${left.runtimeId}:${left.pluginId}:${left.status}`.localeCompare(`${right.runtimeId}:${right.pluginId}:${right.status}`));
|
||||
}
|
||||
|
||||
function collectProviderRuntimePluginProjectionCoverage(report) {
|
||||
const runtimeProjectionByKey = new Map();
|
||||
for (const record of collectRuntimePluginProjectionCoverage(report)) {
|
||||
runtimeProjectionByKey.set(`${record.runtimeId}:${record.pluginId}`, record);
|
||||
}
|
||||
const fixtureIdByPath = new Map((report.fixtures || [])
|
||||
.map(fixture => [normalizePath(fixture.surface?.path || ""), fixture.id]));
|
||||
const coverage = [];
|
||||
for (const provider of report.providers || []) {
|
||||
for (const requirement of provider.pluginRequirements || []) {
|
||||
const fixtureId = fixtureIdByPath.get(normalizePath(requirement.surfaceKey || "")) || "";
|
||||
if (!fixtureId) continue;
|
||||
const runtimes = (report.runtimes || [])
|
||||
.filter(runtime => (runtime.pluginFixtures || []).includes(fixtureId));
|
||||
for (const runtime of runtimes) {
|
||||
const projection = runtimeProjectionByKey.get(`${runtime.id}:${requirement.pluginId}`);
|
||||
coverage.push(buildProviderRuntimePluginProjectionRecord(provider, requirement, runtime, projection, fixtureId));
|
||||
}
|
||||
}
|
||||
}
|
||||
return coverage.sort((left, right) =>
|
||||
`${left.providerId}:${left.surfaceId}:${left.runtimeId}:${left.pluginId}`
|
||||
.localeCompare(`${right.providerId}:${right.surfaceId}:${right.runtimeId}:${right.pluginId}`));
|
||||
}
|
||||
|
||||
function buildProviderRuntimePluginProjectionRecord(provider, requirement, runtime, projection, fixtureId) {
|
||||
const availability = requirement.availability || "required";
|
||||
const optional = availability !== "required";
|
||||
const runtimeCapabilities = new Set(projection?.capabilities || []);
|
||||
const missingRuntimeRequiredCapabilities = (requirement.requiredCapabilities || [])
|
||||
.filter(capability => !runtimeCapabilities.has(capability));
|
||||
const missingRuntimeOptionalCapabilities = (requirement.optionalCapabilities || [])
|
||||
.filter(capability => projection?.status === "supported" && !runtimeCapabilities.has(capability));
|
||||
let status = optional ? "optional-supported" : "supported";
|
||||
if (!projection) {
|
||||
status = optional ? "optional-missing-runtime-projection" : "missing-runtime-projection";
|
||||
} else if (projection.status !== "supported") {
|
||||
status = optional ? "optional-unsupported-runtime-projection" : "unsupported-runtime-projection";
|
||||
} else if (missingRuntimeRequiredCapabilities.length) {
|
||||
status = optional ? "optional-missing-runtime-capability" : "missing-runtime-capability";
|
||||
} else if (missingRuntimeOptionalCapabilities.length) {
|
||||
status = "optional-missing-runtime-capability";
|
||||
}
|
||||
|
||||
return {
|
||||
providerId: provider.providerId,
|
||||
providerOwnerRepo: provider.ownerRepo || "",
|
||||
surfaceId: requirement.surfaceId || "",
|
||||
surfaceKey: requirement.surfaceKey || "",
|
||||
fixtureId,
|
||||
runtimeId: runtime.id,
|
||||
runtimeStatus: runtime.status || "",
|
||||
runtimeOwnerRepo: resolveRuntimeProjectionOwnerRepo(runtime),
|
||||
splitTarget: runtime.splitTarget || "",
|
||||
pluginId: requirement.pluginId || "",
|
||||
pluginOwnerRepo: projection?.pluginOwnerRepo || "",
|
||||
availability,
|
||||
status,
|
||||
severity: status === "supported" || status === "optional-supported"
|
||||
? "ok"
|
||||
: optional ? "degraded" : "blocker",
|
||||
requiredCapabilities: requirement.requiredCapabilities || [],
|
||||
optionalCapabilities: requirement.optionalCapabilities || [],
|
||||
runtimeCapabilities: projection?.capabilities || [],
|
||||
missingRuntimeRequiredCapabilities,
|
||||
missingRuntimeOptionalCapabilities,
|
||||
reason: projection?.reason || "",
|
||||
};
|
||||
}
|
||||
|
||||
function collectPluginAbiOperationCoverage(report) {
|
||||
const requiredOperations = ["describe", "validate", "project", "lower", "measure", "apply"];
|
||||
const coverage = [];
|
||||
|
|
|
|||
Loading…
Reference in a new issue