refactor(engine-ambient): wrap residual UnitTests + delete EngineSessionGate

Step 7 of multi-instancing migration. Residual SVSim.UnitTests that touch
engine code directly are wrapped in TestBattleScope. EngineSessionGate is
deleted along with the _engineOwned bookkeeping in BattleSession; engine
setup is unconditional now that per-battle state is isolated on the ambient.
Gate-specific fallback branches in BattleSession.ShadowIngest are simplified.

Suite fully green (SVSim.UnitTests, SVSim.BattleEngine.Tests).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
gamer147
2026-06-07 22:43:18 -04:00
parent 8af1be6555
commit 9e93a7b198
6 changed files with 57 additions and 80 deletions

View File

@@ -139,9 +139,9 @@ public class KnownListBuilderTests
[Test]
public void BuildPlayedCard_defaults_clan_to_zero_and_tribe_to_string_zero_when_caller_passes_none()
{
// A play whose engine read degraded (single-active-engine gate: _mgr null → the accessor fallback)
// emits clan 0 (ClanType.ALL ordinal) and tribe "0" (the prod no-tribe form, NEVER empty —
// empty is wire-illegal). The param defaults match the accessor fallbacks.
// A play whose engine read degraded (Setup failed and the ComputeFrames try/catch swallowed it →
// _mgr null → the accessor fallback) emits clan 0 (ClanType.ALL ordinal) and tribe "0" (the prod
// no-tribe form, NEVER empty — empty is wire-illegal). The param defaults match the accessor fallbacks.
var entry = KnownListBuilder.BuildPlayedCard(playIdx: 3, cardId: 101311010L, orderList: OrderListMove(3, 10, 20));
Assert.That(entry, Is.Not.Null);
Assert.That(entry!.Clan, Is.EqualTo(0));