MAJOR: --replay records the wrong winner + auction and revocation coverage gaps #125

Closed
opened 2026-10-01 15:31:08 +00:00 by Winnie · 0 comments
Owner

Found by the v0.6.0 review (issue #118). Several replay defects:

  • replayOutcome (replay.go:229-238) sets winner_seat/winner_name by iterating g.Banks and overwriting with EVERY alive bank, so the last alive seat wins the replay — not g.Winner (the highest-equity standing bank, game.go:1036-1043). With Survivors=3 (the default), most games end with several standing banks and the replay's winner is systematically wrong. Verified: 10 seeded games, replay winner was always the last alive seat; 3 of 10 contradicted the console FINAL RANKING.
  • ReplayTurn.Auction is a single slot: two bankruptcies in one financePhase silently overwrite the first auction record.
  • When len(bids)==0 (the last bank fails), bankrupt() returns before replayAuction — that bankruptcy is absent from the replay entirely.
  • Revocations are never recorded (no replay event for revokeOffers / the revoke? hook).
  • ReplayFill omits turns_left, so bond accruals cannot be recomputed from the file alone.
Found by the v0.6.0 review (issue #118). Several replay defects: - replayOutcome (replay.go:229-238) sets winner_seat/winner_name by iterating g.Banks and overwriting with EVERY alive bank, so the last alive seat wins the replay — not g.Winner (the highest-equity standing bank, game.go:1036-1043). With Survivors=3 (the default), most games end with several standing banks and the replay's winner is systematically wrong. Verified: 10 seeded games, replay winner was always the last alive seat; 3 of 10 contradicted the console FINAL RANKING. - ReplayTurn.Auction is a single slot: two bankruptcies in one financePhase silently overwrite the first auction record. - When len(bids)==0 (the last bank fails), bankrupt() returns before replayAuction — that bankruptcy is absent from the replay entirely. - Revocations are never recorded (no replay event for revokeOffers / the revoke? hook). - ReplayFill omits turns_left, so bond accruals cannot be recomputed from the file alone.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Winnie/bankwars#125
No description provided.