feat(battle-node): thread MatchContext through bridge to BattleSession
IMatchingBridge.RegisterPendingBattle now takes a MatchContext; PendingBattle carries it; BattleSession stores it. ArenaTwoPickBattleController builds ctx from IMatchContextBuilder. ScriptedLifecycle still uses ScriptedProfiles for the player half — Tasks 5/6 migrate the lifecycle. Existing tests updated: MatchingBridgeTests, BattleNodeFlowTests, InMemoryBattleSessionStoreTests, BattleSessionDispatchTests, BattleSession PumpTests, ArenaTwoPickBattleControllerTests (which now seeds a TK2 run + adds a no-active-run 400 case). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
using SVSim.BattleNode.Bridge;
|
||||
|
||||
namespace SVSim.BattleNode.Sessions;
|
||||
|
||||
/// <summary>
|
||||
/// Sparse pre-connect record: enough to validate the incoming WS connect and resolve
|
||||
/// the viewer. Full BattleSession is created on connect.
|
||||
/// Sparse pre-connect record: viewer id + the per-battle MatchContext snapshot. Enough to
|
||||
/// validate the incoming WS connect, resolve the viewer, and seed the BattleSession with the
|
||||
/// player-half lifecycle data. Full BattleSession is created on connect.
|
||||
/// </summary>
|
||||
public sealed record PendingBattle(string BattleId, long ViewerId);
|
||||
public sealed record PendingBattle(string BattleId, long ViewerId, MatchContext Context);
|
||||
|
||||
Reference in New Issue
Block a user