You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The AI's draft fallback stops being silent cover.
The reinforce step drops the draft on the first territory the player owns when
aiReinforcePlacements offers nothing. It has to: troopsToPlace > 0 blocks the
phase advance, so a troop that never lands is a wedged turn.
BUT IT IS COVER FOR A PLANNER BUG, and it was silent. That is how it was found:
a browser spec stubbing aiReinforcePlacements, aiAttackPlan and aiFortifyMove
all to nothing passed GREEN. The console proved the stubs were called and the
roster proved what happened — territories 1 to 1, so the attack stub really did
bite, and troops 8 to 11, exactly the three-troop draft, placed by this line. A
broken planner would not stall the game. It would quietly draft onto the same
square every turn for the rest of a campaign, playing worse and worse while
looking like it worked.
In unmodified code the fallback never fires: the planner's one empty return is
owned.length === 0 || troops <= 0, this is its only caller, it passes troops: 1
and only asks while troops are owed. So the planner comes back empty only when
the player owns nothing — and then the fallback is empty too. Cover that is dead
in play and alive only when something is wrong is exactly the cover that should
speak up.
It warns now, naming the territory it fell back to. Verified both ways in the
browser: silent across a healthy AI turn, three warnings across a turn with the
planner stubbed. Pinned in aitest so the warn cannot be deleted while the `??`
stays — that is the precise edit that restores the silence — and so it cannot be
made unconditional, which would be noise nobody reads. Three sabotages, three
reds.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>