MAJOR: g.Log-only events invisible in ALL modes — defaults, LOAN MARKET, offers/takes, charge-offs, GAME OVER, DIVERGENCE watchdogs #122
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.