1.1 KiB
1.1 KiB
Issue #300 — scoreboard -> next-round bootstrap invariant
Refs: #300, parent #287
Hardened invariant
POST /lobby/sessions/{code}/rounds/next now treats scoreboard -> next round as a deterministic backend-owned bootstrap boundary:
- stale pre-created
RoundConfig/RoundQuestionrows for the next round are deleted before bootstrap - dependent lies / guesses for that stale next-round question are cleared with it
current_roundincrements exactly once when a fresh next-round question can be selected- the response makes reset semantics explicit with:
round_bootstrap.active_submissions = { lies: 0, guesses: 0 }round_question.answers = []submission_progress = { lies_submitted: 0, guesses_submitted: 0, players_expected: N }reveal = nullleaderboard = null
Regression coverage
Targeted Django tests lock:
- scoreboard -> next-round bootstrap returns explicit reset semantics
- stale future round artifacts are removed before the next round is exposed
- two consecutive round bootstraps do not leak prior-round state into the next round