feat(walls): one-way sight per-viewer filter and ONEWAY fault (#58)
The vision fan blocks a sight-blocking one-way wall only for a viewer on its blind side (sight_dir names it; left is the (-dy,dx) normal of a->b), one sign test inline after the radius cull, so the hoisted wall list stays viewer-independent. Movement never reads the direction: one-way walls block both ways. Explored and tiles therefore differ by side and only ever grow. - geometry: WallDir + Wall.sightDir + blindTo, filter in visibilityPolygon. - worldmap: sight_dir mapping (movement mapping unchanged). - vision: the ONEWAY leak-fault build drops sight_dir player-side. - leakcheck: own side test for the fan and the clear-segment oracle; ONEWAY class detected against the sight_dir-dropped fan. - leak scenario gains a one-way wall the subject sees across; fault test asserts exactly ONEWAY. - oneway.test.mjs: both sides, tile sweep with its own oracle, flip with fixed endpoints, monotone explored/tiles, restart, two-way movement. - docs: DESIGN 5.8 mechanism sentence corrected; TESTING #58 markers built. - nginx harness: temp dirs created recursively (restart on one state dir).
This commit is contained in:
+19
-13
@@ -226,6 +226,9 @@ How to run: `devbox run test` = Nim in-process tests first, then the Node black-
|
||||
(§10.3, DESIGN §3.4 T17, #46).
|
||||
- A wall `label` is in the leak checker's `BannedAlways` key scan (§10.3), so a player frame carrying
|
||||
`label` is `WALLDATA`.
|
||||
- One-way sight (built, #58): the two sides, the direction flip, monotone explored/tiles and the
|
||||
restart are proven by `tools/oneway.test.mjs`; the checker's own side test and the `ONEWAY` fault
|
||||
are in §10.3.
|
||||
|
||||
### 5.9 Low walls: see-over
|
||||
|
||||
@@ -347,10 +350,10 @@ 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`, `KEY_IN_LOG`. Walls r1 built: `secretgap` (#56), asserted
|
||||
as exactly `SECRETGAP` by `tools/doors.test.mjs` (the differential group, not the transcript
|
||||
checker). Planned: Walls r1 — `ONEWAY` (#58), `MARKER_EARLY`/`MARKER_EXTRA`/`MARKER_OFF`
|
||||
(#59/#60). `tools/leakcheck.nim`
|
||||
`CONTROLLER_CHANGE`, `CHAR_OWNER_PROP`, `KEY_IN_LOG`, `ONEWAY` (#58). Walls r1 built: `secretgap`
|
||||
(#56), asserted as exactly `SECRETGAP` by `tools/doors.test.mjs` (the differential group, not the
|
||||
transcript checker). Planned: Walls r1 — `MARKER_EARLY`/`MARKER_EXTRA`/`MARKER_OFF` (#59/#60).
|
||||
`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
|
||||
@@ -422,19 +425,22 @@ 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; planned: Walls r1 #58)**: `tools/leakcheck.nim` and the independent
|
||||
- **One-way direction (#47; built: 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`
|
||||
is dropped for everyone. Assertions: a token on the blind side gets no polygon point, explored cell
|
||||
or tile beyond the wall, and a token across it gives no `token` frame, no name and no encountered
|
||||
entry; a viewer on the seeing side does see across (the positive control, so the oracle can fail).
|
||||
`a -> b`, positive = left — never by calling `vision.nim`: a sight-blocking one-way wall stays in
|
||||
the oracle's wall list only for a viewer on its blind side (the side `sight_dir` names), and a
|
||||
wall that is `blocks_sight:false` is dropped for everyone. Assertions: a token on the blind side
|
||||
gets no polygon point, explored cell or tile beyond the wall, and a token across it gives no
|
||||
`token` frame, no name and no encountered entry; a viewer on the seeing side does see across (the
|
||||
positive control, so the oracle can fail). `tools/oneway.test.mjs` runs the two sides, the
|
||||
`sight_dir` flip with fixed endpoints, the monotone explored/tile set across flips and a restart,
|
||||
and the per-tile sweep with the same own side test.
|
||||
Tolerances as elsewhere: the 0.5 px boundary band along the blind side is oracle-*maybe* (a `200`
|
||||
there is legitimate, but never *sure*), and anything clearly behind the blind wall is
|
||||
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.
|
||||
oracle-refused (a withheld proof cell still fails). Fault class `ONEWAY` (built) — the
|
||||
player-facing computation drops `sight_dir`, so the one-way wall becomes two-way — with its
|
||||
injected fault (`LEAK_FAULT=oneWay`) and exact-class assertion, shaped like the existing classes.
|
||||
- **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
|
||||
|
||||
Reference in New Issue
Block a user