Files
Dune/docs/SAPHO_BATTLE_ORDER.md
T
Quintine cb691e1b14 Connect Sapho first and last battle-choice order
Juice of Sapho can change the remaining Battle-phase chooser order at clean boundaries. A chooser may occupy the physical defender slot and select the actual other combatant. Physical storm order, attackers, defenders and tie advantage remain intact. Full-roster phase priority survives aftermath, newly eligible Face Dancers and saved continuation. Controls and all four AI profiles consume the same projected choices.

Independent review verified private options, public geometry, exact physical disposal, rejected-action immutability, phase expiry and boundary-bound saved chooser integrity. Actual Basic/Advanced Face Dance regressions verify later replacement priority. Authenticated SQLite tests cover duplicate concurrent card requests, private restore and battle completion. Chooser/aggressor separation and phase duration remain explicit implementation interpretations; the separate aggressor mode and unresolved timing stay gated. Reinforcements remains disabled pending the documented reserve-cost question.

Types, lint, 4792 offline tests, build and 43 HTTP tests pass with unchanged source. Six fixed genuine Basic/Advanced faction samples finish in 3672 accepted actions and 97 periodic private JSON restores. They retain 82 rejected candidates at existing guarded arrival combinations; subsequent legal candidates finish. This is bounded playability evidence, not complete compliance or AI calibration.

The browser used Sapho first from a later physical circle, chose Emperor, sealed and resolved a battle, then refreshed into its next choice. Emperor retained the tie win. All 9 accepted actions replay exactly using the recorded random battle event; physical custody, all private JSON views and the original seat row pass. A private harness initially needed random-event replay binding and SQLite-row prototype normalization; no production fix or game reset was required.

After the reported outage, the server responded and the staged QA game restored exactly. All 970 opening games and their original seat/recovery records remain preserved (1004 after checks), including all 971 rooms present immediately before checks. SQLite integrity and foreign keys pass. No restart, database reset or recurring automation was needed.

Verified source tree: b699f80600f8e297595a8e756edf367a607ddd99707474c03231e6479bd2f389
2026-09-14 05:14:57 +10:00

4.5 KiB

Juice of Sapho: remaining battle-choice order

Updated 14 September 2026. This connects first/last Battle-phase ordering through controls, AI and saved continuation. The separate aggressor mode and full Richese/Advanced publication gates remain unfinished.

Authority and interpretation

The physical-card audit and source follow-up establish first/last in an ordered phase/action as a separate printed alternative from becoming a battle's aggressor. The battle review explains why chooser identity, participants and tie priority must remain separate.

The selected scope is the remaining Battle phase, at clean boundaries between battles. Accepted priority lasts for the rest of that phase. Keeping a reordered chooser separate from physical attacker and tie advantage is the existing audit's implementation interpretation of those distinct alternatives, not an explicit publisher FAQ ruling. The base game normally combines those identities through storm order. No new official timing ruling is claimed.

First and last reorder future choices; completed battles stay resolved. Other players can still select battles against a last-position holder. Sapho grants no immunity or additional battle and does not move forces or alter physical storm order. Aggressor mode needs its separate late-intervention protocol and Stone Burner allocation work. No new confirmation-only window is introduced here.

Connected behavior

The existing Richese development configuration supplies the physical card. Its holder receives private battleOrder first/last options at a clean boundary. The command binds the current opportunity and discards the exact unreserved card once. A held position, stale event, absent unresolved battle or suspended interaction cannot consume it. Earlier completed battles do not prevent a later order change; a current battle and its aftermath must finish first.

The stored priority is separate from g.order. Legal pair geometry comes from the public combat board. Each choice has a chooser and stable attacker/defender identities. A reordered physical defender can choose the actual opposing attacker without swapping leaders, plans or faction powers. UI and bots use the same authoritative choices and owner-relative target.

Priority includes all seats, even those currently without a battle, so a later Face Dancer replacement does not move a newly relevant seat behind an accepted last position. Actual eligibility is recomputed after all aftermath. A battle start or Sapho use expires the old opportunity event. Legally recovering the physical card permits a new use at a fresh opportunity; there is no invented once-per-phase restriction.

All four AI profiles use their private view and public board. Their initial ordering policy favors first when an unresolved stronghold battle is available, otherwise last. They can then choose an opponent from either stable battle slot. This is a legal strategy path, not difficulty calibration.

Evidence and boundaries

Focused engine, controls, bot and authenticated SQLite tests exercise ordering, actual opponent choice, saved continuation, duplicate-request custody and rejected action immutability. Fixtures distinguish genuine Basic/Advanced CHOAM/Richese setup from later conserved battle staging. A genuine five-seat Ix/CHOAM regression resolves a battle, activates Face Dance and gives the newly eligible replacement its next choice ahead of a protected last seat, in Basic and Advanced.

The isolated browser table used first from a later physical circle, chose the earlier Emperor attacker, completed the battle and restored the next battle choice after refresh. Emperor retained the tie win. All nine accepted actions replayed exactly with the recorded battle event; private views, physical custody and the original seat row passed. Final check results, fingerprints, browser and complete-game evidence are retained in the private checkpoint report and Git message.

Intervention within an unresolved battle or suspended aftermath is unavailable. Aggressor mode, ordinary cyclic-auction scope, first versus an unspent Advanced Guild and interruption of partly completed movement turns retain their existing boundaries. Prototype evidence does not certify full card or mode compliance.

The opening preservation baseline contains 970 rooms. Keep all saved games and seat/recovery records, reuse the healthy server and leave recurring restarts absent.