refactor(runtime): move session lifetime and ordered transport
Move the canonical WorldSession generation, connect/enter/tick/stop transaction, inbound subscription owner, and retryable teardown acknowledgements into AcDream.Runtime. Keep App as a borrowing graphical host with a single inertable command projection and no mirrored session state. Validated by 79 Runtime tests, 3,776 App tests with three existing skips, the Release solution build, and 8,428 complete Release tests with five existing skips. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
ecc4816c5a
commit
7593078774
37 changed files with 884 additions and 355 deletions
|
|
@ -2,6 +2,8 @@ using System.Reflection;
|
|||
using AcDream.App.Rendering;
|
||||
using AcDream.App.Net;
|
||||
using AcDream.Core.Net;
|
||||
using AcDream.Runtime;
|
||||
using AcDream.Runtime.Session;
|
||||
|
||||
namespace AcDream.App.Tests.Net;
|
||||
|
||||
|
|
@ -30,6 +32,28 @@ public sealed class GameWindowLiveSessionOwnershipTests
|
|||
Assert.DoesNotContain(fields, field => field.Name == "_liveSessionCommands");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void GraphicalSessionSourceBorrowsCanonicalRuntimeState()
|
||||
{
|
||||
FieldInfo[] fields = typeof(LiveSessionAppSource).GetFields(PrivateInstance);
|
||||
|
||||
Assert.Equal(2, fields.Length);
|
||||
Assert.Contains(
|
||||
fields,
|
||||
field => field.Name == "_session"
|
||||
&& field.FieldType == typeof(LiveSessionController));
|
||||
Assert.Contains(
|
||||
fields,
|
||||
field => field.Name == "_commands"
|
||||
&& field.FieldType == typeof(LiveSessionCommandSurface));
|
||||
Assert.DoesNotContain(fields, field => field.FieldType == typeof(WorldSession));
|
||||
Assert.DoesNotContain(fields, field => field.FieldType == typeof(bool));
|
||||
Assert.DoesNotContain(
|
||||
fields,
|
||||
field => field.FieldType == typeof(RuntimeGenerationToken)
|
||||
|| field.FieldType == typeof(ulong));
|
||||
}
|
||||
|
||||
[Theory]
|
||||
[InlineData("TryStartLiveSession")]
|
||||
[InlineData("ClearInboundEntityState")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue