M4: finish — e2e audit, measurement and archive #76

Closed
opened 2026-11-20 22:31:45 +01:00 by SirStone · 1 comment
Owner

Part of #63

Goal

Full headless suite plus the independent traffic audit as a gate; record the 50-token measurement; archive the prototype clients; mark M4 done.

Acceptance criteria

  • devbox run e2e covers join, fog probes, drag+rollback, reconnect
  • Audit clean
  • test, mutation, bench green
  • results/m4-fog-bench.md records numbers
  • Prototypes archived (Q24)
  • DESIGN 13 M4 marked done
  • No polygon-cache work unless the measurement says so (then a follow-up ticket)
  • Standing gate: full devbox run test green on a clean checkout, no test weakened or skipped, and the behaviour above proven at the seam(s) listed under "Proven at".

User stories covered

  • 62 — As the owner, I want an automated browser test that proves join, fog pixels, drag and rollback, and reconnect, so that M4 regressions are caught without a phone.
  • 63 — As the owner, I want the player browser's own traffic audited for wall and other-player data, so that the client cannot quietly become a leak.
  • 65 — As the owner, I want the prototype clients archived once the real client exists, so that there is one client to maintain.

Proven at

e2e + audit, docs, devbox gate

Notes

  • Size: M (about one agent session, ~100K tokens). Lane: Z (finish).
Part of #63 ## Goal Full headless suite plus the independent traffic audit as a gate; record the 50-token measurement; archive the prototype clients; mark M4 done. ## Acceptance criteria - [ ] `devbox run e2e` covers join, fog probes, drag+rollback, reconnect - [ ] Audit clean - [ ] `test`, `mutation`, `bench` green - [ ] `results/m4-fog-bench.md` records numbers - [ ] Prototypes archived (Q24) - [ ] DESIGN 13 M4 marked done - [ ] No polygon-cache work unless the measurement says so (then a follow-up ticket) - [ ] Standing gate: full `devbox run test` green on a clean checkout, no test weakened or skipped, and the behaviour above proven at the seam(s) listed under "Proven at". ## User stories covered - 62 — As the owner, I want an automated browser test that proves join, fog pixels, drag and rollback, and reconnect, so that M4 regressions are caught without a phone. - 63 — As the owner, I want the player browser's own traffic audited for wall and other-player data, so that the client cannot quietly become a leak. - 65 — As the owner, I want the prototype clients archived once the real client exists, so that there is one client to maintain. ## Proven at e2e + audit, docs, devbox gate ## Notes - Size: M (about one agent session, ~100K tokens). Lane: Z (finish).
SirStone added the ready-for-agentenhancement labels 2026-11-20 22:31:45 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
SirStone added a new dependency 2026-11-20 22:31:46 +01:00
Author
Owner

