refactor(app): compose session and player startup
Move streaming, live-session, hydration, local-player, combat, and teleport construction behind the typed Phase-7 boundary. Add exact-owner runtime bindings and focused spawn-claim classification so partial startup rolls back without retaining old session targets while preserving the accepted construction and frame dependencies. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
3573da12e1
commit
7771c07fb6
31 changed files with 1759 additions and 532 deletions
|
|
@ -42,6 +42,29 @@ public sealed class DeferredLiveEntityRuntimeComponentLifecycleTests
|
|||
Assert.Throws<ArgumentException>(() => bridge.Bind(bridge));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void OwnedBindingReleasesExactlyAndAllowsRebind()
|
||||
{
|
||||
var bridge = new DeferredLiveEntityRuntimeComponentLifecycle();
|
||||
int firstCalls = 0;
|
||||
int secondCalls = 0;
|
||||
var first = new DelegateLiveEntityRuntimeComponentLifecycle(
|
||||
_ => firstCalls++);
|
||||
var second = new DelegateLiveEntityRuntimeComponentLifecycle(
|
||||
_ => secondCalls++);
|
||||
|
||||
IDisposable firstBinding = bridge.BindOwned(first);
|
||||
Assert.Throws<InvalidOperationException>(() => bridge.BindOwned(second));
|
||||
|
||||
firstBinding.Dispose();
|
||||
using IDisposable secondBinding = bridge.BindOwned(second);
|
||||
firstBinding.Dispose();
|
||||
bridge.TearDown(CreateRecord());
|
||||
|
||||
Assert.Equal(0, firstCalls);
|
||||
Assert.Equal(1, secondCalls);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task ConcurrentBind_HasOneWinnerAndPublishesThatOwner()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue