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:
Erik 2026-07-25 19:39:24 +02:00
parent ecc4816c5a
commit 7593078774
37 changed files with 884 additions and 355 deletions

View file

@ -181,7 +181,7 @@ internal sealed class DevToolsCameraMenuOperations : IDevToolsCameraMenuOperatio
/// <summary>Resolves the reconnect-safe command bus at draw time.</summary>
internal sealed class DevToolsCommandBusSource : IDevToolsCommandBusSource
{
private LiveSessionController? _session;
private ILiveUiSessionTarget? _session;
private bool _deactivated;
public ICommandBus Current =>
@ -189,7 +189,7 @@ internal sealed class DevToolsCommandBusSource : IDevToolsCommandBusSource
? session.Commands
: NullCommandBus.Instance;
public void Bind(LiveSessionController session)
public void Bind(ILiveUiSessionTarget session)
{
ArgumentNullException.ThrowIfNull(session);
ObjectDisposedException.ThrowIf(_deactivated, this);
@ -199,7 +199,7 @@ internal sealed class DevToolsCommandBusSource : IDevToolsCommandBusSource
_session = session;
}
public IDisposable BindOwned(LiveSessionController session)
public IDisposable BindOwned(ILiveUiSessionTarget session)
{
ArgumentNullException.ThrowIfNull(session);
ObjectDisposedException.ThrowIf(_deactivated, this);
@ -213,7 +213,7 @@ internal sealed class DevToolsCommandBusSource : IDevToolsCommandBusSource
return new Binding(this, session);
}
public void Unbind(LiveSessionController session)
public void Unbind(ILiveUiSessionTarget session)
{
ArgumentNullException.ThrowIfNull(session);
if (ReferenceEquals(_session, session))
@ -229,11 +229,11 @@ internal sealed class DevToolsCommandBusSource : IDevToolsCommandBusSource
private sealed class Binding : IDisposable
{
private DevToolsCommandBusSource? _owner;
private readonly LiveSessionController _expected;
private readonly ILiveUiSessionTarget _expected;
public Binding(
DevToolsCommandBusSource owner,
LiveSessionController expected)
ILiveUiSessionTarget expected)
{
_owner = owner;
_expected = expected;