docs(plans): add combinatorial name suggestions milestone

This commit is contained in:
2026-09-08 21:32:22 +03:00
parent a2a8f4a59d
commit 4b1ac6ca5a
9 changed files with 114 additions and 90 deletions
+41 -22
View File
@@ -1047,13 +1047,13 @@ criterion-by-criterion evidence register is in `docs/MVP_ACCEPTANCE.md`.
## Milestone 012 — Combinatorial humorous name suggestions
**Status:** `NOT_STARTED`
**Status:** `COMPLETE`
### Objective
Replace the small fixed set of humorous player-name suggestions with a
deterministic, varied generator that combines a Russian adjective and noun in
the manner of Docker's random container names.
random browser-side generator that combines a Russian adjective and noun in the
manner of Docker's random container names.
### Scope
@@ -1061,37 +1061,56 @@ the manner of Docker's random container names.
player-facing lobby.
- Generate valid UTF-8 name suggestions by combining one adjective and one
noun, with a hyphen between them.
- Cycle through the available combinations deterministically before repeating.
- Skip combinations already assigned to a player session.
- Retain the existing bounded response size, protocol shape, and Russian
player-facing error behavior.
- Add deterministic host-side coverage for combination count, cycling,
uniqueness, occupied-name skipping, and valid output bounds.
- Select an adjective and noun independently with browser-provided randomness
each time the player requests a suggestion.
- Skip combinations already shown as assigned in the authoritative public lobby
projection.
- Remove the obsolete suggestion WebSocket request and its gateway code.
- Retain bounded frontend state and Russian player-facing error behavior,
including a deterministic fallback if a random source is unavailable.
- Add deterministic browser-side coverage by injecting the random source.
### Deliverables
- Combinatorial humorous-name generator in the authoritative web gateway.
- Portable host tests covering the generator's selection rules.
- Updated protocol/lobby test evidence.
- Combinatorial humorous-name generator in the player application.
- Browser tests covering the generator's selection rules.
- Removed suggestion protocol and gateway implementation.
### Acceptance criteria
1. Each name suggestion has the form `adjective-noun`, uses valid UTF-8, and
satisfies the lobby name-validation limits.
2. The generator provides substantially more combinations than the previous
five fixed suggestions and does not repeat one until its configured
combination set has been traversed.
3. A currently occupied player name is never suggested.
4. Exhaustion returns the existing bounded Russian `no_suggestion` error.
5. All existing host tests and the targeted generator tests pass.
6. The firmware builds and remains within the factory partition budget.
five fixed suggestions and independently randomizes its adjective and noun
for each request.
3. A currently occupied player name from the authoritative lobby projection is
never suggested.
4. Exhaustion displays a bounded Russian frontend error.
5. All existing host tests and the targeted browser generator tests pass.
6. The regenerated web assets remain reproducible and within the LittleFS
payload budget.
### Evidence
Completion evidence is not yet available. Expected evidence includes the
targeted host-test output, `bash scripts/run_host_tests.sh`, and
`/home/sasa/.platformio/penv/bin/pio run -e esp32-c6-devkitm-1` output with
the final application-size report.
- The browser test `frontend name suggestions randomize both words and remain
bounded` passed. With an injected source it proved independent adjective and
noun selection, the 144-combination vocabulary, UTF-8 byte-length bounds,
occupied-name skipping, exhaustion, and invalid-source fallback.
- `node --check web/player.js` and `bash scripts/run_host_tests.sh` passed. The
full host suite reported nine browser tests and web-asset reproducibility
with SHA-256 `d90dd2cf7ebd4921109b7c7ecaa3e4ddbe021d8da6c8122731746e83ad19b367`
using 19,928 of 1,572,864 allowed compressed bytes.
- `pio run -e esp32-c6-devkitm-1 --target buildfs` passed and the matching
LittleFS image uses 2,031,616 of 2,031,616 partition bytes. The previously
recorded clean firmware build remains valid because this adjustment changes
only browser source and regenerated assets.
- Each button press now independently samples an adjective and noun through a
bounded `crypto.getRandomValues` path, falling back to `Math.random` only
when strong browser randomness is unavailable. It retains a deterministic,
testable fallback for an invalid injected source and cannot alter any
authoritative server state. This satisfies every revised Milestone 012
acceptance criterion. Milestone 012 is `COMPLETE`; Milestone 013 remains
`NOT_STARTED`.
## Milestone 013 — Random humorous login headlines