feat: complete human-vs-human gameplay end to end

This commit is contained in:
2026-08-29 21:31:21 +03:00
parent e77d9d62c7
commit 650ade2726
7 changed files with 237 additions and 13 deletions
+13 -2
View File
@@ -738,7 +738,7 @@ If all criteria pass, set this milestone to `DONE`, append its execution record,
## Milestone 014 — Complete human-vs-human gameplay end to end
**Status:** `READY`
**Status:** `DONE`
**Depends on:** Milestone 013
### Objective
@@ -765,11 +765,22 @@ Integrate and prove the complete two-device human-vs-human journey before enabli
If all criteria pass, set this milestone to `DONE`, append its execution record, and change Milestone 015 from `BLOCKED` to `READY`.
### Execution record
- Date: 2026-08-29
- Board model and revision: ESP32-C6FH4 QFN32, revision v0.2.
- Toolchain and library versions: PlatformIO Core 6.1.19; `espressif32` 7.0.1; ESP-IDF 6.0.1; `esp_littlefs` 1.20.4.
- Result: PASS for automated integration verification; pending physical two-device confirmation.
- Evidence: The role-safe state contract now identifies sunk hits, exposes the authoritative winner after completion, and carries compact per-player match statistics. The Russian result screen renders these values. Added a deterministic host integration journey through the actual HTTP command path: two player joins, spectator join, role-safe board filtering, player and spectator token resume before and during the game, a complete generated human-versus-human game, turn handoff after a miss, all ten ships sunk, finish/revealed boards/statistics, dual rematch confirmation with a new game ID, and disconnected-player abort. Existing state serialization coverage also exercises maximum statistics values within the fixed message buffer.
- Measurements: `make -C test/host run` passed command queue, domain, bot, lifecycle, state-presenter, HTTP API, synchronization, and the new human-game integration suites. `node --check data/app.js`, gzip integrity checks, and compressed JavaScript syntax checks passed. Compressed/source web assets total 31,909 B. `pio run -e esp32-c6-devkitm-1 -t buildfs` and `pio run -e esp32-c6-devkitm-1` passed; firmware uses 39,348 / 327,680 B RAM (12.0%) and 1,015,002 / 2,097,152 B flash (48.4%).
- Issues or deviations: No firmware upload or physical client testing was performed. The two-phone full-game, real Wi-Fi/WebSocket reconnect, and browser-rendered spectator checks remain required device validation steps.
- Next action: Milestone 015 is ready. Do not start it unless explicitly requested.
---
## Milestone 015 — Complete human-vs-ESP32 gameplay and cumulative statistics
**Status:** `BLOCKED`
**Status:** `READY`
**Depends on:** Milestone 014
### Objective