refactor(matching): extend PairUpResult with IsAiFallback flag
Pure shape change ahead of Phase 3 AI-fallback wiring — all current callers pass IsAiFallback: false. TK2 will always emit false (PvpOnly policy); rank-battle's PvpFirstThenAiFallback branch sets true after the threshold elapses. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -28,7 +28,7 @@ public sealed class InProcessPairUp : IMatchingPairUpService
|
||||
if (slot.Resolved.TryGetValue(player.ViewerId, out var cached))
|
||||
{
|
||||
slot.Resolved.Remove(player.ViewerId);
|
||||
return Task.FromResult<PairUpResult?>(new PairUpResult(cached, IsOwner: true));
|
||||
return Task.FromResult<PairUpResult?>(new PairUpResult(cached, IsOwner: true, IsAiFallback: false));
|
||||
}
|
||||
|
||||
// 2. Someone already waiting in this slot? Pair with them.
|
||||
@@ -46,7 +46,7 @@ public sealed class InProcessPairUp : IMatchingPairUpService
|
||||
var match = _bridge.RegisterBattle(p1, p2, BattleType.Pvp);
|
||||
// Cache the result for the FIRST arriver's next poll (consume-on-read).
|
||||
slot.Resolved[p1.ViewerId] = match;
|
||||
return Task.FromResult<PairUpResult?>(new PairUpResult(match, IsOwner: false));
|
||||
return Task.FromResult<PairUpResult?>(new PairUpResult(match, IsOwner: false, IsAiFallback: false));
|
||||
}
|
||||
|
||||
// 3. Empty slot — park this caller.
|
||||
|
||||
Reference in New Issue
Block a user