diff --git a/docs/TESTING.md b/docs/TESTING.md index 6c469fc..e69eabc 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -60,7 +60,7 @@ How to run: `devbox run test` = Nim in-process tests first, then the Node black- | # | Proving test | |---|---| | T1 | leak test + fault classes | -| T2 | fault `walls` [MEASURED caught]; `MARKER_EARLY`/`MARKER_EXTRA`/`MARKER_OFF` (§10.3); door-equivalence test (T17, §10.3) | +| T2 | fault `walls` [MEASURED caught]; `MARKER_EARLY`/`MARKER_EXTRA`/`MARKER_OFF` (§10.3) — planned: Walls r1 #59/#60; door-equivalence test (T17, §10.3) — planned: Walls r1 #56 | | T3 | faults `other-*` [MEASURED caught] | | T4 | leak (d) against the independent oracle, smoke steal check, direct `/_tiles/` -> 404 (M3 test nginx) | | T5 | documented, not testable as a leak; M4 timing gates (§13) | @@ -75,7 +75,7 @@ How to run: `devbox run test` = Nim in-process tests first, then the Node black- | T14 | leak test | | T15 | deploy check | | T16 | fault classes `ACTUAL_NAME`, `CHAR_LIST` (§10.3) | -| T17 | differential door-equivalence test `tools/doors.test.mjs` (§10.3, #46), positive control on an open door, fault `secretgap`, door-key scan in `tools/leakcheck.nim` -> `WALLDATA` | +| T17 | differential door-equivalence test `tools/doors.test.mjs` (§10.3, #46), positive control on an open door, fault `secretgap`, door-key scan in `tools/leakcheck.nim` -> `WALLDATA` — planned: Walls r1 #56 | --- @@ -347,8 +347,9 @@ from the prototype, what was missing, what the M3 build added, and the tools it exact-class assertion; the shipped binary must contain no `LEAK_FAULT`. Built: `HIDDEN_TOKEN`, `GMONLY_TOKEN`, `WALLDATA`, `WITHHELD`, `NO_REMOVE`, `OWN_VIEW`, `OTHER_PLAYER`, `EXPLORED`, `OWNER_PROP`, `GM_PROP`, `STATUS_SOURCE`, `ACTUAL_NAME`, `STALE_NAME`, `CHAR_LIST`, - `CONTROLLER_CHANGE`, `CHAR_OWNER_PROP`, `MARKER_EARLY`, `MARKER_EXTRA`, `MARKER_OFF`, `ONEWAY`, - `KEY_IN_LOG`, `secretgap`. `tools/leakcheck.nim` refuses the `gm` bucket, the `owner` bucket on a + `CONTROLLER_CHANGE`, `CHAR_OWNER_PROP`, `KEY_IN_LOG`. Planned: Walls r1 — `ONEWAY` (#58), + `MARKER_EARLY`/`MARKER_EXTRA`/`MARKER_OFF` (#59/#60), `secretgap` (#56). `tools/leakcheck.nim` + refuses the `gm` bucket, the `owner` bucket on a non-controller and any `source` on a player status entry. Two consequences: the `hidden` and `gmOnly` faults also produce `NO_REMOVE` (a leaked token whose frame never changes leaves the client holding it with no correcting message, indistinguishable from a withheld `token_gone`; both @@ -378,7 +379,8 @@ from the prototype, what was missing, what the M3 build added, and the tools it - **Probing test (T8)**: M2, in-process against the move-rules module (DESIGN §5.5): arbitrary far moves; assertion: facts about walls/doors beyond LOS recoverable from replies <= a bounded amount (step cap), and uniform nack shape. M3: same test over WS with a hostile client (moved from M2). -- **Door equivalence (#46, T17)**: `tools/doors.test.mjs` is the accept group for the "a player cannot +- **Door equivalence (#46, T17)** — planned: Walls r1 #56; `tools/doors.test.mjs` is not built yet. It + will be the accept group for the "a player cannot tell a secret or locked door from a wall" obligation DESIGN §5.8 states. Node harness, built-ins only (10.4), shaped like `tools/probing.test.mjs`: two servers, fresh state, two scenes identical except one segment, one identical scripted sequence. Pairs: (i) solid `wall` vs a closed `door` with @@ -415,7 +417,8 @@ from the prototype, what was missing, what the M3 build added, and the tools it thick locked door vs thick plain door), byte-identical. Also pinned: a fixed window and an open door never push, and no wall edit pushes. **Mutations:** push from the drawn line; push ignoring the normal span; ambiguous side ignoring `prev`; validity check on the door only — each fails at least one test. -- **One-way direction (#47)**: `tools/leakcheck.nim` and the independent explored/tile oracle apply +- **One-way direction (#47; planned: Walls r1 #58)**: `tools/leakcheck.nim` and the independent + explored/tile oracle apply **their own** side test — sign of the cross product of `viewer - a` with the `(-dy, dx)` normal of `a -> b`, positive = left — never by calling `vision.nim`: a sight-blocking one-way wall is dropped from the oracle's wall list for a viewer on its blind side, and a wall that is `blocks_sight:false` @@ -427,8 +430,9 @@ from the prototype, what was missing, what the M3 build added, and the tools it oracle-refused (a withheld proof cell still fails). New fault class `ONEWAY` — the player-facing computation drops `sight_dir` and lets the blind side see across — with its injected fault and exact-class assertion, shaped like the existing classes. -- **Player marker (#48; shape fixed by #49).** `leakcheck.nim` allows the `marker` type and, with its - own code (never calling `vision.nim`), checks that a marker exists for a player exactly when some +- **Player marker (#48; shape fixed by #49; planned: Walls r1 #59/#60).** Once planned Walls r1 #59 + lands, `leakcheck.nim` allows the `marker` type and, with its own code (never calling `vision.nim`), + checks that a marker exists for a player exactly when some point of the wall's visible extent has entered that player's polygon **and** the wall is `player_marker:true` and derives `window`, and that the frame carries only the opaque marker id and the anchor: anything else is `WALLDATA`/`MARKER_EXTRA`. Positive control: a window in the open yields @@ -439,7 +443,8 @@ from the prototype, what was missing, what the M3 build added, and the tools it - **Wall fields, storage and migration (#49).** Three gates. **Leak:** `BannedAlways` contains every wall field name (`thickness`, `position`, `height`, `blocks_sight`, `blocks_movement`, `sight_dir`, `player_marker`, `door`, `open`, `secret`, `locked`, `label`, `a`, `b`), so any of them in a player - frame is `WALLDATA`; `marker` is an allowed server type with its own oracle; positive control: a wall + frame is `WALLDATA`; `marker` is an allowed server type with its own oracle (planned: Walls r1 #59); + positive control: a wall `height` injected into a player `token` frame fails with exactly `WALLDATA`. **Migration:** a schema-7 fixture (both wall kinds, an open door, non-empty `flags`, tokens and a character with props) migrates under the real binary, every decoded row equals the DESIGN §4.4 mapping, `props_gm.height`