feat: prove real-time transport, fallback, and state isolation

This commit is contained in:
2026-08-28 00:35:27 +03:00
parent 0619c6be9c
commit ef141358e7
4 changed files with 174 additions and 3 deletions
+13 -2
View File
@@ -218,7 +218,7 @@ If all criteria pass, set this milestone to `DONE`, append its execution record,
## Milestone 003 — Prove real-time transport, fallback, and state isolation
**Status:** `IN PROGRESS`
**Status:** `DONE`
**Depends on:** Milestone 002
### Objective
@@ -253,11 +253,22 @@ If the asynchronous server library is unstable with the pinned Arduino Core, rep
If all criteria pass, set this milestone to `DONE`, append its execution record, and change Milestone 004 from `BLOCKED` to `READY`.
### Execution record
- Date: 2026-08-28
- Board model and revision: ESP32-C6FH4 QFN32, revision v0.2; carrier board remains an unidentified SuperMini-style ESP32-C6 Mini.
- Toolchain and library versions: PlatformIO Core 6.1.19; `espressif32` 7.0.1; ESP-IDF 6.0.1; ESP-IDF built-in `esp_http_server` WebSocket support; pinned `esp_littlefs` 1.20.4.
- Result: PASS
- Evidence: Enabled `CONFIG_HTTPD_WS_SUPPORT` and added `/ws` plus versioned `GET /api/state?role=...`. The server holds only a monotonic public counter and version; role-specific payloads contain only `version`, `public_counter`, and `viewer`, never simulated hidden state. WebSocket text frames are capped at 64 bytes. The browser retries WebSocket after 1, 2, 5, and 10 seconds and polls `/api/state` every 2 seconds while disconnected. Firmware and LittleFS were flashed with hashes verified. A LAN WebSocket client received consecutive spectator frames for versions 3 and 4, and the player HTTP state response contained only public fields.
- Measurements: Build used 37,212 / 327,680 bytes RAM (11.4%) and 997,224 / 2,097,152 bytes flash (47.6%).
- Issues or deviations: `pio test -e esp32-c6-devkitm-1 --without-uploading` errored because `test/` contains no test suite. On 2026-08-28, the user confirmed completion of the four-client delivery, forced WebSocket interruption/fallback/recovery, malformed and oversized frame, role-payload inspection, and 30-minute stability checks; their physical observations are accepted as the required evidence.
- Next action: Milestone 004 is ready but is not started as part of this task.
---
## Milestone 004 — Prove MVP capacity and make the Go/No-Go decision
**Status:** `BLOCKED`
**Status:** `READY`
**Depends on:** Milestone 003
### Objective