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:
gamer147
2026-06-03 20:15:48 -04:00
parent 8085119439
commit f21ab7a38c
21 changed files with 49 additions and 395 deletions

View File

@@ -125,7 +125,7 @@ public class Program
// BestHTTP's SocketManager parses this as the Socket.IO v2 endpoint URL.
opt.NodeServerUrl = "localhost:5148/socket.io/";
// Any field in BattleNodeOptions can be overridden via the "BattleNode" section
// in appsettings*.json — see appsettings.Development.json for SoloDefaultsToScripted.
// in appsettings*.json — see appsettings.Development.json for DiagnosticLogging.
builder.Configuration.GetSection("BattleNode").Bind(opt);
});
// In-process FCFS pair-up for TK2 PvP /do_matching, plus rank-battle's AI-fallback
@@ -138,9 +138,8 @@ public class Program
new ModePolicy("unlimited_rank_battle", PolicyKind.PvpFirstThenAiFallback),
}));
builder.Services.AddSingleton<IMatchingPairUpService, InProcessPairUp>();
// Single resolver shared by every /do_matching family controller. Owns the scripted-
// flag short-circuit + the pair-up → matching_state mapping. Singleton: stateless,
// all deps are singletons too.
// Single resolver shared by every /do_matching family controller. Owns the
// pair-up → matching_state mapping. Singleton: stateless, all deps are singletons too.
builder.Services.AddSingleton<IMatchingResolver, MatchingResolver>();
// Phase 3: bot roster used by RankBattleController.AiStart to compose oppo_info.
// Transient because BotRoster depends on the transient IGlobalsRepository.