Files
sor/Server
0af6b61999 Fix action_log duplicate key: increment NextActionSequence before serializing
SaveStateAsync was serializing GameState BEFORE incrementing NextActionSequence,
so the written StateJson always had the pre-increment value. Every subsequent
request read the same NextActionSequence and computed the same SequenceNumber,
causing duplicate key violations on IX_action_logs_GameSessionId_SequenceNumber
even in purely sequential scenarios (e.g. P2 places then P1 places).

Fix: increment NextActionSequence first, then serialize, so the persisted JSON
always reflects the sequence number that was just consumed.

Generated with [Claude Code](https://claude.ai/code)
via [Happy](https://happy.engineering)

Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Happy <yesreply@happy.engineering>
2026-03-07 18:30:26 -05:00
..