From 46d4630abb43ffab1987a112848d28fe772877c9 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Thu, 9 Jul 2026 01:45:41 +0100 Subject: [PATCH] Add Aetheria provider handoff proof --- docs/eve-migration-roadmap.md | 7 ++ docs/parity-testing-harness.md | 18 +++- ...un-aetheria-conformance-consumer-smoke.ps1 | 3 +- .../run-aetheria-provider-handoff-smoke.ps1 | 101 ++++++++++++++++++ scripts/run-parity-harness.ps1 | 1 + tools/conformance/consume-export.mjs | 15 +++ tools/parity/parity-manifest.json | 7 +- tools/parity/run-parity.mjs | 2 + web/fixtures/aetheria-provider-handoff.json | 59 ++++++++++ 9 files changed, 208 insertions(+), 5 deletions(-) create mode 100644 scripts/run-aetheria-provider-handoff-smoke.ps1 create mode 100644 web/fixtures/aetheria-provider-handoff.json diff --git a/docs/eve-migration-roadmap.md b/docs/eve-migration-roadmap.md index c864945..da0c7d0 100644 --- a/docs/eve-migration-roadmap.md +++ b/docs/eve-migration-roadmap.md @@ -280,6 +280,13 @@ Exit criteria: Recently cut: +- Aetheria now has a provider handoff manifest at + `web/fixtures/aetheria-provider-handoff.json` and a verifier at + `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. - 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 dba7335..ace40b5 100644 --- a/docs/parity-testing-harness.md +++ b/docs/parity-testing-harness.md @@ -106,9 +106,21 @@ powershell -ExecutionPolicy Bypass -File .\scripts\run-aetheria-conformance-cons That script runs the same export consumer from `E:\Projects\Aetheria` and asserts the provider pack, `aetheria-world` fixture, `aetheria` provider entry, -and `aetheria-world-command-replay` scenario. Generated copies remain under -Eve's `artifacts/aetheria-conformance-consumer-smoke` so the provider worktree -does not become dirty merely by proving the boundary. +`aetheria-world-command-replay` scenario, and provider handoff path. Generated +copies remain under Eve's `artifacts/aetheria-conformance-consumer-smoke` so +the provider worktree does not become dirty merely by proving the boundary. + +Aetheria provider handoff smoke: + +```powershell +powershell -ExecutionPolicy Bypass -File .\scripts\run-aetheria-provider-handoff-smoke.ps1 +``` + +That script validates `web/fixtures/aetheria-provider-handoff.json` against the +provider advertisement and scenario. The handoff names the advertisement, +interactive world surface fixture, provider scenario, Eve contracts, forbidden +imports, and external proofs that must become Aetheria-owned before the +provider pack leaves Eve incubation. EveFlutter consumer smoke: diff --git a/scripts/run-aetheria-conformance-consumer-smoke.ps1 b/scripts/run-aetheria-conformance-consumer-smoke.ps1 index 1a98e2d..35baf25 100644 --- a/scripts/run-aetheria-conformance-consumer-smoke.ps1 +++ b/scripts/run-aetheria-conformance-consumer-smoke.ps1 @@ -45,7 +45,8 @@ try { --expect-provider-surface aetheria:aetheria.daemon.editor ` --expect-provider-command aetheria:aetheria.daemon.commands ` --expect-provider-receipt-state aetheria:accepted ` - --expect-provider-receipt-state aetheria:reconciled + --expect-provider-receipt-state aetheria:reconciled ` + --expect-provider-handoff aetheria if ($LASTEXITCODE -ne 0) { throw "Aetheria conformance consumer smoke failed with exit code $LASTEXITCODE" } diff --git a/scripts/run-aetheria-provider-handoff-smoke.ps1 b/scripts/run-aetheria-provider-handoff-smoke.ps1 new file mode 100644 index 0000000..06098e3 --- /dev/null +++ b/scripts/run-aetheria-provider-handoff-smoke.ps1 @@ -0,0 +1,101 @@ +param( + [string] $HandoffPath = "web\fixtures\aetheria-provider-handoff.json" +) + +$ErrorActionPreference = "Stop" + +$projectRoot = Split-Path -Parent $PSScriptRoot +$absoluteHandoffPath = if ([System.IO.Path]::IsPathRooted($HandoffPath)) { + $HandoffPath +} else { + Join-Path $projectRoot $HandoffPath +} + +if (-not (Test-Path -LiteralPath $absoluteHandoffPath)) { + throw "Aetheria provider handoff manifest not found: $absoluteHandoffPath" +} + +$handoff = Get-Content -LiteralPath $absoluteHandoffPath -Raw | ConvertFrom-Json + +if ($handoff.schema -ne "gamecult.eve.provider_handoff.v1") { + throw "Unexpected Aetheria provider handoff schema: $($handoff.schema)" +} +if ($handoff.providerId -ne "aetheria") { + throw "Unexpected Aetheria provider handoff provider: $($handoff.providerId)" +} +if ($handoff.ownerRepo -ne "Aetheria") { + throw "Unexpected Aetheria provider handoff owner: $($handoff.ownerRepo)" +} +if ($handoff.currentHostRepo -ne "Eve") { + throw "Unexpected Aetheria provider handoff host: $($handoff.currentHostRepo)" +} + +foreach ($pathProperty in @("advertisementPath", "scenarioPath")) { + $relativePath = $handoff.$pathProperty + if (-not $relativePath) { + throw "Aetheria provider handoff missing $pathProperty" + } + $absolutePath = Join-Path $projectRoot $relativePath + if (-not (Test-Path -LiteralPath $absolutePath)) { + throw "Aetheria provider handoff references missing $($pathProperty): $relativePath" + } +} + +$advertisement = Get-Content -LiteralPath (Join-Path $projectRoot $handoff.advertisementPath) -Raw | ConvertFrom-Json +$scenario = Get-Content -LiteralPath (Join-Path $projectRoot $handoff.scenarioPath) -Raw | ConvertFrom-Json + +if ($advertisement.providerId -ne $handoff.providerId) { + throw "Aetheria handoff provider does not match advertisement provider: $($advertisement.providerId)" +} +if ($scenario.providerId -ne $handoff.providerId) { + throw "Aetheria handoff provider does not match scenario provider: $($scenario.providerId)" +} +if ($scenario.ownerRepo -ne $handoff.ownerRepo) { + throw "Aetheria scenario owner does not match handoff owner: $($scenario.ownerRepo)" +} + +foreach ($fixtureId in @($handoff.fixtureIds)) { + if (-not (@($scenario.requires.fixtures) -contains $fixtureId)) { + throw "Aetheria provider handoff fixture is not required by scenario: $fixtureId" + } +} + +$moveSets = @($handoff.moveSets) +foreach ($id in @("provider-advertisement", "interactive-world-surface", "provider-scenario")) { + $moveSet = $moveSets | Where-Object { $_.id -eq $id } | Select-Object -First 1 + if (-not $moveSet) { + throw "Aetheria provider handoff missing move set: $id" + } + if ($moveSet.destinationOwner -ne "Aetheria") { + throw "Aetheria provider handoff move set $id has unexpected destination owner: $($moveSet.destinationOwner)" + } + if (-not $moveSet.replacementProof) { + throw "Aetheria provider handoff move set $id missing replacement proof" + } + foreach ($relativePath in @($moveSet.currentPaths)) { + $absolutePath = Join-Path $projectRoot $relativePath + if (-not (Test-Path -LiteralPath $absolutePath)) { + throw "Aetheria provider handoff move set $id references missing current path: $relativePath" + } + } +} + +foreach ($contract in @( + "gamecult.eve.surface.v1", + "gamecult.eve.command.v1", + "gamecult.eve.provider_advertisement.v1", + "gamecult.eve.provider_scenario.v1", + "gamecult.eve.conformance_export.v1" +)) { + if (-not (@($handoff.contractInputs) -contains $contract)) { + throw "Aetheria provider handoff missing contract input: $contract" + } +} + +foreach ($proof in @($handoff.requiredExternalProofs)) { + if (-not $proof) { + throw "Aetheria provider handoff contains an empty required external proof" + } +} + +Write-Host "Aetheria provider handoff smoke passed: $absoluteHandoffPath" diff --git a/scripts/run-parity-harness.ps1 b/scripts/run-parity-harness.ps1 index 21aea16..ccc960c 100644 --- a/scripts/run-parity-harness.ps1 +++ b/scripts/run-parity-harness.ps1 @@ -14,6 +14,7 @@ $env:EVE_PARITY_OUTPUT = if ([System.IO.Path]::IsPathRooted($OutputDirectory)) { Push-Location $projectRoot try { node .\tools\parity\run-parity.mjs + & (Join-Path $PSScriptRoot "run-aetheria-provider-handoff-smoke.ps1") & (Join-Path $PSScriptRoot "run-eveunity-split-handoff-smoke.ps1") & (Join-Path $PSScriptRoot "run-conformance-consumer-smoke.ps1") & (Join-Path $PSScriptRoot "run-plugin-owner-conformance-consumer-smoke.ps1") diff --git a/tools/conformance/consume-export.mjs b/tools/conformance/consume-export.mjs index 4732667..8f07765 100644 --- a/tools/conformance/consume-export.mjs +++ b/tools/conformance/consume-export.mjs @@ -21,6 +21,7 @@ if (!exportDirectory) { " --expect-provider-surface ", " --expect-provider-command ", " --expect-provider-receipt-state ", + " --expect-provider-handoff ", " --expect-runtime-status ", " --expect-runtime-feature ", " --expect-runtime-command-schema ", @@ -162,6 +163,16 @@ function validateIndex(index, directory, expectations, errors) { errors.push(`providers:${expectation.providerId}:receiptState:${expectation.state}:missing`); } } + for (const expectedProvider of expectations.providerHandoffs) { + const provider = providers.find(candidate => candidate.providerId === expectedProvider); + if (!provider) { + errors.push(`providers:${expectedProvider}:missing`); + continue; + } + if (!provider.handoffPath) { + errors.push(`providers:${expectedProvider}:handoffPath:missing`); + } + } for (const expectedRuntime of expectations.runtimes) { if (!runtimes.some(runtime => runtime.runtimeId === expectedRuntime)) errors.push(`runtimes:${expectedRuntime}:missing`); } @@ -277,6 +288,7 @@ function parseArguments(args) { providerSurfaces: [], providerCommands: [], providerReceiptStates: [], + providerHandoffs: [], runtimes: [], runtimeStatuses: [], runtimeFeatures: [], @@ -301,6 +313,7 @@ function parseArguments(args) { ["--expect-provider-surface", expectations.providerSurfaces], ["--expect-provider-command", expectations.providerCommands], ["--expect-provider-receipt-state", expectations.providerReceiptStates], + ["--expect-provider-handoff", expectations.providerHandoffs], ["--expect-runtime-status", expectations.runtimeStatuses], ["--expect-runtime-feature", expectations.runtimeFeatures], ["--expect-runtime-command-schema", expectations.runtimeCommandSchemas], @@ -332,6 +345,8 @@ function parseArguments(args) { target.push(parseProviderExpectation(value, "command")); } else if (option === "--expect-provider-receipt-state") { target.push(parseProviderExpectation(value, "state")); + } else if (option === "--expect-provider-handoff") { + target.push(value); } else if (option === "--expect-runtime-status") { target.push(parseRuntimeExpectation(value, "status")); } else if (option === "--expect-runtime-feature") { diff --git a/tools/parity/parity-manifest.json b/tools/parity/parity-manifest.json index 8488443..fa84ba9 100644 --- a/tools/parity/parity-manifest.json +++ b/tools/parity/parity-manifest.json @@ -344,11 +344,16 @@ "schemaPath": "schemas/gamecult.eve.provider_advertisement.v1.schema.json", "advertisementPath": "web/fixtures/aetheria.provider-advertisement.json", "scenarioPath": "web/fixtures/aetheria-world-scenario.json", + "handoffPath": "web/fixtures/aetheria-provider-handoff.json", "requiredFixtures": ["aetheria-world"], "expectedSchemas": ["gamecult.eve.surface.v1", "gamecult.eve.command.v1", "aetheria.runtime.daemon.frame.v1"], "expectedSurfaces": ["aetheria.daemon.game", "aetheria.daemon.editor"], "expectedCommands": ["aetheria.daemon.commands"], - "expectedPaths": ["web/fixtures/aetheria-world-scenario.json"] + "expectedPaths": [ + "web/fixtures/aetheria-world-scenario.json", + "web/fixtures/aetheria-provider-handoff.json", + "scripts/run-aetheria-provider-handoff-smoke.ps1" + ] } ], "pluginManifests": [ diff --git a/tools/parity/run-parity.mjs b/tools/parity/run-parity.mjs index 44c684f..2a7eacd 100644 --- a/tools/parity/run-parity.mjs +++ b/tools/parity/run-parity.mjs @@ -569,6 +569,7 @@ async function evaluateProvider(provider, fixtureResults, pluginResults) { schemaPath: provider.schemaPath || "", advertisementPath: provider.advertisementPath || "", scenarioPath: provider.scenarioPath || "", + handoffPath: provider.handoffPath || "", advertisementErrors, scenarioErrors, expectedPaths, @@ -1356,6 +1357,7 @@ function buildConformanceExport(report) { ownerRepo: provider.ownerRepo, advertisementPath: provider.advertisementPath, scenarioPath: provider.scenarioPath, + handoffPath: provider.handoffPath, scenarioId: provider.scenarioId, receiptStates: provider.scenarioReceiptStates || [], surfaces: provider.surfaceIds, diff --git a/web/fixtures/aetheria-provider-handoff.json b/web/fixtures/aetheria-provider-handoff.json new file mode 100644 index 0000000..f1736a8 --- /dev/null +++ b/web/fixtures/aetheria-provider-handoff.json @@ -0,0 +1,59 @@ +{ + "schema": "gamecult.eve.provider_handoff.v1", + "providerId": "aetheria", + "ownerRepo": "Aetheria", + "currentHostRepo": "Eve", + "advertisementPath": "web/fixtures/aetheria.provider-advertisement.json", + "scenarioPath": "web/fixtures/aetheria-world-scenario.json", + "fixtureIds": [ + "aetheria-world" + ], + "authorityBoundary": "Aetheria owns daemon state, generated world state, assets, command authorization, receipts, and provider scenarios. Eve owns only the provider advertisement, surface, command, and conformance contracts used to consume those surfaces.", + "moveSets": [ + { + "id": "provider-advertisement", + "destinationOwner": "Aetheria", + "currentPaths": [ + "web/fixtures/aetheria.provider-advertisement.json" + ], + "replacementProof": "Aetheria publishes provider advertisements from typed daemon state or CultMesh records." + }, + { + "id": "interactive-world-surface", + "destinationOwner": "Aetheria", + "currentPaths": [ + "web/fixtures/aetheria-world-surface.json", + "web/fixtures/aetheria-world-surface.conformance.json" + ], + "replacementProof": "Aetheria owns RTS/ARPG world surface fixtures, generated level state, and assets." + }, + { + "id": "provider-scenario", + "destinationOwner": "Aetheria", + "currentPaths": [ + "web/fixtures/aetheria-world-scenario.json", + "scripts/run-aetheria-conformance-consumer-smoke.ps1" + ], + "replacementProof": "Aetheria owns provider scenario conformance, command receipts, and replay fixtures." + } + ], + "contractInputs": [ + "gamecult.eve.surface.v1", + "gamecult.eve.command.v1", + "gamecult.eve.provider_advertisement.v1", + "gamecult.eve.provider_scenario.v1", + "gamecult.eve.conformance_export.v1" + ], + "forbiddenImports": [ + "Eve fixture paths as product authority", + "renderer-local Aetheria game state", + "Unity or web client state as daemon truth", + "plugin internals bypassing advertised provider commands" + ], + "requiredExternalProofs": [ + "Aetheria publishes its provider advertisement from owner-owned daemon state.", + "Aetheria exports provider fixtures or conformance packs without depending on Eve source layout.", + "Aetheria command receipts are generated by the daemon command boundary.", + "Unity and web clients consume Aetheria surfaces through provider advertisements and command intents." + ] +}