From f12a1d1e981ba7e244a27cf52622ee2407ca5287 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 9 Jul 2026 15:56:30 +0100 Subject: [PATCH] Export provider handoff move coverage --- docs/eve-migration-roadmap.md | 7 +- docs/parity-testing-harness.md | 6 ++ ...cult.eve.conformance_export.v1.schema.json | 70 +++++++++++++++++++ ...un-aetheria-conformance-consumer-smoke.ps1 | 7 +- tools/conformance/consume-export.mjs | 48 +++++++++++++ tools/parity/run-parity.mjs | 59 ++++++++++++++++ 6 files changed, 194 insertions(+), 3 deletions(-) diff --git a/docs/eve-migration-roadmap.md b/docs/eve-migration-roadmap.md index b1e82db..86163bc 100644 --- a/docs/eve-migration-roadmap.md +++ b/docs/eve-migration-roadmap.md @@ -718,8 +718,11 @@ Recently cut: `scripts/run-aetheria-provider-handoff-smoke.ps1`. The handoff names the advertisement, interactive world fixture, provider scenario, contract inputs, forbidden imports, and external proofs that must move to Aetheria. The - conformance export carries the handoff path, and the Aetheria consumer smoke - asserts it so provider ownership does not depend on Eve's parity manifest. + conformance export carries the handoff path and + `providerHandoffMoveCoverage[]`, and the Aetheria consumer smoke asserts + provider advertisement, interactive world surface, conformance fixture, and + scenario move records so provider ownership does not depend on Eve's source + layout or parity manifest. - EveUnity now has a machine-readable split handoff at `packages/org.gamecult.eve.unity-uitoolkit/eveunity-split-handoff.json` and a verifier at `scripts/run-eveunity-split-handoff-smoke.ps1`. The handoff diff --git a/docs/parity-testing-harness.md b/docs/parity-testing-harness.md index 5cf34c3..e2c0320 100644 --- a/docs/parity-testing-harness.md +++ b/docs/parity-testing-harness.md @@ -180,6 +180,12 @@ Plugin handoff move/source coverage is exported as target, handoff move set, destination owner, replacement proof, and current source path status. Consumer smokes can assert them with `--expect-plugin-handoff-move `. +Provider handoff move/source coverage is exported as +`providerHandoffMoveCoverage[]`. Each record joins provider id, owner repo, +handoff move set, destination owner, replacement proof, and current source path +status. Provider repos such as Aetheria can assert them with +`--expect-provider-handoff-move ` +without depending on Eve's source layout. Plugin ABI fixture operations are exported as `plugins[].abiOperationContracts` with `operation`, `input`, and `expect` blocks. Plugin owners can consume the operation-level contract for `describe`, `validate`, `project`, `lower`, diff --git a/schemas/gamecult.eve.conformance_export.v1.schema.json b/schemas/gamecult.eve.conformance_export.v1.schema.json index 176eab4..a884f4c 100644 --- a/schemas/gamecult.eve.conformance_export.v1.schema.json +++ b/schemas/gamecult.eve.conformance_export.v1.schema.json @@ -23,6 +23,7 @@ "splitTargetBlockers", "splitHandoffMoveCoverage", "pluginHandoffMoveCoverage", + "providerHandoffMoveCoverage", "splitTargets" ], "properties": { @@ -985,6 +986,75 @@ "additionalProperties": true } }, + "providerHandoffMoveCoverage": { + "type": "array", + "items": { + "type": "object", + "required": [ + "providerId", + "providerOwnerRepo", + "handoffPath", + "handoffExportPath", + "moveSetId", + "destinationOwner", + "replacementProof", + "pathKind", + "sourcePath", + "status", + "severity" + ], + "properties": { + "providerId": { + "type": "string", + "minLength": 1 + }, + "providerOwnerRepo": { + "type": "string", + "minLength": 1 + }, + "handoffPath": { + "type": "string", + "minLength": 1 + }, + "handoffExportPath": { + "type": "string", + "minLength": 1 + }, + "moveSetId": { + "type": "string", + "minLength": 1 + }, + "destinationOwner": { + "type": "string", + "minLength": 1 + }, + "replacementProof": { + "type": "string", + "minLength": 1 + }, + "pathKind": { + "type": "string", + "minLength": 1 + }, + "sourcePath": { + "type": "string", + "minLength": 1 + }, + "pathExists": { + "type": "boolean" + }, + "status": { + "type": "string", + "minLength": 1 + }, + "severity": { + "type": "string", + "minLength": 1 + } + }, + "additionalProperties": true + } + }, "providers": { "type": "array", "items": { diff --git a/scripts/run-aetheria-conformance-consumer-smoke.ps1 b/scripts/run-aetheria-conformance-consumer-smoke.ps1 index 52241c8..95e91cd 100644 --- a/scripts/run-aetheria-conformance-consumer-smoke.ps1 +++ b/scripts/run-aetheria-conformance-consumer-smoke.ps1 @@ -102,7 +102,12 @@ try { --expect-provider-receipt-state aetheria:accepted ` --expect-provider-receipt-state aetheria:pending ` --expect-provider-receipt-state aetheria:reconciled ` - --expect-provider-handoff aetheria + --expect-provider-handoff aetheria ` + --expect-provider-handoff-move aetheria:provider-advertisement:current:exists:aetheria.provider-advertisement.json ` + --expect-provider-handoff-move aetheria:interactive-world-surface:current:exists:aetheria-world-surface.json ` + --expect-provider-handoff-move aetheria:interactive-world-surface:current:exists:aetheria-world-surface.conformance.json ` + --expect-provider-handoff-move aetheria:provider-scenario:current:exists:aetheria-world-scenario.json ` + --expect-provider-handoff-move aetheria:provider-scenario:current:exists:run-aetheria-conformance-consumer-smoke.ps1 if ($LASTEXITCODE -ne 0) { throw "Aetheria conformance consumer smoke failed with exit code $LASTEXITCODE" } diff --git a/tools/conformance/consume-export.mjs b/tools/conformance/consume-export.mjs index b04d4b1..5ed527d 100644 --- a/tools/conformance/consume-export.mjs +++ b/tools/conformance/consume-export.mjs @@ -37,6 +37,7 @@ if (!exportDirectory) { " --expect-plugin-abi-operation-coverage ", " --expect-plugin-handoff ", " --expect-plugin-handoff-move ", + " --expect-provider-handoff-move ", " --expect-provider-surface ", " --expect-provider-surface-kind ", " --expect-provider-surface-field ", @@ -149,6 +150,7 @@ function validateIndex(index, directory, expectations, errors) { const splitTargetBlockers = Array.isArray(index.splitTargetBlockers) ? index.splitTargetBlockers : []; const splitHandoffMoveCoverage = Array.isArray(index.splitHandoffMoveCoverage) ? index.splitHandoffMoveCoverage : []; const pluginHandoffMoveCoverage = Array.isArray(index.pluginHandoffMoveCoverage) ? index.pluginHandoffMoveCoverage : []; + const providerHandoffMoveCoverage = Array.isArray(index.providerHandoffMoveCoverage) ? index.providerHandoffMoveCoverage : []; const worldSurfaceLoweringGaps = Array.isArray(index.worldSurfaceLoweringGaps) ? index.worldSurfaceLoweringGaps : []; validatePluginRecords(plugins, errors); @@ -175,6 +177,7 @@ function validateIndex(index, directory, expectations, errors) { validateSplitTargetBlockers(index.splitTargetBlockers, errors); validateSplitHandoffMoveCoverage(index.splitHandoffMoveCoverage, errors); validatePluginHandoffMoveCoverage(index.pluginHandoffMoveCoverage, errors); + validateProviderHandoffMoveCoverage(index.providerHandoffMoveCoverage, errors); validateWorldSurfaceLoweringCoverage(index.worldSurfaceLoweringCoverage, errors); validateCommandBoundaryCoverage(index.commandBoundaryCoverage, errors); validateScreenshotComparisonMetrics(index.screenshotComparisonMetrics, errors); @@ -718,6 +721,17 @@ function validateIndex(index, directory, expectations, errors) { errors.push(`pluginHandoffMoveCoverage:${expectation.pluginId}:${expectation.moveSetId}:${expectation.pathKind}:${expectation.status}:${expectation.pathSubstring}:missing`); } } + for (const expectation of expectations.providerHandoffMoves) { + const record = providerHandoffMoveCoverage.find(candidate => + candidate.providerId === expectation.providerId && + candidate.moveSetId === expectation.moveSetId && + candidate.pathKind === expectation.pathKind && + candidate.status === expectation.status && + candidate.sourcePath?.includes(expectation.pathSubstring)); + if (!record) { + errors.push(`providerHandoffMoveCoverage:${expectation.providerId}:${expectation.moveSetId}:${expectation.pathKind}:${expectation.status}:${expectation.pathSubstring}:missing`); + } + } for (const expectation of expectations.splitTargetProofs) { const target = splitTargets.find(candidate => candidate.id === expectation.targetId); if (!target) { @@ -914,6 +928,21 @@ function validatePluginHandoffMoveCoverage(records, errors) { } } +function validateProviderHandoffMoveCoverage(records, errors) { + if (!Array.isArray(records)) { + errors.push("providerHandoffMoveCoverage:missing"); + return; + } + for (const [index, record] of records.entries()) { + for (const field of ["providerId", "providerOwnerRepo", "handoffPath", "handoffExportPath", "moveSetId", "destinationOwner", "replacementProof", "pathKind", "sourcePath", "status", "severity"]) { + if (!record?.[field]) errors.push(`providerHandoffMoveCoverage:${index}:${field}:missing`); + } + if (typeof record?.pathExists !== "boolean") { + errors.push(`providerHandoffMoveCoverage:${index}:pathExists:expected boolean`); + } + } +} + function validateWorldSurfaceLoweringCoverage(records, errors) { if (!Array.isArray(records)) { errors.push("worldSurfaceLoweringCoverage:missing"); @@ -1143,6 +1172,7 @@ function parseArguments(args) { providerCommands: [], providerReceiptStates: [], providerHandoffs: [], + providerHandoffMoves: [], runtimes: [], runtimeStatuses: [], runtimeFeatures: [], @@ -1200,6 +1230,7 @@ function parseArguments(args) { ["--expect-provider-command", expectations.providerCommands], ["--expect-provider-receipt-state", expectations.providerReceiptStates], ["--expect-provider-handoff", expectations.providerHandoffs], + ["--expect-provider-handoff-move", expectations.providerHandoffMoves], ["--expect-runtime-status", expectations.runtimeStatuses], ["--expect-runtime-feature", expectations.runtimeFeatures], ["--expect-runtime-world-target", expectations.runtimeWorldTargets], @@ -1282,6 +1313,8 @@ function parseArguments(args) { target.push(parseProviderExpectation(value, "state")); } else if (option === "--expect-provider-handoff") { target.push(value); + } else if (option === "--expect-provider-handoff-move") { + target.push(parseProviderHandoffMoveExpectation(value)); } else if (option === "--expect-runtime-status") { target.push(parseRuntimeExpectation(value, "status")); } else if (option === "--expect-runtime-feature") { @@ -1500,6 +1533,21 @@ function parsePluginHandoffMoveExpectation(value) { }; } +function parseProviderHandoffMoveExpectation(value) { + const parts = value.split(":"); + if (parts.length < 5 || parts.slice(0, 4).some(part => !part) || !parts.slice(4).join(":")) { + console.error(`Expected provider handoff move in form, got: ${value}`); + process.exit(2); + } + return { + providerId: parts[0], + moveSetId: parts[1], + pathKind: parts[2], + status: parts[3], + pathSubstring: parts.slice(4).join(":"), + }; +} + function parsePluginExpectation(value, field) { const separator = value.indexOf(":"); if (separator <= 0 || separator === value.length - 1) { diff --git a/tools/parity/run-parity.mjs b/tools/parity/run-parity.mjs index 3db9e5b..af31eaa 100644 --- a/tools/parity/run-parity.mjs +++ b/tools/parity/run-parity.mjs @@ -1968,6 +1968,7 @@ function buildConformanceExport(report) { splitTargetBlockers: collectSplitTargetBlockers(report), splitHandoffMoveCoverage: collectSplitHandoffMoveCoverage(report), pluginHandoffMoveCoverage: collectPluginHandoffMoveCoverage(report), + providerHandoffMoveCoverage: collectProviderHandoffMoveCoverage(report), pluginAbiOperationCoverage: collectPluginAbiOperationCoverage(report), providerPluginRequirementCoverage: collectProviderPluginRequirementCoverage(report), capabilityGaps: collectCapabilityGaps(report), @@ -2861,6 +2862,64 @@ function buildPluginHandoffMoveRecord(plugin, handoff, moveSet, source) { }; } +function collectProviderHandoffMoveCoverage(report) { + const records = []; + for (const provider of report.providers || []) { + if (!provider.handoffPath) continue; + const absoluteHandoffPath = path.join(repoRoot, provider.handoffPath); + if (!existsSync(absoluteHandoffPath)) continue; + + let handoff; + try { + handoff = JSON.parse(readFileSync(absoluteHandoffPath, "utf8")); + } catch { + continue; + } + + for (const moveSet of handoff.moveSets || []) { + const currentPaths = Array.isArray(moveSet.currentPaths) ? moveSet.currentPaths : []; + for (const sourcePath of currentPaths) { + const absoluteSourcePath = path.join(repoRoot, sourcePath); + records.push(buildProviderHandoffMoveRecord(provider, handoff, moveSet, { + pathKind: "current", + sourcePath, + pathExists: existsSync(absoluteSourcePath), + })); + } + if (!currentPaths.length) { + records.push(buildProviderHandoffMoveRecord(provider, handoff, moveSet, { + pathKind: "replacement-required", + sourcePath: "(none)", + pathExists: false, + })); + } + } + } + return records.sort((left, right) => + `${left.providerId}:${left.moveSetId}:${left.pathKind}:${left.sourcePath}` + .localeCompare(`${right.providerId}:${right.moveSetId}:${right.pathKind}:${right.sourcePath}`)); +} + +function buildProviderHandoffMoveRecord(provider, handoff, moveSet, source) { + const status = source.pathKind === "replacement-required" + ? "no-source-paths" + : source.pathExists ? "exists" : "missing"; + return { + providerId: handoff.providerId || provider.providerId || "", + providerOwnerRepo: handoff.ownerRepo || provider.ownerRepo || "", + handoffPath: provider.handoffPath || "", + handoffExportPath: makeHandoffExportPath("provider", provider.providerId, provider.handoffPath || ""), + moveSetId: moveSet.id || "", + destinationOwner: moveSet.destinationOwner || "", + replacementProof: moveSet.replacementProof || "", + pathKind: source.pathKind, + sourcePath: normalizePath(source.sourcePath), + pathExists: source.pathExists, + status, + severity: "blocker", + }; +} + function collectInteractiveWorldSurfaces(report) { const surfaces = []; for (const provider of report.providers || []) {