// Assembly-level parallelism policy. // // Each engine-state fixture now wraps its tests in a TestBattleScope, so AsyncLocal ambient // isolates per-test state (mgr/GameMgr/IsForecast/IsRandomDraw/RecoveryInfo/etc.). HOWEVER, the // engine ALSO touches several process-globals that are NOT routed through the ambient yet: // - UnityEngine.Resources cache (Dictionary, not concurrent) // - PrefabMgr.Load cache // - Wizard.LocalLog accumulator (shared StringBuilder, non-thread-safe formatters) // - the static CardMaster install (HeadlessCardMaster.Load now locks internally) // So enabling ParallelScope.Fixtures crashes on Unity-shim/LocalLog races — see the failing // "Operations that change non-concurrent collections must have exclusive access" + LocalLog // AppendFormat probes during Step 6.5. // // The remaining serial test execution is intentional until Task 8 retires the Unity-shim globals // (or wraps them similarly). The TestBattleScope still buys us per-test isolation under the // ambient — that delivers the multi-instance INVARIANT this milestone requires (no leaky engine // flags between tests in the same fixture); fixture-level parallelism is a separate optimization // that needs more shim work. using NUnit.Framework; [assembly: Parallelizable(ParallelScope.Self)]