Add Aetheria Unity EditMode runner

This commit is contained in:
Meta Vens 2026-07-09 00:58:12 +01:00
commit eb2d6335cd
7 changed files with 152 additions and 17 deletions

View file

@ -285,10 +285,18 @@ Recently cut:
parity harness validates release, test, and capture lifecycle claims against
`tools/parity/parity-manifest.json`, checks declared evidence paths, and
exports lifecycle status through the conformance index. Current proof covers
incubating UPM package identity, authored package EditMode tests, and the
Aetheria consumer-build smoke; tagged EveUnity release, runtime-owned
batchmode test execution, and editor or batchmode capture remain explicit
split blockers.
incubating UPM package identity, package EditMode tests, Aetheria
consumer-build smoke, and an Eve-owned batchmode EditMode run through the
Aetheria Unity project; tagged EveUnity release, moving the batchmode runner
into EveUnity, and editor or batchmode capture remain explicit split
blockers.
- Aetheria now has repeatable Unity EditMode evidence for the Eve UI Toolkit
runtime. `scripts/run-aetheria-unity-editmode-tests.ps1` temporarily adds
`org.gamecult.eve.unity-uitoolkit` to Aetheria's Unity `testables`, runs
`GameCult.Eve.UnityUIToolkit.Tests` in Unity batchmode, writes XML and log
artifacts under `artifacts/aetheria-unity-editmode`, and restores
`Packages/manifest.json` before returning. This proves the incubating test
lifecycle; it does not make Eve own Unity's final runtime lifecycle.
- Aetheria now has repeatable Unity package consumer-build evidence for the
Eve UI Toolkit runtime. `scripts/run-aetheria-unity-package-smoke.ps1`
verifies Aetheria's Unity `Packages/manifest.json` consumes Eve's surface and

View file

@ -113,6 +113,21 @@ files, then builds the package through Aetheria's Unity-generated project. It is
consumer-build evidence, not a replacement for runtime-owned Unity capture or
release CI.
Aetheria Unity EditMode test smoke:
```powershell
powershell -ExecutionPolicy Bypass -File .\scripts\run-aetheria-unity-editmode-tests.ps1
```
That script temporarily adds `org.gamecult.eve.unity-uitoolkit` to Aetheria's
Unity `testables`, runs `GameCult.Eve.UnityUIToolkit.Tests` in Unity batchmode,
writes XML and log artifacts under `artifacts/aetheria-unity-editmode`, and
restores `Packages/manifest.json` before returning. The test asmdef uses
Unity-style precompiled references for the Brokkr/CultMesh DLLs that Unity
needs to resolve `GameCult.Mesh`; this complements the normal CultLib
.NET/NuGet dependency story rather than replacing it. The runner proves the
incubating package test lifecycle, not final EveUnity-owned release or capture.
Unity runtime lifecycle evidence:
`packages/org.gamecult.eve.unity-uitoolkit/eve-runtime-capability.json`
@ -122,8 +137,8 @@ The parity harness validates those lifecycle claims against
exist. The current lifecycle proof is deliberately split:
- release: incubating UPM package identity and import surface exist in Eve;
- test: package-owned EditMode tests are authored and Aetheria can build the
package through Unity's generated project;
- test: package-owned EditMode tests run through Aetheria in Unity batchmode,
and Aetheria can build the package through Unity's generated project;
- capture: Unity editor or batchmode capture remains a split blocker.
The smoke runner writes:

View file

@ -38,8 +38,8 @@ The runtime capability manifest is
evidence:
- release: incubating UPM package identity and import surface;
- test: package-owned EditMode tests plus Aetheria consumer-build smoke through
Unity's generated project;
- test: package-owned EditMode tests run through Aetheria in Unity batchmode,
plus Aetheria consumer-build smoke through Unity's generated project;
- capture: pending Unity editor or batchmode artifact.
Those lifecycle claims are validated by the parity harness. A missing evidence
@ -48,6 +48,11 @@ path is a runtime capability error, not a README footnote.
For Aetheria, the Unity evidence path is:
- `powershell -ExecutionPolicy Bypass -File ..\..\scripts\run-aetheria-unity-package-smoke.ps1`
- `powershell -ExecutionPolicy Bypass -File ..\..\scripts\run-aetheria-unity-editmode-tests.ps1`
The EditMode test asmdef declares Unity precompiled references for the
Brokkr/CultMesh DLLs Unity needs to resolve `GameCult.Mesh`. That is Unity
assembly plumbing, not a claim that CultLib lacks NuGet/.NET packaging.
Those checks sit alongside Eve's shared browser, Flutter, iOS, Android/Kotlin,
and Rust contract tests, all discoverable from the parity manifest.

