adventure: stop the log claiming a win it didn't see

Four things the review found, all of them the code telling a player
something that isn't true.

A run that walks into a dead end filed its ending as "cleared" whatever
the caller said, so both the liveblog and the summary reported a clear
for a party that merely ran out of map — and the end beat is
first-writer-wins, so nothing later could take it back. It says
"cleared" only for a boss now.

The re-offer branches of babysit and resume returned a zero cost, so a
player who was in fact charged read "0 coins" in the verdict. Both
re-quote the price they actually took.

And the realm-firsts reseed retired its one-shot job even when the read
under it had failed, which on a transient fault at Init would have left
the ledger mis-dated permanently. The read now says whether it worked,
and the job stays open when it didn't.

Claude-Session: https://claude.ai/code/session_012bxpQQJDjC1mTtLN3VVtBQ
This commit is contained in:
prosolis
2026-07-24 22:07:38 -07:00
parent c327cfc5f1
commit 509df7fadf
5 changed files with 55 additions and 11 deletions
@@ -140,8 +140,12 @@ func TestZoneFirstClearsCountsRetiredKills(t *testing.T) {
(run_id, user_id, zone_id, total_rooms, boss_defeated, abandoned, completed_at)
VALUES ('r7', '@josie:x', 'forest_shadows', 6, 1, 1, '2026-02-14 09:00:00')`)
clears, ok := zoneFirstClears()
if !ok {
t.Fatal("zoneFirstClears reported a read failure")
}
byZone := map[string]zoneFirstClear{}
for _, f := range zoneFirstClears() {
for _, f := range clears {
byZone[f.zoneID] = f
}
if len(byZone) != 3 {