Skip to content

Edge-case hardening: NaN input, leaderboard throttle, party rematch#3

Merged
bbjansen merged 1 commit into
mainfrom
fix/games-edge-cases
Jul 8, 2026
Merged

Edge-case hardening: NaN input, leaderboard throttle, party rematch#3
bbjansen merged 1 commit into
mainfrom
fix/games-edge-cases

Conversation

@bbjansen

@bbjansen bbjansen commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Hardens all three games against the edge cases found in review:

  • Blobs: reject non-finite move input (a single NaN would corrupt position/score); throttle leaderboard submits from every tick (20 Hz × players) to once per 5s per player.
  • Siege: reject non-finite move direction; add director bookkeeping fields to the State type.
  • Caption Clash: auto-return to a fresh lobby after the results screen (rematch) instead of stranding players; drop a departed player's caption; comment on why Party uses the raw API (turn-based).

+14 handler tests; full showcase suite 49 pass. Handlers already republished to WfP.

Blobs: reject non-finite move input (NaN would corrupt position/score
irrecoverably); throttle leaderboard submits from every tick (20 Hz ×
players) to once per 5s per player.

Siege: reject non-finite move direction; add the director bookkeeping
fields (_spawned/_clearedAt/_restartAt) to the State type.

Caption Clash: after the results screen, auto-return to a fresh lobby
(scores reset, present players kept) instead of stranding everyone on
the final scoreboard; drop a departed player's caption so it isn't left
voteable with no author. Comment explaining why Party uses the raw
plot.join() API (turn-based → no predict/interpolate) while Blobs/Siege
use the managed plot.play().

Tests: +14 handler tests (NaN rejection, throttle, rematch, submission
cleanup). Full showcase suite 49 pass.
@bbjansen bbjansen merged commit a8a3656 into main Jul 8, 2026
@bbjansen bbjansen deleted the fix/games-edge-cases branch July 8, 2026 19:07
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