MAJOR: g.Log-only events invisible in ALL modes — defaults, LOAN MARKET, offers/takes, charge-offs, GAME OVER, DIVERGENCE watchdogs #122

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

Found by the v0.6.0 review (issue #118). main.go:122 calls run(true) unconditionally (spectate included), so interactiveMode is always true and flushLog (main.go:533-541) always drops g.Log without printing; the bench sets headlessMode which drops it too. flushLog's print branch is dead code in every production mode.

The lines that only ever reach g.Log (never logf) therefore never print anywhere: loan defaults on the die (game.go:280), "deposit flow" totals, the LOAN MARKET award summary, every bond offer placed and take filled, loan charge-offs, shore-up borrows, "GAME OVER … Winner", and both accounting watchdogs (ACCT DIVERGENCE game.go:819, CF DIVERGENCE game.go:836). The divergence detectors exist but are silent in exactly the harness (headless bench) that exists to catch them.

Verified: a 58-turn spectate game with 3 bankruptcy auctions contains ZERO occurrences of "GAME OVER", "defaulted on die", "LOAN MARKET:", "offers … units @", "takes … cash from bond", "charged off" — while the events demonstrably happened (the BOND MARKET screen showed standing offers every turn).

This is a regression from the #113/#115 display rework: the turn-end flush was removed to kill the double print, but only the logf-path lines were converted. Every display-worthy g.Log append should go through logf.

Found by the v0.6.0 review (issue #118). main.go:122 calls run(true) unconditionally (spectate included), so interactiveMode is always true and flushLog (main.go:533-541) always drops g.Log without printing; the bench sets headlessMode which drops it too. flushLog's print branch is dead code in every production mode. The lines that only ever reach g.Log (never logf) therefore never print anywhere: loan defaults on the die (game.go:280), "deposit flow" totals, the LOAN MARKET award summary, every bond offer placed and take filled, loan charge-offs, shore-up borrows, "GAME OVER … Winner", and both accounting watchdogs (ACCT DIVERGENCE game.go:819, CF DIVERGENCE game.go:836). The divergence detectors exist but are silent in exactly the harness (headless bench) that exists to catch them. Verified: a 58-turn spectate game with 3 bankruptcy auctions contains ZERO occurrences of "GAME OVER", "defaulted on die", "LOAN MARKET:", "offers … units @", "takes … cash from bond", "charged off" — while the events demonstrably happened (the BOND MARKET screen showed standing offers every turn). This is a regression from the #113/#115 display rework: the turn-end flush was removed to kill the double print, but only the logf-path lines were converted. Every display-worthy g.Log append should go through logf.
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#122
No description provided.