test(m4): finish audit, measurement and archive (#76)
- client/e2e/audit.test.mjs: independent player-browser traffic audit (own frame catalogue and banned-key list, never leakcheck.nim), with a -d:leakfault/otherVision negative control. - client/e2e/fogbench.test.mjs + tools/fogbench.nim: 50 tokens on a 16384 px map (server move path and headless SwiftShader cadence); results/m4-fog-bench.md records both honestly (SW is not the phone gate). - Archive prototype-* under docs/archive/prototypes (Q24); DESIGN 13 M4 done, TESTING 13 M4 accept result, HANDOFF-M4 close-out. - mutation.sh c1/c2 patch the post-#65 tile-gate line again (they had silently become sed no-ops).
This commit is contained in:
@@ -73,6 +73,21 @@ change them only if a slice needs a new *core* event, and say so in the PR.
|
||||
- No game data (and no Pixi `Application`) exists before a live `hello`; a visitor without a session
|
||||
only sees the sign-in page.
|
||||
|
||||
## Traffic audit and the M4 measurement (T13, #76)
|
||||
|
||||
- **Traffic audit** (`e2e/audit.test.mjs`) is the independent proof that the player browser cannot
|
||||
become a leak. It records the page's own WebSocket frames and HTTP responses and applies its own
|
||||
rules: only the 13 player frame types; no wall field and no GM-only token column at any depth; no
|
||||
other player's id and no token outside the player's sight; vision polygons only for controlled
|
||||
tokens; explored cells only inside a historical own-vision bbox; tiles only under `/tiles/`, only
|
||||
200/403, every served tile covering an explored cell, and `/_tiles/` unreachable. The banned-key
|
||||
list is written in the test, never imported from `tools/leakcheck.nim`, so the proof is independent
|
||||
of the server's own list. A second test is the negative control: the same rules run against a
|
||||
`-d:leakfault` build with `LEAK_FAULT=otherVision` and must catch the injected foreign polygon.
|
||||
- **50-token measurement**: the server half is `tools/fogbench.nim` (`devbox run fogbench`, 16384 px,
|
||||
50 tokens, ~5k walls); the headless half is `e2e/fogbench.test.mjs`. Numbers and the honest caveat
|
||||
(SwiftShader is a floor, not a phone) are in `results/m4-fog-bench.md`. The real 60 fps run is #77.
|
||||
|
||||
## Name, badge and reconnect (T5, #68)
|
||||
|
||||
- **First sign-in name prompt.** A live player with `me.name === null` gets the `#name` section
|
||||
|
||||
Reference in New Issue
Block a user