audit finding #16. steady state was a full SectorState (21903) every four ticks - a hard client reset each time - and the per-turn channel the client is actually written around was never driven. added SectorHeartbeatMessage (21902): wire is vint serverTurn, vint checksum, with optional command and server-tick-data blocks the client's decode treats as absent at end of stream. the session now emits one per turn (every 10 ticks); the client reads serverTick as 10*serverTurn and verifies its predicted checksum for that tick against ours via LogicGameMode::endTurnReceivedFromServer. a match keeps it in sync with no reset; a mismatch flips it out of sync, which makes it request a sector state - which request_sector_state already serves. now that the idle divergence is fixed the early-game turns verify cleanly. format confirmed against SectorHeartbeatMessage::decode/encode and getMessageType (21902) in the client. the full snapshots still go out too; routing the bot's plays as commands inside the heartbeat and then dropping the periodic snapshot is the next step, but this stands up the channel and the checksum verification. harness: the session emits heartbeats at ticks 10 and 20, and the first decodes to (turn 1, checksum_at(10)). |
||
|---|---|---|
| .. | ||
| auth-service | ||
| game-service | ||
| gateway | ||
| logic | ||
| logic-derive | ||
| scroll-server | ||
| service-rpc | ||
| storage | ||
| titan | ||
| titan-derive | ||