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:
2026-11-21 15:43:08 +01:00
parent fd711de152
commit fcd90529b6
142 changed files with 1111 additions and 242 deletions
+4 -4
View File
@@ -34,13 +34,13 @@ Pins used below: treeform/ws `c9c0c7b` (v0.6.0), guzba/whisky `494fb10`, status-
- Only `package.json` in prototype is `client/package.json` (pixi.js, vite, typescript, @types/node). Tools do not import it.
- `ws` npm package: not used and not evaluated.
Sources: [P1] `/home/davide/Projects/GDR/FFF_vtt/prototype-server-vision/tools/lib.mjs`; [P2] `.../tools/smoke.mjs` L9; [P3] `.../tools/leak.mjs`, `.../tools/leakcheck.nim` (under `prototype-server-vision/tools/`); [P4] `prototype-server-vision/devbox.json`; [P5] `prototype-server-vision/client/package.json`.
Sources: [P1] `/home/davide/Projects/GDR/FFF_vtt/docs/archive/prototypes/server-vision/tools/lib.mjs`; [P2] `.../tools/smoke.mjs` L9; [P3] `.../tools/leak.mjs`, `.../tools/leakcheck.nim` (under `docs/archive/prototypes/server-vision/tools/`); [P4] `docs/archive/prototypes/server-vision/devbox.json`; [P5] `docs/archive/prototypes/server-vision/client/package.json`.
## 3. Node availability and deps (b)
- Main `devbox.json` packages: nim 2, nimble, coreutils, gnused, diffutils, gnugrep. No node, no nginx. [M1] `/home/davide/Projects/GDR/FFF_vtt/devbox.json`
- Prototype `devbox.json`: `nodejs: "latest"`, `nginx`, `sqlite`. [P4]
- Prototype `devbox.lock` L300-303: `nodejs@latest` resolved to `nixpkgs 8edc0c7#nodejs_26`, version 26.11.1. [P6] `prototype-server-vision/devbox.lock`
- Prototype `devbox.lock` L300-303: `nodejs@latest` resolved to `nixpkgs 8edc0c7#nodejs_26`, version 26.11.1. [P6] `docs/archive/prototypes/server-vision/devbox.lock`
- System node (outside devbox): v24.22.1, `/run/current-system/sw/bin/node`. Not the devbox version.
- Node `WebSocket` header option: tested by capturing raw upgrade on a local `net` server. Wire request contained `Cookie: sid=abc` and `Origin: https://evil.example`. Test script: `<scratchpad>/nodetest/hdr.mjs`. Node docs for the `headers` option were not checked; behavior is observed, not documented.
- Browser-standard WebSocket has no headers arg; this path depends on Node/undici.
@@ -105,10 +105,10 @@ Pinned upstream (commit links):
- [WH-src] https://github.com/guzba/whisky/blob/494fb1046f5a563defc87ac36b8c62846ee7ea2c/src/whisky.nim (newWebSocket L156, receiveFrame L28)
- [WH-readme] https://github.com/guzba/whisky/blob/494fb1046f5a563defc87ac36b8c62846ee7ea2c/README.md
- [MUM-default] https://github.com/guzba/mummy/blob/01deb1ff694988635c7bf0f24f6088a0bdf6db5d/mummy.nim (newServer defaults L1476-1481: maxMessageLen = 64 KB; enforced L658)
- [SRV-newserver] local `/home/davide/Projects/GDR/FFF_vtt/prototype-server-vision/src/server.nim` L363 (`newServer(handler, wsHandler, workerThreads = 8)`, no maxMessageLen)
- [SRV-newserver] local `/home/davide/Projects/GDR/FFF_vtt/docs/archive/prototypes/server-vision/src/server.nim` L363 (`newServer(handler, wsHandler, workerThreads = 8)`, no maxMessageLen)
- [S-httpclient] local `/nix/store/3y9syv0p41rdaqzddashmdl475l0rbv0-nim-unwrapped-2.2.4/nim/lib/pure/httpclient.nim` L711-724 (getSocket)
- [P1..P6] local files cited in sections 2-3.
- [M1] `/home/davide/Projects/GDR/FFF_vtt/devbox.json`
- Node header test: `<scratchpad>/nodetest/hdr.mjs` (scratch, not committed).
- nimble index (names/URLs only): `/home/davide/Projects/GDR/FFF_vtt/prototype-server-vision/.devbox/nimble/packages_official.json`
- nimble index (names/URLs only): `/home/davide/Projects/GDR/FFF_vtt/docs/archive/prototypes/server-vision/.devbox/nimble/packages_official.json`
- GitHub API metadata: `gh api repos/treeform/ws`, `repos/guzba/whisky`, `repos/status-im/nim-websock`, `repos/niv/websocket.nim` (pushed dates, archived flag).