Neutralize Electron daemon target identity
This commit is contained in:
parent
0b7ed068ec
commit
62eed3a41a
5 changed files with 69 additions and 60 deletions
|
|
@ -39,12 +39,21 @@ if (-not $mainText.Contains('await api.submitEveCommand') -or
|
|||
Write-Error "Stage 7C Electron RTS verifier failed: Electron smoke does not verify typed operation receipts through preload."
|
||||
}
|
||||
|
||||
if (-not $mainText.Contains('AETHERIA_RTS_VERSE_ID') -or
|
||||
if (-not $mainText.Contains('AETHERIA_VERSE_ID') -or
|
||||
-not $mainText.Contains('--verse-id') -or
|
||||
-not $mainText.Contains('AETHERIA_RTS_DAEMON_ID') -or
|
||||
-not $mainText.Contains('AETHERIA_DAEMON_ID') -or
|
||||
-not $mainText.Contains('--daemon-id')) {
|
||||
Write-Error "Stage 7C Electron RTS verifier failed: Electron launcher does not configure daemon Verse identity."
|
||||
}
|
||||
if ($mainText.Contains('AETHERIA_RTS_') -or
|
||||
$mainText.Contains('starfire-rts') -or
|
||||
$mainText.Contains('aetheria-rts-daemon') -or
|
||||
$mainText.Contains('aetheria-rts-electron') -or
|
||||
$mainText.Contains('rtsCultMesh') -or
|
||||
$mainText.Contains('rtsDaemonId') -or
|
||||
$mainText.Contains('rtsVerseId')) {
|
||||
Write-Error "Stage 7C Electron RTS verifier failed: Electron launcher still uses RTS-branded daemon connection authority."
|
||||
}
|
||||
|
||||
$electron = Join-Path $root "node_modules\electron\dist\electron.exe"
|
||||
if (!(Test-Path -LiteralPath $electron)) {
|
||||
|
|
@ -59,12 +68,12 @@ $port = ([System.Net.IPEndPoint]$udp.Client.LocalEndPoint).Port
|
|||
$udp.Close()
|
||||
|
||||
try {
|
||||
$env:AETHERIA_RTS_ELECTRON_SMOKE = "1"
|
||||
$env:AETHERIA_RTS_RUNTIME_ROOT = $tempRoot
|
||||
$env:AETHERIA_RTS_CULTMESH_PORT = $port.ToString()
|
||||
$env:AETHERIA_RTS_VERSE_ID = "aetheria.stage7c.electron"
|
||||
$env:AETHERIA_RTS_DAEMON_ID = "stage7c-starfire"
|
||||
$env:AETHERIA_RTS_ELECTRON_SMOKE_RESULT = $resultPath
|
||||
$env:AETHERIA_ELECTRON_SMOKE = "1"
|
||||
$env:AETHERIA_RUNTIME_ROOT = $tempRoot
|
||||
$env:AETHERIA_CLIENT_CULTMESH_PORT = $port.ToString()
|
||||
$env:AETHERIA_VERSE_ID = "aetheria.stage7c.electron"
|
||||
$env:AETHERIA_DAEMON_ID = "stage7c-aetheria-daemon"
|
||||
$env:AETHERIA_ELECTRON_SMOKE_RESULT = $resultPath
|
||||
$process = Start-Process -FilePath $electron -ArgumentList "." -WorkingDirectory $root -Wait -PassThru
|
||||
if ($process.ExitCode -ne 0) {
|
||||
Write-Error "Stage 7C Electron RTS verifier failed: Electron exited with code $($process.ExitCode)."
|
||||
|
|
@ -80,12 +89,12 @@ try {
|
|||
}
|
||||
}
|
||||
finally {
|
||||
Remove-Item Env:\AETHERIA_RTS_ELECTRON_SMOKE -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_RTS_RUNTIME_ROOT -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_RTS_CULTMESH_PORT -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_RTS_VERSE_ID -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_RTS_DAEMON_ID -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_RTS_ELECTRON_SMOKE_RESULT -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_ELECTRON_SMOKE -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_RUNTIME_ROOT -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_CLIENT_CULTMESH_PORT -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_VERSE_ID -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_DAEMON_ID -ErrorAction SilentlyContinue
|
||||
Remove-Item Env:\AETHERIA_ELECTRON_SMOKE_RESULT -ErrorAction SilentlyContinue
|
||||
Remove-Item -LiteralPath $tempRoot -Recurse -Force -ErrorAction SilentlyContinue
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ if ($LASTEXITCODE -ne 0) {
|
|||
|
||||
$tempRoot = Join-Path ([System.IO.Path]::GetTempPath()) ("aetheria-stage7c-" + [Guid]::NewGuid().ToString("N"))
|
||||
New-Item -ItemType Directory -Path $tempRoot | Out-Null
|
||||
$statePath = Join-Path $tempRoot "aetheria-rts.cc"
|
||||
$statePath = Join-Path $tempRoot "aetheria.cc"
|
||||
$endpoint = $null
|
||||
|
||||
try {
|
||||
|
|
@ -55,10 +55,10 @@ if (!clientModulePath)
|
|||
const { AetheriaCultMeshClient } = await import(pathToFileURL(clientModulePath).href);
|
||||
|
||||
const client = new AetheriaCultMeshClient({
|
||||
uri: "cultmesh://odin/aetheria/rts/stage7c-verifier",
|
||||
uri: "cultmesh://aetheria/daemon/stage7c-aetheria-daemon",
|
||||
peerId: "stage7c-daemon",
|
||||
verseId: "aetheria.local",
|
||||
role: "aetheria-rts-daemon",
|
||||
role: "aetheria-daemon",
|
||||
endpoints: [endpoint],
|
||||
}, statePath, "stage7c-verifier");
|
||||
const viewport = await client.mapViewport({ minX: -5000, minY: -5000, maxX: 5000, maxY: 5000 });
|
||||
|
|
|
|||
|
|
@ -75,12 +75,12 @@ if (!clientModulePath)
|
|||
|
||||
const { AetheriaCultMeshClient } = await import(pathToFileURL(clientModulePath).href);
|
||||
const client = new AetheriaCultMeshClient({
|
||||
uri: "cultmesh://odin/aetheria/rts/stage7d-starfire",
|
||||
uri: "cultmesh://aetheria/daemon/stage7d-aetheria-daemon",
|
||||
peerId: "stage7d-daemon",
|
||||
verseId: "aetheria.local",
|
||||
role: "aetheria-rts-daemon",
|
||||
role: "aetheria-daemon",
|
||||
endpoints: [endpoint],
|
||||
}, "unused-local-state.cc", "stage7d-starfire", {
|
||||
}, "unused-local-state.cc", "stage7d-verifier", {
|
||||
publicationMode: "remote",
|
||||
snapshotTimeoutMs: 5000,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue