From b274bb0cf85053c41e5e239c16d8a58bad6df9bd Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 20 Jul 2026 00:22:32 +0100 Subject: [PATCH] Prove deterministic released Aetheria session --- .../PlayMode/GenericWorldCaptureTests.cs | 44 ++++++++++++------- ReleaseConsumerProject/Packages/manifest.json | 2 +- .../Packages/packages-lock.json | 6 +-- .../PlayMode/GenericWorldCaptureTests.cs | 44 ++++++++++++------- scripts/run-aetheria-daemon-world-witness.ps1 | 2 +- 5 files changed, 59 insertions(+), 39 deletions(-) diff --git a/ReleaseConsumerProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs b/ReleaseConsumerProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs index 950713e..6745b04 100644 --- a/ReleaseConsumerProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs +++ b/ReleaseConsumerProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs @@ -384,30 +384,26 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests } }; - var playerPrefab = provider.ResolvePrefab(new EveUnityPlayableWorldAssetBinding( - playerFact.AssetRef, - playerFact.EntityKind, - "provider-asset-ref")); - Assert.That(playerPrefab, Is.Not.Null, - $"Provider asset catalog did not resolve player AssetRef '{playerFact.AssetRef}'."); - Assert.That(provider.CurrentAssetBodyTransportKind, - Is.EqualTo(CultMeshBodyTransportKind.SharedFileMapping), - "The first requested provider bundle was not negotiated as a mapped body."); var marker = FindMarker(root, playerId); - Assert.That( - marker.GetComponentsInChildren(includeInactive: true).Length, - Is.GreaterThan(1), - "The generic client substituted its primitive fallback instead of the provider-authored AssetBundle prefab."); if (requireSessionGameplay) { + EveUnitySceneCommandReceipt observedDockReceipt = null; + string dockCommandId = null; + runtime.ReceiptAvailable += receipt => + { + if (receipt.CommandId == dockCommandId) + observedDockReceipt = receipt; + }; + host.SubmitAdvertisedActionIntent(playerId, "simulation.step"); var dockVersion = runtime.ActiveVersion; var dock = host.SubmitAdvertisedActionIntent(playerId, "pilot.dock"); + dockCommandId = dock.CommandId; var dockDeadline = Time.realtimeSinceStartup + 12f; while (Time.realtimeSinceStartup < dockDeadline && - (runtime.LastReceipt == null || runtime.LastReceipt.CommandId != dock.CommandId || - !string.Equals(runtime.LastReceipt.State, "reconciled", StringComparison.OrdinalIgnoreCase) || - runtime.ActiveVersion < runtime.LastReceipt.SourceVersion || + (observedDockReceipt == null || + !string.Equals(observedDockReceipt.State, "reconciled", StringComparison.OrdinalIgnoreCase) || + runtime.ActiveVersion < observedDockReceipt.SourceVersion || !(host.InputCapability?.Actions ?? Array.Empty()).Any(candidate => candidate != null && candidate.ActionId.StartsWith("trade.buy.", StringComparison.Ordinal) && @@ -416,7 +412,7 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests yield return new WaitForSecondsRealtime(0.1f); runtime.Refresh(); } - AssertReconciledProviderReceipt(runtime.LastReceipt, dock.CommandId, + AssertReconciledProviderReceipt(observedDockReceipt, dock.CommandId, provider.Selection.ProviderId, provider.Selection.SurfaceId, dockVersion); var buyAction = (host.InputCapability?.Actions ?? Array.Empty()) .FirstOrDefault(candidate => candidate != null && @@ -516,6 +512,20 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests provider.Selection.ProviderId, provider.Selection.SurfaceId, undockVersion); } + var playerPrefab = provider.ResolvePrefab(new EveUnityPlayableWorldAssetBinding( + playerFact.AssetRef, + playerFact.EntityKind, + "provider-asset-ref")); + Assert.That(playerPrefab, Is.Not.Null, + $"Provider asset catalog did not resolve player AssetRef '{playerFact.AssetRef}'."); + Assert.That(provider.CurrentAssetBodyTransportKind, + Is.EqualTo(CultMeshBodyTransportKind.SharedFileMapping), + "The first requested provider bundle was not negotiated as a mapped body."); + Assert.That( + marker.GetComponentsInChildren(includeInactive: true).Length, + Is.GreaterThan(1), + "The generic client substituted its primitive fallback instead of the provider-authored AssetBundle prefab."); + var initialPosition = marker.transform.position; initialVersion = runtime.ActiveVersion; var request = runtime.SubmitMoveVectorIntent(playerId, 1f, 0f, 1f); diff --git a/ReleaseConsumerProject/Packages/manifest.json b/ReleaseConsumerProject/Packages/manifest.json index 8cfc7c7..480877b 100644 --- a/ReleaseConsumerProject/Packages/manifest.json +++ b/ReleaseConsumerProject/Packages/manifest.json @@ -9,7 +9,7 @@ "org.gamecult.cultlib": "https://github.com/GameCult/CultLib.git?path=/unity/org.gamecult.cultlib#cultlib-unity-v1.0.38", "org.gamecult.eve.plugin-fields": "https://github.com/GameCult/EvePlugins.git?path=/plugins/eve-plugin-fields/unity/org.gamecult.eve.plugin-fields#eve-plugin-fields-unity-v0.2.3", "org.gamecult.eve.surface": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.surface#eveunity-surface-v0.2.4", - "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.97", + "org.gamecult.eve.unity-scene": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.98", "org.gamecult.eve.unity-uitoolkit": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-uitoolkit#eveunity-uitoolkit-v0.1.1" }, "testables": [ diff --git a/ReleaseConsumerProject/Packages/packages-lock.json b/ReleaseConsumerProject/Packages/packages-lock.json index 20ab53d..0653f4f 100644 --- a/ReleaseConsumerProject/Packages/packages-lock.json +++ b/ReleaseConsumerProject/Packages/packages-lock.json @@ -144,18 +144,18 @@ "hash": "e08fa08335f99e9edddeb706912eecfad07cb281" }, "org.gamecult.eve.unity-scene": { - "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.97", + "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-scene#eveunity-scene-v0.3.98", "depth": 0, "source": "git", "dependencies": { - "org.gamecult.cultlib": "1.0.36", + "org.gamecult.cultlib": "1.0.38", "org.gamecult.eve.plugin-fields": "0.2.3", "org.gamecult.eve.surface": "0.2.4", "com.unity.mathematics": "1.3.2", "com.unity.render-pipelines.universal": "17.4.0", "com.unity.modules.particlesystem": "1.0.0" }, - "hash": "44e338bd9eb4997f2235f7aa711b79bc5d5c12ff" + "hash": "002fbdf3570f533a8728d2a8f808025065d99532" }, "org.gamecult.eve.unity-uitoolkit": { "version": "https://github.com/GameCult/EveUnity.git?path=/packages/org.gamecult.eve.unity-uitoolkit#eveunity-uitoolkit-v0.1.1", diff --git a/TestProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs b/TestProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs index 950713e..6745b04 100644 --- a/TestProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs +++ b/TestProject/Assets/Tests/PlayMode/GenericWorldCaptureTests.cs @@ -384,30 +384,26 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests } }; - var playerPrefab = provider.ResolvePrefab(new EveUnityPlayableWorldAssetBinding( - playerFact.AssetRef, - playerFact.EntityKind, - "provider-asset-ref")); - Assert.That(playerPrefab, Is.Not.Null, - $"Provider asset catalog did not resolve player AssetRef '{playerFact.AssetRef}'."); - Assert.That(provider.CurrentAssetBodyTransportKind, - Is.EqualTo(CultMeshBodyTransportKind.SharedFileMapping), - "The first requested provider bundle was not negotiated as a mapped body."); var marker = FindMarker(root, playerId); - Assert.That( - marker.GetComponentsInChildren(includeInactive: true).Length, - Is.GreaterThan(1), - "The generic client substituted its primitive fallback instead of the provider-authored AssetBundle prefab."); if (requireSessionGameplay) { + EveUnitySceneCommandReceipt observedDockReceipt = null; + string dockCommandId = null; + runtime.ReceiptAvailable += receipt => + { + if (receipt.CommandId == dockCommandId) + observedDockReceipt = receipt; + }; + host.SubmitAdvertisedActionIntent(playerId, "simulation.step"); var dockVersion = runtime.ActiveVersion; var dock = host.SubmitAdvertisedActionIntent(playerId, "pilot.dock"); + dockCommandId = dock.CommandId; var dockDeadline = Time.realtimeSinceStartup + 12f; while (Time.realtimeSinceStartup < dockDeadline && - (runtime.LastReceipt == null || runtime.LastReceipt.CommandId != dock.CommandId || - !string.Equals(runtime.LastReceipt.State, "reconciled", StringComparison.OrdinalIgnoreCase) || - runtime.ActiveVersion < runtime.LastReceipt.SourceVersion || + (observedDockReceipt == null || + !string.Equals(observedDockReceipt.State, "reconciled", StringComparison.OrdinalIgnoreCase) || + runtime.ActiveVersion < observedDockReceipt.SourceVersion || !(host.InputCapability?.Actions ?? Array.Empty()).Any(candidate => candidate != null && candidate.ActionId.StartsWith("trade.buy.", StringComparison.Ordinal) && @@ -416,7 +412,7 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests yield return new WaitForSecondsRealtime(0.1f); runtime.Refresh(); } - AssertReconciledProviderReceipt(runtime.LastReceipt, dock.CommandId, + AssertReconciledProviderReceipt(observedDockReceipt, dock.CommandId, provider.Selection.ProviderId, provider.Selection.SurfaceId, dockVersion); var buyAction = (host.InputCapability?.Actions ?? Array.Empty()) .FirstOrDefault(candidate => candidate != null && @@ -516,6 +512,20 @@ namespace GameCult.EveUnity.GenericClient.PlayModeTests provider.Selection.ProviderId, provider.Selection.SurfaceId, undockVersion); } + var playerPrefab = provider.ResolvePrefab(new EveUnityPlayableWorldAssetBinding( + playerFact.AssetRef, + playerFact.EntityKind, + "provider-asset-ref")); + Assert.That(playerPrefab, Is.Not.Null, + $"Provider asset catalog did not resolve player AssetRef '{playerFact.AssetRef}'."); + Assert.That(provider.CurrentAssetBodyTransportKind, + Is.EqualTo(CultMeshBodyTransportKind.SharedFileMapping), + "The first requested provider bundle was not negotiated as a mapped body."); + Assert.That( + marker.GetComponentsInChildren(includeInactive: true).Length, + Is.GreaterThan(1), + "The generic client substituted its primitive fallback instead of the provider-authored AssetBundle prefab."); + var initialPosition = marker.transform.position; initialVersion = runtime.ActiveVersion; var request = runtime.SubmitMoveVectorIntent(playerId, 1f, 0f, 1f); diff --git a/scripts/run-aetheria-daemon-world-witness.ps1 b/scripts/run-aetheria-daemon-world-witness.ps1 index ab0a40e..f51bcae 100644 --- a/scripts/run-aetheria-daemon-world-witness.ps1 +++ b/scripts/run-aetheria-daemon-world-witness.ps1 @@ -17,7 +17,7 @@ param( ) $ErrorActionPreference = "Stop" -$expectedEveUnityCommit = "44e338bd9eb4997f2235f7aa711b79bc5d5c12ff" +$expectedEveUnityCommit = "002fbdf3570f533a8728d2a8f808025065d99532" $expectedEveFieldsCommit = "c5a4a75c1b727499b16c2dae1895f29e2a9f72f0" $expectedEveUnityUiToolkitCommit = "4d0cbe0185bdc4fc65eb63503a7c5cb578539669" $expectedCultLibCommit = "c6cf04a342a013afab52063a9b5445a3683700d4"