refactor(app): complete session startup composition
Move the live-session reset and routing graph, combat and diagnostic command targets, and the sole gameplay input subscriber into Phase 7 before frame publication. Add exact retryable ownership for late bindings so partial startup cannot strand session or component teardown edges. Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
parent
7fa60971e2
commit
826f9ea9b5
22 changed files with 924 additions and 412 deletions
|
|
@ -122,6 +122,25 @@ public sealed class LiveCombatModeCommandControllerTests
|
|||
Assert.Throws<ObjectDisposedException>(() => slot.Bind(target));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void DeferredSlotOwnedBindingReleasesExactlyAndAllowsRebind()
|
||||
{
|
||||
var slot = new LiveCombatModeCommandSlot();
|
||||
var first = new FakeCommand();
|
||||
var second = new FakeCommand();
|
||||
|
||||
IDisposable firstBinding = slot.BindOwned(first);
|
||||
Assert.Throws<InvalidOperationException>(() => slot.BindOwned(second));
|
||||
|
||||
firstBinding.Dispose();
|
||||
using IDisposable secondBinding = slot.BindOwned(second);
|
||||
firstBinding.Dispose();
|
||||
slot.Toggle();
|
||||
|
||||
Assert.Equal(0, first.ToggleCount);
|
||||
Assert.Equal(1, second.ToggleCount);
|
||||
}
|
||||
|
||||
private sealed class Harness
|
||||
{
|
||||
public Harness()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue