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
|
|
@ -27,6 +27,31 @@ public sealed class LiveSessionCommandRouterTests
|
|||
Assert.False(router.IsActive);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void CommandSurfacePublishesToOneBorrowedRouteAndRetiresStaleRoute()
|
||||
{
|
||||
var sent = new List<string>();
|
||||
var surface = new LiveSessionCommandSurface();
|
||||
var first = NewRouter(sendTalk: text => sent.Add($"first:{text}"));
|
||||
var firstLease = surface.Attach(first);
|
||||
firstLease.Activate();
|
||||
|
||||
surface.Publish(new SendServerCommandCmd("@one"));
|
||||
var second = NewRouter(sendTalk: text => sent.Add($"second:{text}"));
|
||||
Assert.Throws<InvalidOperationException>(() => surface.Attach(second));
|
||||
|
||||
firstLease.Dispose();
|
||||
first.Publish(new SendServerCommandCmd("@stale"));
|
||||
var secondLease = surface.Attach(second);
|
||||
secondLease.Activate();
|
||||
surface.Publish(new SendServerCommandCmd("@two"));
|
||||
secondLease.Dispose();
|
||||
|
||||
Assert.Equal(["first:@one", "second:@two"], sent);
|
||||
Assert.False(first.IsActive);
|
||||
Assert.False(second.IsActive);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TellAndLegacyChannel_PreserveOutboundAndEchoPolicy()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue