mirror of
https://github.com/prosolis/gogobee.git
synced 2026-09-14 10:51:09 +00:00
adventure: tell Pete what the realm is, not just what happened in it
Adds the realm snapshot behind Pete's map, board and hall of firsts: every zone with its clear history and who is standing in it, the ledger of things that have happened exactly once, and one line per adventurer. Snapshot semantics like the roster and the Siege — pushed whole, replaces Pete's copy, dropped rather than retried. It rides the roster ticker but at a ten-minute stride: these are aggregate scans over the whole run history, and a first clear does not move. Two things the real data corrected, neither of which any unit test would have caught: `abandoned` does not mean the player gave up. It means the run row was retired, and abandonZoneRunByID exists precisely to retire a run whose boss is already dead when the expedition travels on. 30 of prod's 32 boss kills carry abandoned = 1, so filtering on `abandoned = 0` — as this did, copying the shipped backfill — drew a realm in which almost nothing had ever been beaten. boss_defeated = 1 is the clear. And news_realm_firsts is not a usable history book on its own. It only covers what happened after the news seam went live, its one-shot seeder carried that same wrong filter, and its first_at is when the claim was written down, not when the thing happened — every backfilled row in prod shares one timestamp. So the zone half of the hall is derived from the run history instead, which is complete and correctly dated, and the ledger supplies the kinds the run history knows nothing about. That also makes the hall agree with the board by construction rather than by coincidence. Opt-out follows the rule that fits each surface: a first-clearer is anonymised (deleting the claim would redraw a conquered zone as unbeaten), a player is dropped from the board outright, and presence is dropped entirely — who is in a dungeon right now is the live-location fact the liveblog already refuses. Claude-Session: https://claude.ai/code/session_012bxpQQJDjC1mTtLN3VVtBQ
This commit is contained in:
@@ -53,6 +53,9 @@ func (p *AdventurePlugin) peteRosterTicker() {
|
||||
p.pushRoster()
|
||||
p.pushDetails()
|
||||
p.pushSiege()
|
||||
// Self-rate-limited to realmPushInterval: the realm is aggregate scans
|
||||
// over the whole run history and none of it moves at roster speed.
|
||||
p.pushRealm()
|
||||
p.pushRunBeats()
|
||||
// After the beats, not before: the summary is the last beat of a run's
|
||||
// story and has no business overtaking the log it is about. It is also the
|
||||
|
||||
Reference in New Issue
Block a user