Repository navigation
M4: add server-authoritative Casual round - #8
Merged
Merged
Conversation
mcfarhat
reviewed
Jul 24, 2026
mcfarhat
left a comment
Contributor
There was a problem hiding this comment.
Hi Mohammad — reviewed #8 and it is another strong one, and I want to call out that it directly closes the open question from #7:
- Durable Hunter nominations (the #7 follow-up). The new migration adds
game.lobby_membership.hunter_nominatedwith a clear comment — Nakama rehydrates it after a match-handler restart and clears it transactionally at round start. That is exactly the durability gap I flagged; nicely done.
On the Casual round itself:
- Server-authoritative fire resolution.
HandleFireonly accepts aim intent — the server owns shells, reload windows, discoveries, and win conditions. Nice gating: phase must behunting(elseround_terminal/not_hunting), aim-slot bounds-checked, reload window enforced, out-of-shells enforced. - Idempotent + bounded. Replays short-circuit via
hunter.Commands[CommandID](every path, including rejects, caches its result), andmaximumProcessedCommandscaps per-hunter command memory so a spammed client cannot grow state unbounded. - Clean phase machine (
preparing → hiding → hunting → terminal) advanced by deadline, private randomized hiding slots viacrypto/rand, discovery dedup viaFoundHiders, and a proper server-side win (complete("hunters", "all_hiders_found")when every hider is found). All 5 CI checks pass; MERGEABLE/CLEAN.
No blockers from me — this is merge-ready. Holding the actual merge for Dr. Mohammad's sign-off. Excellent work again.
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.
What changed
preparing→hiding→hunting→terminal)Why
This implements Trello card #32’s acceptance criterion: a complete Casual round reaches a terminal state under server authority, with no client declaring hits, scores, roles, or results.
The durable nomination change addresses Mr Farhat’s PR #7 and Trello follow-up about match-handler restart behavior.
Scope boundaries
Validation
npm run verifynpm run realtime:smokeVisual preview: https://hive-chameleon-mz29yal7f-evaras-projects.vercel.app