refactor(battle-node): remove ScriptedBotParticipant and dev-affordance wiring
Deletes the scripted opponent and every entry point that created a BattleType.Scripted session (the ?scripted=1 query opt-in, the SoloDefaultsToScripted toggle, the resolver short-circuit, the WS handler case, the bridge validation arm). Real two-client PvP and the Bot matchmaking-timeout fallback are untouched. ResolveAsync drops its scriptedOptIn parameter. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,8 @@ namespace SVSim.UnitTests.BattleNode.Sessions;
|
||||
/// <summary>
|
||||
/// Audit Md11 — confirms <see cref="BattleSession.RunAsync"/> drops the per-RealParticipant
|
||||
/// <see cref="SVSim.BattleNode.Reliability.OutboundSequencer"/> archive when the session
|
||||
/// terminates. The Scripted bot has no outbound archive of its own, so the test uses a
|
||||
/// Scripted session (one Real, one ScriptedBot) and asserts only the Real side's archive
|
||||
/// is cleared.
|
||||
/// terminates. The NoOp bot has no outbound archive of its own, so the test uses a Bot
|
||||
/// session (one Real, one NoOpBot) and asserts only the Real side's archive is cleared.
|
||||
/// </summary>
|
||||
[TestFixture]
|
||||
public class BattleSessionTerminateCascadeTests
|
||||
@@ -25,7 +24,7 @@ public class BattleSessionTerminateCascadeTests
|
||||
var ws = new TestWebSocket();
|
||||
var real = new RealParticipant(
|
||||
ws, viewerId: 1, MakeFakeContext(), NullLogger<RealParticipant>.Instance);
|
||||
var bot = new ScriptedBotParticipant();
|
||||
var bot = new NoOpBotParticipant();
|
||||
|
||||
// Pre-load the archive so we can prove it was cleared (not just empty).
|
||||
real.Outbound.AssignAndArchive(MakeEnvelope(NetworkBattleUri.Matched));
|
||||
@@ -33,7 +32,7 @@ public class BattleSessionTerminateCascadeTests
|
||||
Assume.That(real.Outbound.Archive.Count, Is.EqualTo(2), "Precondition: archive populated.");
|
||||
|
||||
var session = new BattleSession(
|
||||
battleId: "test-bid", type: BattleType.Scripted,
|
||||
battleId: "test-bid", type: BattleType.Bot,
|
||||
a: real, b: bot, log: NullLogger<BattleSession>.Instance);
|
||||
|
||||
// Drive RunAsync to completion: closing the incoming side causes
|
||||
|
||||
Reference in New Issue
Block a user