Implemented and pushed to main as fcd9052 (#76).

Gate audit — every M4 item has a named passing test or a recorded measurement

M4 gate item Proof Result
Join, fog pixel probes, drag + rollback, reconnect client/e2e/shell.test.mjs, fog.test.mjs, drag.test.mjs, session.test.mjs pass
Player traffic audit (own WS/HTTP) client/e2e/audit.test.mjs + -d:leakfault/otherVision negative control pass (26 clean)
devbox run test Nim suite 419 OK + 159 Node harness tests + group evidence exit 0
devbox run client-test 164 Vitest tests exit 0
devbox run e2e 27/27 (incl. audit and 50-token measurement) exit 0
devbox run mutation control + 80 mutations, each fails its expected test exit 0
devbox run bench both targets PASS exit 0
50 tokens on 16384 px, fog active results/m4-fog-bench.md + .log; server move path 0.12-0.14 ms recorded; headless SwiftShader cadence 70-78 ms median — explicitly not a phone number
Prototypes archived (Q24) docs/archive/prototypes/ (frozen; README maps their measurements) done
DESIGN §13 M4 done DESIGN §13 + TESTING §13 M4 accept result + docs/HANDOFF-M4.md done
No polygon-cache work measurement: 0.12-0.14 ms vs 16.7 ms frame budget → no follow-up ticket done

Gaps found and filled

  • The independent audit did not exist; the old "leak scan" was a second raw WS, not the browser's own traffic. New file keeps its own frame catalogue and banned-key list (never imports leakcheck.nim) and proves it can fail against a real injected leak.
  • No 16384 px measurement existed (only 4096 with a "scales ~16x" note). Added tools/fogbench.nim (devbox run fogbench) and client/e2e/fogbench.test.mjs; both numbers are recorded honestly as SwiftShader/server, with the phone authority delegated to #77.
  • Mutation c1/c2 had silently become sed no-ops when #65 changed the tile-gate expression. Repointed; both fail the tile gate group again (80/80 green).
  • Prototypes moved under docs/archive/prototypes/; all live doc/comment paths updated.

Spec #63 story sweep: stories 1-70 each map to a closed ticket/test; 62/63/65 are this ticket, 64 is #77 (open human gate by design). No uncovered story.

Still open by design: #77 (real-phone playtest). #63/#62 close after it.

Gates run sequentially on the rebased tree; no test skipped or weakened.

Implemented and pushed to `main` as `fcd9052` (#76). **Gate audit — every M4 item has a named passing test or a recorded measurement** | M4 gate item | Proof | Result | |---|---|---| | Join, fog pixel probes, drag + rollback, reconnect | `client/e2e/shell.test.mjs`, `fog.test.mjs`, `drag.test.mjs`, `session.test.mjs` | pass | | Player traffic audit (own WS/HTTP) | `client/e2e/audit.test.mjs` + `-d:leakfault`/`otherVision` negative control | pass (26 clean) | | `devbox run test` | Nim suite 419 OK + 159 Node harness tests + group evidence | exit 0 | | `devbox run client-test` | 164 Vitest tests | exit 0 | | `devbox run e2e` | 27/27 (incl. audit and 50-token measurement) | exit 0 | | `devbox run mutation` | control + 80 mutations, each fails its expected test | exit 0 | | `devbox run bench` | both targets PASS | exit 0 | | 50 tokens on 16384 px, fog active | `results/m4-fog-bench.md` + `.log`; server move path **0.12-0.14 ms** | recorded; headless SwiftShader cadence 70-78 ms median — explicitly **not** a phone number | | Prototypes archived (Q24) | `docs/archive/prototypes/` (frozen; README maps their measurements) | done | | DESIGN §13 M4 done | DESIGN §13 + TESTING §13 M4 accept result + `docs/HANDOFF-M4.md` | done | | No polygon-cache work | measurement: 0.12-0.14 ms vs 16.7 ms frame budget → no follow-up ticket | done | **Gaps found and filled** - The independent audit did not exist; the old "leak scan" was a second raw WS, not the browser's own traffic. New file keeps its own frame catalogue and banned-key list (never imports `leakcheck.nim`) and proves it can fail against a real injected leak. - No 16384 px measurement existed (only 4096 with a "scales ~16x" note). Added `tools/fogbench.nim` (`devbox run fogbench`) and `client/e2e/fogbench.test.mjs`; both numbers are recorded honestly as SwiftShader/server, with the phone authority delegated to #77. - Mutation `c1`/`c2` had silently become `sed` no-ops when #65 changed the tile-gate expression. Repointed; both fail the tile gate group again (80/80 green). - Prototypes moved under `docs/archive/prototypes/`; all live doc/comment paths updated. **Spec #63 story sweep:** stories 1-70 each map to a closed ticket/test; 62/63/65 are this ticket, 64 is #77 (open human gate by design). No uncovered story. **Still open by design:** #77 (real-phone playtest). #63/#62 close after it. Gates run sequentially on the rebased tree; no test skipped or weakened.
Sign in to join this conversation.