fix(boom): settle days that close short of a full podium - #4
Merged
Conversation
A Boom day only announced once every required game had three unique entrants. A quiet :hadeda-boom: left the day, and that week's crown, stalled permanently with no podium and no way to recover. - Announce a day once its noon window closes (13:00 local) if it did not fill, driven by the next channel message, @bot leaderboard, and a 60s sweep. Games with one or two entrants keep 3/2 point scoring; empty games render "no entries". - Bound the sweep to ANNOUNCE_BACKFILL_DAYS = 2 so deploying this cannot post podiums for days that stalled long ago. - Persist the Friday crown only after chat.postMessage succeeds, so a failed post retries instead of recording a king nobody was told about. - Stop marking a week crowned when the leaderboard is empty. - Post the weekend/holiday "Boom isn't played today" notice once per date rather than once per poster. - Guard the announce path with an in-flight date set so concurrent deliveries cannot double-post a podium. - Drop the unreachable !inWindow branch in the second clown check. Docs updated from source: README, docs/OPERATIONS.md, docs/TESTING.md. 7 new regression tests; 5 fail on master, all 35 pass here. tsc --noEmit clean. Claude-Session: https://claude.ai/code/session_01VFFB7rybFHMqXVPYbFgCb1
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-existing bugs on
master, separate from #3. None of these are fixed by #3 either.The main one
A day only announced once every required game had 3 unique entrants. A quiet
:hadeda-boom:left the day, and that week's crown, stalled permanently. No podium, no crown, no recovery path.Now a day settles when all games fill or when its noon window closes at 13:00 local. Games with 1-2 entrants keep 3/2 scoring; an empty game renders
— no entries.Trigger is the next message in the channel,
@bot leaderboard, and a 60s sweep. Bounded byANNOUNCE_BACKFILL_DAYS = 2so deploying this cannot flood the channel with podiums for days that stalled months ago.Also fixed
setCrownran beforechat.postMessage, andmarkCrownedwas skipped when the post threw. A rate-limited crown post recorded a king nobody was told about, unrecoverably.markCrownedran even when the leaderboard was empty, permanently marking an unplayed week as crowned.!inWindowbranch in the second clown check (the first check already returned).Verification
master, all 35 pass here.tsc --noEmitclean.Conflicts with #3
This touches the same announce path #3 rewrites, so they will conflict. #3 still has the short-podium stall (
resolveGamenever marks a zero-entrant game resolved, soannounceDayreturns early forever), so whichever lands second needs that carried across.Docs updated from source: README,
docs/OPERATIONS.md,docs/TESTING.md.https://claude.ai/code/session_01VFFB7rybFHMqXVPYbFgCb1