Add event-driven state sync with ETag optimization
This commit is contained in:
2
TESTS.md
2
TESTS.md
@@ -44,6 +44,8 @@ stateDiagram-v2
|
||||
|
||||
### 2) State & Phase Alignment (/api/state, /api/me)
|
||||
- /api/state returns player-specific phase, votesFinal, hasJoker, counts; unauthorized returns 401.
|
||||
- /api/state supports `ETag`/`If-None-Match` and returns 304 when unchanged.
|
||||
- /api/events/state (SSE) emits invalidation events after successful state mutations.
|
||||
- GetPhase auto-upgrades legacy Reveal -> Vote and realigns when resultsOpen toggles (to Results and back to Vote clearing votesFinal).
|
||||
- /me/phase/next: moves Suggest->Vote, Vote->Results only when resultsOpen true; clears votesFinal; rejects when results locked.
|
||||
- /me/phase/prev: admin only; moves back one step, clears votesFinal, rejects for player.
|
||||
|
||||
Reference in New Issue
Block a user