fix(client): address PR #4 round 2 review feedback

- decode_snapshot() reports dropped entities via push_error and returns
  decode_errors count so callers can detect partial data (D-010
  information boundary compliance)
- receive_bytes() warns when overwriting unconsumed snapshot, documents
  latest-wins semantics
- Rename misleading test to test_encode_produces_nonempty_bytes
- Fix tick rate comment: 10 ticks/game-minute per D-031

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 20:12:39 +01:00
co-authored by Claude Opus 4.6
parent bc9a691bc1
commit 5a539991e4
3 changed files with 15 additions and 4 deletions
+1 -2
View File
@@ -164,7 +164,6 @@ func test_decode_player_input_empty_bytes() -> void:
assert_that(result).is_null()
func test_encode_returns_empty_on_failure() -> void:
# Verify that a valid encode produces non-empty bytes
func test_encode_produces_nonempty_bytes() -> void:
var bytes = Protocol.encode_player_input(1, "MoveNorth")
assert_that(bytes.size()).is_greater(0)