View file

@ -11,8 +11,12 @@
],
"excludePlatforms": [],
"allowUnsafeCode": false,
"overrideReferences": false,
"precompiledReferences": [],
"overrideReferences": true,
"precompiledReferences": [
"GameCult.Caching.dll",
"GameCult.Mesh.dll",
"MessagePack.Annotations.dll"
],
"autoReferenced": false,
"defineConstraints": [],
"versionDefines": [],

View file

@ -59,15 +59,16 @@
},
"test": {
"ownerRepo": "EveUnity",
"status": "authored-editmode-tests-and-consumer-build-smoke",
"command": "powershell -ExecutionPolicy Bypass -File .\\scripts\\run-aetheria-unity-package-smoke.ps1",
"status": "batchmode-editmode-tests-and-consumer-build-smoke",
"command": "powershell -ExecutionPolicy Bypass -File .\\scripts\\run-aetheria-unity-editmode-tests.ps1",
"evidencePaths": [
"packages/org.gamecult.eve.unity-uitoolkit/Tests/Editor/GameCult.Eve.UnityUIToolkit.Tests.asmdef",
"packages/org.gamecult.eve.unity-uitoolkit/Tests/Editor/EveUiToolkitSurfaceLowererTests.cs",
"scripts/run-aetheria-unity-editmode-tests.ps1",
"scripts/run-aetheria-unity-package-smoke.ps1"
],
"pendingProofs": [
"Unity EditMode or PlayMode test assembly runs from the runtime repo in batchmode."
"Unity batchmode EditMode runner is owned by EveUnity rather than Eve incubation."
]
},
"capture": {

View file

@ -0,0 +1,99 @@
param(
[string] $AetheriaRoot = "E:\Projects\Aetheria",
[string] $UnityExe = "C:\Program Files\Unity\Hub\Editor\6000.4.2f1\Editor\Unity.exe",
[string] $OutputRoot = ""
)
$ErrorActionPreference = "Stop"
$eveRoot = Split-Path -Parent $PSScriptRoot
if ([string]::IsNullOrWhiteSpace($OutputRoot)) {
$OutputRoot = Join-Path $eveRoot "artifacts\aetheria-unity-editmode"
}
if (-not (Test-Path -LiteralPath $AetheriaRoot)) {
throw "Aetheria repo not found: $AetheriaRoot"
}
if (-not (Test-Path -LiteralPath $UnityExe)) {
throw "Unity editor not found: $UnityExe"
}
$manifestPath = Join-Path $AetheriaRoot "Packages\manifest.json"
if (-not (Test-Path -LiteralPath $manifestPath)) {
throw "Aetheria Unity package manifest not found: $manifestPath"
}
$stamp = Get-Date -Format "yyyyMMddTHHmmss"
$runRoot = Join-Path $OutputRoot $stamp
New-Item -ItemType Directory -Force -Path $runRoot | Out-Null
$resultsPath = Join-Path $runRoot "unity-editmode-results.xml"
$logPath = Join-Path $runRoot "unity-editmode.log"
$packageName = "org.gamecult.eve.unity-uitoolkit"
$originalManifest = Get-Content -Raw -LiteralPath $manifestPath
$manifestRestored = $false
function Restore-Manifest {
if (-not $script:manifestRestored) {
Set-Content -LiteralPath $manifestPath -Value $script:originalManifest -NoNewline
$script:manifestRestored = $true
}
}
try {
$manifest = $originalManifest | ConvertFrom-Json
$testables = @($manifest.testables)
if ($testables -notcontains $packageName) {
$testables += $packageName
if ($manifest.PSObject.Properties.Name -contains "testables") {
$manifest.testables = $testables
} else {
$manifest | Add-Member -NotePropertyName "testables" -NotePropertyValue $testables
}
$manifest | ConvertTo-Json -Depth 32 | Set-Content -LiteralPath $manifestPath
}
$arguments = @(
"-batchmode",
"-projectPath", $AetheriaRoot,
"-runTests",
"-testPlatform", "EditMode",
"-assemblyNames", "GameCult.Eve.UnityUIToolkit.Tests",
"-testResults", $resultsPath,
"-logFile", $logPath
)
$process = Start-Process -FilePath $UnityExe -ArgumentList $arguments -Wait -PassThru -WindowStyle Hidden
$exitCode = $process.ExitCode
} finally {
Restore-Manifest
}
if ($exitCode -ne 0) {
if (Test-Path -LiteralPath $logPath) {
Get-Content -LiteralPath $logPath -Tail 120
}
throw "Unity EditMode test run failed with exit code $exitCode. Log: $logPath"
}
if (-not (Test-Path -LiteralPath $resultsPath)) {
throw "Unity EditMode test run did not produce results: $resultsPath"
}
[xml] $results = Get-Content -Raw -LiteralPath $resultsPath
$testRun = $results.SelectSingleNode("//test-run")
if ($null -eq $testRun) {
throw "Unity EditMode test results did not contain a test-run node: $resultsPath"
}
$failed = [int] $testRun.failed
$passed = [int] $testRun.passed
$total = [int] $testRun.total
if ($failed -gt 0) {
throw "Unity EditMode tests failed: $failed failed, $passed passed, $total total. Results: $resultsPath"
}
Write-Host "Unity EditMode tests passed: $passed passed, $total total"
Write-Host "Unity EditMode results: $resultsPath"
Write-Host "Unity EditMode log: $logPath"

View file

@ -428,7 +428,7 @@
],
"pendingProofs": [
"Tagged UPM release is cut from EveUnity rather than Eve incubation.",
"Unity EditMode or PlayMode test assembly runs from the runtime repo in batchmode.",
"Unity batchmode EditMode runner is owned by EveUnity rather than Eve incubation.",
"Unity batchmode or editor capture artifact is attached to the runtime conformance report."
]
}
@ -707,7 +707,8 @@
"packages/org.gamecult.eve.unity-uitoolkit/Runtime/SaiVisualNovelUiToolkitProjectionAdapter.cs",
"packages/org.gamecult.eve.unity-uitoolkit/Runtime/NornGraphUiToolkitProjectionAdapter.cs",
"packages/org.gamecult.eve.unity-uitoolkit/Tests/Editor/GameCult.Eve.UnityUIToolkit.Tests.asmdef",
"packages/org.gamecult.eve.unity-uitoolkit/Tests/Editor/EveUiToolkitSurfaceLowererTests.cs"
"packages/org.gamecult.eve.unity-uitoolkit/Tests/Editor/EveUiToolkitSurfaceLowererTests.cs",
"scripts/run-aetheria-unity-editmode-tests.ps1"
],
"expectedSourceSymbols": [
{
@ -763,14 +764,16 @@
},
"test": {
"ownerRepo": "EveUnity",
"status": "authored-editmode-tests-and-consumer-build-smoke",
"status": "batchmode-editmode-tests-and-consumer-build-smoke",
"command": "powershell -ExecutionPolicy Bypass -File .\\scripts\\run-aetheria-unity-editmode-tests.ps1",
"evidencePaths": [
"packages/org.gamecult.eve.unity-uitoolkit/Tests/Editor/GameCult.Eve.UnityUIToolkit.Tests.asmdef",
"packages/org.gamecult.eve.unity-uitoolkit/Tests/Editor/EveUiToolkitSurfaceLowererTests.cs",
"scripts/run-aetheria-unity-editmode-tests.ps1",
"scripts/run-aetheria-unity-package-smoke.ps1"
],
"pendingProofs": [
"Unity EditMode or PlayMode test assembly runs from the runtime repo in batchmode."
"Unity batchmode EditMode runner is owned by EveUnity rather than Eve incubation."
]
},
"capture": {