results: slice 5 test and mutation logs (#20)

This commit is contained in:
2026-11-15 09:35:37 +01:00
parent 91192b36ce
commit ae6054ea94
8 changed files with 2079 additions and 34 deletions
+245 -33
View File
@@ -59,7 +59,7 @@
[OK] history and user_version must agree
[OK] a DB from a newer server is refused, not downgraded
[OK] a failing step rolls back: no DDL, no history, version unchanged
[OK] a slice-2 DB migrates to slice 3: the scene is seeded, players and keys survive
[OK] a slice-2 DB migrates on: the scene is seeded, players and keys survive
[OK] open space is a circle
[OK] wall blocks
[OK] shared endpoint: no leak at the vertex
@@ -179,6 +179,7 @@
[OK] the window slides: the flood fires again only on a fresh ten inside it
[OK] a second connection has its own window
[OK] hello carries proto, role, me and n; an unnamed player's name is null
[OK] a named recipient's hello carries the scene block, and the GM also `extra`
[OK] ack ok carries its result fields and never a code
[OK] a refusal is a static code and no state
[OK] the uniform move refusal carries pos and no code (5.5, T9)
@@ -190,6 +191,56 @@
[OK] exactly n walls, deterministic per seed, seeds differ
[OK] doors are every 10th wall, all closed; walls stay inside the world (+- jitter)
[OK] walls are non-degenerate and axis-ish segments of room-edge length
[OK] 12 characters from the documented alphabet
[OK] freshId never returns an id that is taken
[OK] a name is trimmed, non-empty and free of control characters
[OK] kind is a short free string
[OK] vision_radius is a positive finite number or null
[OK] only a true boolean flag counts
[OK] the range is the token's own radius when it has vision, else the scene default
[OK] the effective radius is the scene default in this slice
[OK] create assigns the id, stores every column and reloads identically
[OK] a controller round-trips, and a move rewrites only the position
[OK] update replaces the whole row and keeps the id
[OK] remove deletes the row; a second remove reports nothing
[OK] player.remove hands the player's tokens to the GM (DESIGN 3.2)
[OK] tokens load in creation order
[OK] an out-of-bounds position writes nothing
[OK] an empty name writes nothing
[OK] the same id is never handed out twice by the caller-supplied taken list
[OK] a lookup by id is exact
[OK] every token, in token order, with controller and both names
[OK] a GM-controlled token shows controller null
[OK] the GM never gets vision polygons or explored cells
[OK] the set of tokens follows the visibility rule
[OK] a player frame carries no GM-only field and no wall-like key
[OK] the controller gets `mine`, the owner bucket and its vision_radius
[OK] a scan of every player frame finds no wall-ish or GM-only key
[OK] the first pass sends the resync order, then nothing changes and nothing is sent
[OK] a token that moved sends one `token` frame with the new position
[OK] leaving view sends `token_gone` once, and never for a token that was never sent
[OK] a token becoming gm_only is taken away from a player who could see it (6.1)
[OK] vision is re-sent only when the polygons change
[OK] a changed wall is enough to re-send vision
[OK] explored full is RLE rows of contiguous columns
[OK] explored fresh is a list of [cx, cy]
[OK] the vision payload uses integer pixels (6.4, Q16 FIXED)
[OK] the hello scene block carries the 6.1 fields and no counts
[OK] only the player's own vision tokens produce one, in token order
[OK] a player with no vision token has no polygons at all
[OK] the polygon is bounded by the token's range, and a closer wall cuts it
[OK] the token's own vision_radius overrides the scene default
[OK] an open door does not block; closing it does (5.1, 5.5)
[OK] the cells under the polygon are explored, and `fresh` reports them once
[OK] moving adds cells and never forgets the old ones
[OK] a closed door hides the cells behind it; opening it adds them
[OK] each player has their own set; nobody shares explored cells (Q9 FIXED)
[OK] the full payload is sorted by row and never contains a cell twice
[OK] ver moves with the polygons and stands still without a change
[OK] a controlled token is always visible, gm_only included
[OK] another token needs to be inside the polygon
[OK] a gm_only token inside the LOS is not visible to anyone else
[OK] a player with no vision token sees only what they control
[OK] the migration seeds scene 1 with the v1 defaults, no walls, next_wall_id 1
[OK] an unknown scene id is not there (the wire answers not-found)
[OK] a point is exactly two finite numbers, ints included
@@ -250,7 +301,7 @@ control: exit=0 expected_failed=0 ok
[FAILED] prototype scene, all tokens, doors closed and opened
[FAILED] random wall fields, cell 32 and 25
[OK] negative control: the oracle notices a missing and an invented cell
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/a/w/tests/tgeometry'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/a/w/tests/tgeometry'
# test exit=1; expected tests failed: 1
[FAILED] rays nudged past a corner: area just beyond a wall end is visible
@@ -294,7 +345,7 @@ a: exit=1 expected_failed=1 ok
[OK] prototype scene, all tokens, doors closed and opened
[OK] random wall fields, cell 32 and 25
[OK] negative control: the oracle notices a missing and an invented cell
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/b/w/tests/tgeometry'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/b/w/tests/tgeometry'
# test exit=1; expected tests failed: 2
[FAILED] '<' apex: ray through the shared tip must not leak
[FAILED] every segment endpoint is a polygon vertex (lower and upper end inclusive)
@@ -339,7 +390,7 @@ b: exit=1 expected_failed=2 ok
[FAILED] prototype scene, all tokens, doors closed and opened
[OK] random wall fields, cell 32 and 25
[OK] negative control: the oracle notices a missing and an invented cell
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/c/w/tests/tgeometry'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/c/w/tests/tgeometry'
# test exit=1; expected tests failed: 2
[FAILED] '<' apex: ray through the shared tip must not leak
[FAILED] every segment endpoint is a polygon vertex (lower and upper end inclusive)
@@ -384,7 +435,7 @@ c: exit=1 expected_failed=2 ok
[OK] prototype scene, all tokens, doors closed and opened
[OK] random wall fields, cell 32 and 25
[OK] negative control: the oracle notices a missing and an invented cell
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/d1/w/tests/tgeometry'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/d1/w/tests/tgeometry'
# test exit=1; expected tests failed: 1
[FAILED] shared vertex: both arms required (mutation d1/d2)
@@ -428,7 +479,7 @@ d1: exit=1 expected_failed=1 ok
[OK] prototype scene, all tokens, doors closed and opened
[OK] random wall fields, cell 32 and 25
[OK] negative control: the oracle notices a missing and an invented cell
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/d2/w/tests/tgeometry'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/d2/w/tests/tgeometry'
# test exit=1; expected tests failed: 1
[FAILED] shared vertex: both arms required (mutation d1/d2)
@@ -470,7 +521,7 @@ d2: exit=1 expected_failed=1 ok
[FAILED] prototype scene, all tokens, doors closed and opened
[FAILED] random wall fields, cell 32 and 25
[FAILED] negative control: the oracle notices a missing and an invented cell
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/e/w/tests/tgeometry'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/e/w/tests/tgeometry'
# test exit=1; expected tests failed: 4
[FAILED] random visibility polygons: identical cell lists
[FAILED] random simple polygons (star-shaped, concave): identical cell lists
@@ -535,7 +586,7 @@ e: exit=1 expected_failed=4 ok
[FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/f/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/f/w/tests/tmoverules'
# test exit=1; expected tests failed: 1
[FAILED] overlapping 10 px off: may leave away from the wall, not cross it, not stay overlapped
@@ -597,7 +648,7 @@ f: exit=1 expected_failed=1 ok
[FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/g/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/g/w/tests/tmoverules'
# test exit=1; expected tests failed: 1
[FAILED] GM: ignores walls, step cap and blocked; bounds still apply
@@ -659,7 +710,7 @@ g: exit=1 expected_failed=1 ok
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/h/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/h/w/tests/tmoverules'
# test exit=1; expected tests failed: 2
[FAILED] corner clipping: path passes the wall end closer than r though both ends are clear
[FAILED] leg of the path inside r of a non-start wall blocks even if start and end are clear
@@ -720,13 +771,13 @@ h: exit=1 expected_failed=2 ok
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/i/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/i/w/tests/tmoverules'
[FAILED] P1: probes longer than the cap get one fixed nack regardless of the scene
[OK] P2: scenes differing only beyond the bound give identical replies over 3000 probes
[OK] P3 negative control: a wall inside the disc IS visible through replies (the harness can fail)
[OK] P4: probing cannot unflag or move a blocked token
[OK] doors beyond the bound: opening or closing them changes no reply
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/i/w/tests/tprobing'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/i/w/tests/tprobing'
# test exit=1; expected tests failed: 2
[FAILED] step cap = scene default without vision, token vision radius with it
[FAILED] P1: probes longer than the cap get one fixed nack regardless of the scene
@@ -789,7 +840,7 @@ i: exit=1 expected_failed=2 ok
[FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/j/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/j/w/tests/tmoverules'
# test exit=1; expected tests failed: 2
[FAILED] wall added within r of the circle (centre not on it) sets blocked; exactly r does not
[FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
@@ -852,7 +903,7 @@ j: exit=1 expected_failed=2 ok
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/k/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/k/w/tests/tmoverules'
# test exit=1; expected tests failed: 2
[FAILED] KEEP: opening one door / removing one wall while another overlaps -> still blocked; last one frees
[FAILED] KEEP: wall update away from one of two overlapping walls keeps blocked
@@ -913,7 +964,7 @@ k: exit=1 expected_failed=2 ok
[FAILED] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/l/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/l/w/tests/tmoverules'
# test exit=1; expected tests failed: 3
[FAILED] GM moves a stuck token clear -> free; to another wall-overlapping spot -> still blocked
[FAILED] GM drops a token inside a wall -> blocked; a door counts only while closed
@@ -977,7 +1028,7 @@ l: exit=1 expected_failed=3 ok
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/m/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/m/w/tests/tmoverules'
# test exit=1; expected tests failed: 3
[FAILED] Q14: a door closed 10 px from a token: pushed to its side, clear by r, not blocked; GM-owned too
[FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b
@@ -1041,7 +1092,7 @@ m: exit=1 expected_failed=3 ok
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/n/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/n/w/tests/tmoverules'
# test exit=1; expected tests failed: 2
[FAILED] push: one side blocked by another wall -> the other side; out of bounds -> the other side
[FAILED] push: both sides invalid -> blocked in place; door open -> free; GM can still move it
@@ -1104,14 +1155,14 @@ n: exit=1 expected_failed=2 ok
[OK] GM manual clear inside a wall: player escapes sideways, cannot cross
[OK] an unrelated wall change elsewhere does not re-block a GM-cleared token
[OK] no escape hatch: a player cannot walk through any wall of a boxed room
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/o/w/tests/tmoverules'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/o/w/tests/tmoverules'
# test exit=1; expected tests failed: 1
[FAILED] push: centre on the door line -> side of the previous position; no history -> left of a->b
o: exit=1 expected_failed=1 ok
## p: token bucket never refills
# diff server/protocol.nim -> mutated copy:
# 218d217
# 223d222
# < r.tokens = min(r.burst, r.tokens + float(elapsed) * r.perSecond / 1000.0)
[OK] a well-formed intent parses and keeps its reqId and node
[OK] reqId boundaries: 0 and 2^31-1 pass, 2^31 and -1 are malformed
@@ -1129,6 +1180,7 @@ o: exit=1 expected_failed=1 ok
[OK] the window slides: the flood fires again only on a fresh ten inside it
[OK] a second connection has its own window
[OK] hello carries proto, role, me and n; an unnamed player's name is null
[OK] a named recipient's hello carries the scene block, and the GM also `extra`
[OK] ack ok carries its result fields and never a code
[OK] a refusal is a static code and no state
[OK] the uniform move refusal carries pos and no code (5.5, T9)
@@ -1137,14 +1189,14 @@ o: exit=1 expected_failed=1 ok
[OK] one wall carries id, a, b, kind, open and flags in the 6.1 shape
[OK] `walls` is the full list plus the scene, `wall` is one upsert, `wall_gone` an id
[OK] the fan-out frames carry no n: the sender stamps it per recipient
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/p/w/tests/tprotocol'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/p/w/tests/tprotocol'
# test exit=1; expected tests failed: 1
[FAILED] refill is continuous at 30/s, capped at the burst
p: exit=1 expected_failed=1 ok
## q: reqId upper bound dropped
# diff server/protocol.nim -> mutated copy:
# 131c131
# 133c133
# < if reqId < 0 or reqId > MaxReqId: return
# ---
# > if reqId < 0: return
@@ -1164,6 +1216,7 @@ p: exit=1 expected_failed=1 ok
[OK] the window slides: the flood fires again only on a fresh ten inside it
[OK] a second connection has its own window
[OK] hello carries proto, role, me and n; an unnamed player's name is null
[OK] a named recipient's hello carries the scene block, and the GM also `extra`
[OK] ack ok carries its result fields and never a code
[OK] a refusal is a static code and no state
[OK] the uniform move refusal carries pos and no code (5.5, T9)
@@ -1172,14 +1225,14 @@ p: exit=1 expected_failed=1 ok
[OK] one wall carries id, a, b, kind, open and flags in the 6.1 shape
[OK] `walls` is the full list plus the scene, `wall` is one upsert, `wall_gone` an id
[OK] the fan-out frames carry no n: the sender stamps it per recipient
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/q/w/tests/tprotocol'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/q/w/tests/tprotocol'
# test exit=1; expected tests failed: 1
[FAILED] reqId boundaries: 0 and 2^31-1 pass, 2^31 and -1 are malformed
q: exit=1 expected_failed=1 ok
## r: malformed flood never fires
# diff server/protocol.nim -> mutated copy:
# 239c239
# 244c244
# < result = f.count >= MalformedFloodLimit and (nowMs - oldest) <= MalformedFloodWindowMs
# ---
# > result = f.count > MalformedFloodLimit and (nowMs - oldest) <= MalformedFloodWindowMs
@@ -1199,6 +1252,7 @@ q: exit=1 expected_failed=1 ok
[FAILED] the window slides: the flood fires again only on a fresh ten inside it
[OK] a second connection has its own window
[OK] hello carries proto, role, me and n; an unnamed player's name is null
[OK] a named recipient's hello carries the scene block, and the GM also `extra`
[OK] ack ok carries its result fields and never a code
[OK] a refusal is a static code and no state
[OK] the uniform move refusal carries pos and no code (5.5, T9)
@@ -1207,7 +1261,7 @@ q: exit=1 expected_failed=1 ok
[OK] one wall carries id, a, b, kind, open and flags in the 6.1 shape
[OK] `walls` is the full list plus the scene, `wall` is one upsert, `wall_gone` an id
[OK] the fan-out frames carry no n: the sender stamps it per recipient
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/r/w/tests/tprotocol'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/r/w/tests/tprotocol'
# test exit=1; expected tests failed: 1
[FAILED] nine malformed frames are tolerated, the tenth closes
@@ -1233,7 +1287,7 @@ r: exit=1 expected_failed=1 ok
[OK] the malformed window is per connection and fires on the tenth frame
[OK] a Pong is recorded on the right connection
[OK] a snapshot hands out every live connection without holding the lock afterwards
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/s/w/tests/tconns'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/s/w/tests/tconns'
# test exit=1; expected tests failed: 1
[FAILED] the frame counter starts at 1 on each connection and is never global
@@ -1267,7 +1321,7 @@ s: exit=1 expected_failed=1 ok
[OK] dot patching: only the given fields change
[OK] unknown ids are not-found, wrong kinds are their own outcome
[OK] the first wall of a fresh scene is id 1, not 0
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/t/w/tests/tworld'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/t/w/tests/tworld'
# test exit=1; expected tests failed: 1
[FAILED] a removal never renumbers and the next add never reuses the id
@@ -1299,7 +1353,7 @@ t: exit=1 expected_failed=1 ok
[OK] dot patching: only the given fields change
[OK] unknown ids are not-found, wrong kinds are their own outcome
[OK] the first wall of a fresh scene is id 1, not 0
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/u/w/tests/tworld'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/u/w/tests/tworld'
# test exit=1; expected tests failed: 1
[FAILED] the id counter survives a reload, even when the newest wall was removed
@@ -1329,7 +1383,7 @@ u: exit=1 expected_failed=1 ok
[OK] dot patching: only the given fields change
[OK] unknown ids are not-found, wrong kinds are their own outcome
[OK] the first wall of a fresh scene is id 1, not 0
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/v/w/tests/tworld'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/v/w/tests/tworld'
# test exit=1; expected tests failed: 1
[FAILED] the id counter survives a reload, even when the newest wall was removed
@@ -1359,7 +1413,7 @@ v: exit=1 expected_failed=1 ok
[OK] dot patching: only the given fields change
[OK] unknown ids are not-found, wrong kinds are their own outcome
[OK] the first wall of a fresh scene is id 1, not 0
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/w/w/tests/tworld'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/w/w/tests/tworld'
# test exit=1; expected tests failed: 1
[FAILED] a wall is never open: the stored row normalizes it
@@ -1389,7 +1443,7 @@ w: exit=1 expected_failed=1 ok
[OK] dot patching: only the given fields change
[OK] unknown ids are not-found, wrong kinds are their own outcome
[OK] the first wall of a fresh scene is id 1, not 0
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/x/w/tests/tworld'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/x/w/tests/tworld'
# test exit=1; expected tests failed: 1
[FAILED] a zero-length wall is invalid and writes nothing
@@ -1419,7 +1473,7 @@ x: exit=1 expected_failed=1 ok
[OK] dot patching: only the given fields change
[OK] unknown ids are not-found, wrong kinds are their own outcome
[OK] the first wall of a fresh scene is id 1, not 0
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/y/w/tests/tworld'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/y/w/tests/tworld'
# test exit=1; expected tests failed: 1
[FAILED] both endpoints must be inside [0,w] x [0,h]; the border itself is allowed
@@ -1447,7 +1501,7 @@ y: exit=1 expected_failed=1 ok
[OK] dot patching: only the given fields change
[FAILED] unknown ids are not-found, wrong kinds are their own outcome
[OK] the first wall of a fresh scene is id 1, not 0
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/z/w/tests/tworld'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/z/w/tests/tworld'
# test exit=1; expected tests failed: 1
[FAILED] unknown ids are not-found, wrong kinds are their own outcome
@@ -1477,9 +1531,167 @@ z: exit=1 expected_failed=1 ok
[OK] dot patching: only the given fields change
[OK] unknown ids are not-found, wrong kinds are their own outcome
[OK] the first wall of a fresh scene is id 1, not 0
Error: execution of an external program failed: '/tmp/fffmut.qQ0jtz/z2/w/tests/tworld'
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/z2/w/tests/tworld'
# test exit=1; expected tests failed: 1
[FAILED] add, update, door set and remove round-trip through a reload
z2: exit=1 expected_failed=1 ok
## aa: the egress ignores LOS, gm_only and ownership
# diff server/views.nim -> mutated copy:
# 93c93
# < if not pv.visibleTo(t, playerId): continue
# ---
# > if false: continue
[OK] every token, in token order, with controller and both names
[OK] a GM-controlled token shows controller null
[OK] the GM never gets vision polygons or explored cells
[FAILED] the set of tokens follows the visibility rule
[OK] a player frame carries no GM-only field and no wall-like key
[OK] the controller gets `mine`, the owner bucket and its vision_radius
[OK] a scan of every player frame finds no wall-ish or GM-only key
[OK] the first pass sends the resync order, then nothing changes and nothing is sent
[OK] a token that moved sends one `token` frame with the new position
[FAILED] leaving view sends `token_gone` once, and never for a token that was never sent
[FAILED] a token becoming gm_only is taken away from a player who could see it (6.1)
[OK] vision is re-sent only when the polygons change
[OK] a changed wall is enough to re-send vision
[OK] explored full is RLE rows of contiguous columns
[OK] explored fresh is a list of [cx, cy]
[OK] the vision payload uses integer pixels (6.4, Q16 FIXED)
[OK] the hello scene block carries the 6.1 fields and no counts
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/aa/w/tests/tviews'
# test exit=1; expected tests failed: 1
[FAILED] the set of tokens follows the visibility rule
aa: exit=1 expected_failed=1 ok
## ab: gm_only ignored by the view rule
# diff server/vision.nim -> mutated copy:
# 99d98
# < if t.gmOnly: return false
[OK] only the player's own vision tokens produce one, in token order
[OK] a player with no vision token has no polygons at all
[OK] the polygon is bounded by the token's range, and a closer wall cuts it
[OK] the token's own vision_radius overrides the scene default
[OK] an open door does not block; closing it does (5.1, 5.5)
[OK] the cells under the polygon are explored, and `fresh` reports them once
[OK] moving adds cells and never forgets the old ones
[OK] a closed door hides the cells behind it; opening it adds them
[OK] each player has their own set; nobody shares explored cells (Q9 FIXED)
[OK] the full payload is sorted by row and never contains a cell twice
[OK] ver moves with the polygons and stands still without a change
[OK] a controlled token is always visible, gm_only included
[OK] another token needs to be inside the polygon
[FAILED] a gm_only token inside the LOS is not visible to anyone else
[OK] a player with no vision token sees only what they control
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/ab/w/tests/tvision'
# test exit=1; expected tests failed: 1
[FAILED] a gm_only token inside the LOS is not visible to anyone else
ab: exit=1 expected_failed=1 ok
## ac: a controlled token is not always visible
# diff server/vision.nim -> mutated copy:
# 98d97
# < if t.owner == playerId: return true
[OK] only the player's own vision tokens produce one, in token order
[OK] a player with no vision token has no polygons at all
[OK] the polygon is bounded by the token's range, and a closer wall cuts it
[OK] the token's own vision_radius overrides the scene default
[OK] an open door does not block; closing it does (5.1, 5.5)
[OK] the cells under the polygon are explored, and `fresh` reports them once
[OK] moving adds cells and never forgets the old ones
[OK] a closed door hides the cells behind it; opening it adds them
[OK] each player has their own set; nobody shares explored cells (Q9 FIXED)
[OK] the full payload is sorted by row and never contains a cell twice
[OK] ver moves with the polygons and stands still without a change
[FAILED] a controlled token is always visible, gm_only included
[OK] another token needs to be inside the polygon
[OK] a gm_only token inside the LOS is not visible to anyone else
[FAILED] a player with no vision token sees only what they control
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/ac/w/tests/tvision'
# test exit=1; expected tests failed: 1
[FAILED] a controlled token is always visible, gm_only included
ac: exit=1 expected_failed=1 ok
## ad: no token_gone when a token leaves the view
# diff server/views.nim -> mutated copy:
# 276c276
# < result.add tokenGoneFrame(id)
# ---
# > discard
[OK] every token, in token order, with controller and both names
[OK] a GM-controlled token shows controller null
[OK] the GM never gets vision polygons or explored cells
[OK] the set of tokens follows the visibility rule
[OK] a player frame carries no GM-only field and no wall-like key
[OK] the controller gets `mine`, the owner bucket and its vision_radius
[OK] a scan of every player frame finds no wall-ish or GM-only key
[OK] the first pass sends the resync order, then nothing changes and nothing is sent
[OK] a token that moved sends one `token` frame with the new position
[FAILED] leaving view sends `token_gone` once, and never for a token that was never sent
[FAILED] a token becoming gm_only is taken away from a player who could see it (6.1)
[OK] vision is re-sent only when the polygons change
[OK] a changed wall is enough to re-send vision
[OK] explored full is RLE rows of contiguous columns
[OK] explored fresh is a list of [cx, cy]
[OK] the vision payload uses integer pixels (6.4, Q16 FIXED)
[OK] the hello scene block carries the 6.1 fields and no counts
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/ad/w/tests/tviews'
# test exit=1; expected tests failed: 1
[FAILED] leaving view sends `token_gone` once, and never for a token that was never sent
ad: exit=1 expected_failed=1 ok
## ae: a player token frame carries the GM-only kind
# diff server/views.nim -> mutated copy:
# 152c152
# < "statuses": [], "props": props
# ---
# > "statuses": [], "props": props, "kind": "npc"
[OK] every token, in token order, with controller and both names
[OK] a GM-controlled token shows controller null
[OK] the GM never gets vision polygons or explored cells
[OK] the set of tokens follows the visibility rule
[FAILED] a player frame carries no GM-only field and no wall-like key
[OK] the controller gets `mine`, the owner bucket and its vision_radius
[FAILED] a scan of every player frame finds no wall-ish or GM-only key
[OK] the first pass sends the resync order, then nothing changes and nothing is sent
[OK] a token that moved sends one `token` frame with the new position
[OK] leaving view sends `token_gone` once, and never for a token that was never sent
[OK] a token becoming gm_only is taken away from a player who could see it (6.1)
[OK] vision is re-sent only when the polygons change
[OK] a changed wall is enough to re-send vision
[OK] explored full is RLE rows of contiguous columns
[OK] explored fresh is a list of [cx, cy]
[OK] the vision payload uses integer pixels (6.4, Q16 FIXED)
[OK] the hello scene block carries the 6.1 fields and no counts
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/ae/w/tests/tviews'
# test exit=1; expected tests failed: 1
[FAILED] a player frame carries no GM-only field and no wall-like key
ae: exit=1 expected_failed=1 ok
## af: explored forgets cells outside the current polygon
# diff server/vision.nim -> mutated copy:
# 72c72
# < for idx in added: pv.explored.incl idx
# ---
# > pv.explored = added
[OK] only the player's own vision tokens produce one, in token order
[OK] a player with no vision token has no polygons at all
[OK] the polygon is bounded by the token's range, and a closer wall cuts it
[OK] the token's own vision_radius overrides the scene default
[OK] an open door does not block; closing it does (5.1, 5.5)
[FAILED] the cells under the polygon are explored, and `fresh` reports them once
[FAILED] moving adds cells and never forgets the old ones
[OK] a closed door hides the cells behind it; opening it adds them
[OK] each player has their own set; nobody shares explored cells (Q9 FIXED)
[OK] the full payload is sorted by row and never contains a cell twice
[OK] ver moves with the polygons and stands still without a change
[OK] a controlled token is always visible, gm_only included
[OK] another token needs to be inside the polygon
[OK] a gm_only token inside the LOS is not visible to anyone else
[OK] a player with no vision token sees only what they control
Error: execution of an external program failed: '/tmp/fffmut.EhcyMp/af/w/tests/tvision'
# test exit=1; expected tests failed: 1
[FAILED] moving adds cells and never forgets the old ones
af: exit=1 expected_failed=1 ok
exit=0