feat(walls): door refusals and secret/locked equivalence gate (#56)

- door.set: opening a secret or locked door is invalid; closing either is
  allowed; a fixed window/non-door still has no open state.
- new tools/doors.test.mjs: two fresh servers, one identical script, three
  equivalence pairs (secret/wall, secret+locked/wall, locked/closed door),
  canonicalised frame + full per-player tile sweeps, an open-door positive
  control and a pinned zero-thickness close-push.
- secretgap fault hook (sight-only) makes the pair fail as exactly SECRETGAP;
  the clean pair passes and the shipped binary carries no fault hook.
- docs/TESTING.md T2/T17 and the door-equivalence/10.3 sections: built.

Ref #56
This commit is contained in:
2026-11-19 22:49:39 +01:00
parent 484275e8bb
commit 0f3aa2300f
6 changed files with 459 additions and 27 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ proc cellOf*(sc: SceneRec, idx: int): (int, int) =
proc computePolys*(sc: SceneRec, tokens: seq[TokenRec], playerId: int): seq[Poly] =
## One polygon per token of this player that has vision, in token order (a stable wire order).
if playerId <= 0: return
let walls = geometryWalls(sc)
let walls = geometryWalls(sc, forSight = true)
for t in tokens:
if t.owner != playerId or not t.hasVision: continue
result.add Poly(tokenId: t.id,