From 0aafef3b22359d4888a51039dbf4f2fc6f5ebb67 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 5 Jul 2026 21:54:50 +0100 Subject: [PATCH] Neutralize Electron local run fallback --- .../Electron/aetheria-rts-local-documents.ts | 10 ++++++---- .../scripts/verify-stage7b-rts-client.ps1 | 13 +++++++------ Aetheria.State.Verify/Program.cs | 5 +++++ 3 files changed, 18 insertions(+), 10 deletions(-) diff --git a/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts b/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts index 027f0060a..fca76486b 100644 --- a/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts +++ b/Aetheria.Rts.Web/Electron/aetheria-rts-local-documents.ts @@ -44,6 +44,8 @@ import type { ViewportResponse, } from "./aetheria-rts-bindings.js"; +const missingDaemonRunId = "aetheria.run.unknown"; + export function buildViewportDocumentFromFrame(frameDocument: unknown, request: ViewportRequest): ViewportResponse { const objects = buildObjectsViewportDocumentFromFrame(frameDocument, request); const gravity = buildGravityViewportDocumentFromFrame(frameDocument, request); @@ -75,7 +77,7 @@ export function buildObjectsViewportDocumentFromFrame( const zone = zones.find(candidate => num(candidate[zoneSlots.zoneIndex], -1) === currentZoneIndex) ?? zones[0] ?? []; - const runId = str(run[runSlots.runId]) || "local-rts"; + const runId = str(run[runSlots.runId]) || missingDaemonRunId; const viewport = normalizeViewport(request); const entities = list(zone[zoneSlots.entities]); const controlledEntityIndices = entities @@ -121,7 +123,7 @@ export function buildGravityViewportDocumentFromFrame( const zone = zones.find(candidate => num(candidate[zoneSlots.zoneIndex], -1) === currentZoneIndex) ?? zones[0] ?? []; - const runId = str(run[runSlots.runId]) || "local-rts"; + const runId = str(run[runSlots.runId]) || missingDaemonRunId; const viewport = normalizeViewport(request); const visibleBodies = list(zone[zoneSlots.bodies]) .filter(body => gravityInfluenceIntersectsViewport(body, viewport)); @@ -151,7 +153,7 @@ export function buildRenderSplatsViewportDocumentFromFrame( const zone = zones.find(candidate => num(candidate[zoneSlots.zoneIndex], -1) === currentZoneIndex) ?? zones[0] ?? []; - const runId = str(run[runSlots.runId]) || "local-rts"; + const runId = str(run[runSlots.runId]) || missingDaemonRunId; const viewport = normalizeViewport(request); const layers = defaultRenderSplatLayers(); const layerIndices: ReadonlyMap = new Map(layers.map((layer, index) => [layer.layerKey, index] as const)); @@ -459,7 +461,7 @@ function frameContext(frameDocument: unknown): { []; return { frameId: num(frame[frameSlots.frameId]), - runId: str(run[runSlots.runId]) || "local-rts", + runId: str(run[runSlots.runId]) || missingDaemonRunId, zoneIndex: num(zone[zoneSlots.zoneIndex]), entities: list(zone[zoneSlots.entities]), }; diff --git a/Aetheria.Rts.Web/scripts/verify-stage7b-rts-client.ps1 b/Aetheria.Rts.Web/scripts/verify-stage7b-rts-client.ps1 index 38318948a..0c0f7a521 100644 --- a/Aetheria.Rts.Web/scripts/verify-stage7b-rts-client.ps1 +++ b/Aetheria.Rts.Web/scripts/verify-stage7b-rts-client.ps1 @@ -139,7 +139,7 @@ $requiredGeneratedBindingSymbols = @( 'AetheriaRuntimeRtsQueryDiagnostic', 'AetheriaRuntimeRtsLiveFeedDiagnostic', 'AetheriaRuntimeRtsSurfaceCatalogDiagnostic', - 'AetheriaRuntimeRtsDocuments', + 'AetheriaRuntimeGameDocuments', 'AetheriaRuntimeRtsDocumentResolvers', 'CultMeshSurfaceCatalogDiagnostic', 'CultMeshSurfaceCatalogIndexDiagnostic', @@ -156,7 +156,7 @@ $requiredGeneratedBindingSymbols = @( 'routeHint: CultMeshRouteHint', 'CultMeshQueryWatcher', 'AetheriaRuntimeRtsQueryWatchers', - 'createAetheriaRuntimeRtsDocuments', + 'createAetheriaRuntimeGameDocuments', 'CultMesh.document', 'CultMesh.bindDocument', 'CultMesh.describeSurface(documents.daemonFrame)', @@ -219,7 +219,7 @@ if ($LASTEXITCODE -ne 0) { $clientText = Get-Content Electron/aetheria-cultmesh.ts -Raw -if (-not $clientText.Contains('this.documents = createAetheriaRuntimeRtsDocuments(') -or +if (-not $clientText.Contains('this.documents = createAetheriaRuntimeGameDocuments(') -or -not $clientText.Contains('this.queryVerse.context.routeHint,')) { Write-Error "Stage 7B verifier failed: RTS client is not creating generated document handles with its shared Verse route." } @@ -515,9 +515,10 @@ $requiredGeneratedBindingSymbols = @( 'aetheriaRuntimeDaemonCommandDocumentSlots', 'aetheriaRuntimeDaemonFrameDocumentSlots', 'aetheriaRuntimeDaemonHealthDocumentSlots', - 'aetheriaRuntimeRtsViewportDocumentSlots', + 'aetheriaRuntimeGameViewportDocumentSlots', 'aetheriaRuntimeObjectsViewportDocumentSlots', 'aetheriaRuntimeGravityViewportDocumentSlots', + 'aetheriaRuntimeRenderSplatsViewportDocumentSlots', 'aetheriaRuntimeSelectedObjectDocumentSlots', 'aetheriaRuntimeInventoryDocumentSlots', 'aetheriaRuntimeStarbridgeScenarioDocumentSlots', @@ -528,8 +529,8 @@ $requiredGeneratedBindingSymbols = @( 'aetheriaRuntimeStarbridgeWaveForecastSlots', 'aetheriaRuntimeStarbridgeRuntimeRoleSlots', 'aetheriaRuntimeStarbridgeBaseStatusSlots', - 'aetheriaRuntimeRtsViewportBoundsSlots', - 'aetheriaRuntimeRtsViewportObjectSlots', + 'aetheriaRuntimeGameViewportBoundsSlots', + 'aetheriaRuntimeGameViewportObjectSlots', 'aetheriaRuntimeVerseAuthorityPolicyDocumentSlots', 'aetheriaRuntimeAuthorityRuleSlots', 'aetheriaRuntimeAuthorityLeaseDocumentSlots', diff --git a/Aetheria.State.Verify/Program.cs b/Aetheria.State.Verify/Program.cs index e2b9d23c1..1d6b110de 100644 --- a/Aetheria.State.Verify/Program.cs +++ b/Aetheria.State.Verify/Program.cs @@ -16253,6 +16253,11 @@ static void RequireUnityDoesNotCallSharedSimulationTicks(string root) throw new InvalidOperationException( "Aetheria daemon smoke/freeze callers and fixtures must use client-neutral endpoint, run, and runtime vocabulary instead of preserving RTS-branded transport names."); } + if (rtsLocalDocuments.Contains("local-rts", StringComparison.Ordinal)) + { + throw new InvalidOperationException( + "Electron local document projections must not invent RTS-branded run ids when the daemon frame omits run identity."); + } if (stateBoundary.Contains("UnityRuntimeIdOverrideEnvironmentVariable", StringComparison.Ordinal) || stateBoundary.Contains("AETHERIA_UNITY_RUNTIME_ID", StringComparison.Ordinal) || clientTargetStore.Contains("raven-unity", StringComparison.Ordinal) ||