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
+3 -2
View File
@@ -25,12 +25,13 @@ export function assertClientBuild() {
)
}
export async function withStack(fn) {
export async function withStack(fn, opts = {}) {
assertClientBuild()
const stateDir = makeStateDir()
const gmKey = gmKeyOf(stateDir)
if (opts.prepare) await opts.prepare(stateDir, gmKey)
const nginxPort = await freePort()
const server = await startServer({ stateDir, publicOrigin: httpsBaseUrl(nginxPort) })
const server = await startServer({ stateDir, publicOrigin: httpsBaseUrl(nginxPort), ...(opts.server ?? {}) })
let nginx
try {
nginx = await startTestNginx({