Skip to content

fix(boom): settle days that close short of a full podium - #4

Merged
zkrige merged 1 commit into
masterfrom
fix/boom-preexisting-issues
Aug 28, 2026
Merged

fix(boom): settle days that close short of a full podium#4
zkrige merged 1 commit into
masterfrom
fix/boom-preexisting-issues

Conversation

@zkrige

@zkrige zkrige commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

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 by ANNOUNCE_BACKFILL_DAYS = 2 so deploying this cannot flood the channel with podiums for days that stalled months ago.

Also fixed

  • setCrown ran before chat.postMessage, and markCrowned was skipped when the post threw. A rate-limited crown post recorded a king nobody was told about, unrecoverably.
  • markCrowned ran even when the leaderboard was empty, permanently marking an unplayed week as crowned.
  • The weekend/holiday "Boom isn't played today" notice fired once per poster.
  • Unreachable !inWindow branch in the second clown check (the first check already returned).
  • Announce path guarded by an in-flight date set so concurrent deliveries cannot double-post.

Verification

  • 7 new regression tests. 5 of them fail on master, all 35 pass here.
  • tsc --noEmit clean.

Conflicts with #3

This touches the same announce path #3 rewrites, so they will conflict. #3 still has the short-podium stall (resolveGame never marks a zero-entrant game resolved, so announceDay returns 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

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
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 17a43551-7f52-42a7-8eb9-374882fcb7a1


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@zkrige
zkrige merged commit c9769c6 into master Aug 28, 2026
1 check passed
@zkrige
zkrige deleted the fix/boom-preexisting-issues branch August 28, 2026 16:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant