feat(walls): marker retraction, re-earn and marker fault classes (#60)

Retract a player marker when the GM removes the wall, clears
player_marker, makes the wall stop deriving window, or moves its
geometry (a/b, thickness, position). Retraction emits del only and
never the new anchor; a re-earned marker gets a fresh id. The
marker_seen deletes ride the same derived-memory NORMAL transaction as
the explored chunks, after the wall row commits and before the ack.

Replace the leak checker's aggregate MARKER class with MARKER_EARLY,
MARKER_EXTRA and MARKER_OFF, add their leakfault hooks and exact-class
fault tests, and extend the leak scenario with an unseen marked window
and a marked solid wall as the negative controls. WS black-box tests
cover all four causes, fresh re-earns, no untouched re-send, no
set/del for one id in a frame, no explored write from a retraction,
and delete/cascade durability across a restart.
This commit is contained in:
2026-11-19 23:43:44 +01:00
parent edd4437f7e
commit c3c0a39188
9 changed files with 425 additions and 60 deletions
+5 -1
View File
@@ -5,7 +5,8 @@
//
// Classes: HIDDEN_TOKEN, GMONLY_TOKEN, WALLDATA, WITHHELD, NO_REMOVE, OWN_VIEW, OTHER_PLAYER,
// EXPLORED, from slice 7 (#22) OWNER_PROP, GM_PROP, STATUS_SOURCE, and from slice 8 (#23)
// ACTUAL_NAME, CHAR_LIST, CONTROLLER_CHANGE, CHAR_OWNER_PROP, and from Walls r1 (#58) ONEWAY.
// ACTUAL_NAME, CHAR_LIST, CONTROLLER_CHANGE, CHAR_OWNER_PROP, and from Walls r1 (#58) ONEWAY and
// (#60) MARKER_EARLY, MARKER_EXTRA, MARKER_OFF.
// (The tile class lands with slice 9.)
import test from 'node:test'
import assert from 'node:assert/strict'
@@ -30,6 +31,9 @@ const FAULTS = {
walls: ['WALLDATA'],
wallHeight: ['WALLDATA'],
oneWay: ['ONEWAY'],
markerEarly: ['MARKER_EARLY'],
markerExtra: ['MARKER_EXTRA'],
markerOff: ['MARKER_OFF'],
withhold: ['WITHHELD'],
otherOwner: ['OTHER_PLAYER'],
otherVision: ['OTHER_PLAYER'],