Walls r1: marker retraction, re-earn and marker fault classes #60
Notifications
Due Date
No due date set.
Blocks
Depends on
#61 Walls r1: leak scenario rewrite and final fault gate
SirStone/FFF_vtt_frozen
#59 Walls r1: player markers — emission, opaque ids, storage, resync
SirStone/FFF_vtt_frozen
Reference: SirStone/FFF_vtt_frozen#60
Reference in New Issue
Block a user
Part of #52
Goal
remove, switch off, no-longer-window and geometry move (incl. thickness/position) retract a marker; a move never reveals the new position early; a re-earned marker gets a fresh id and is never updated in place; inserts/deletes ride the derived-memory NORMAL transaction after the wall row commits and before the ack.
Acceptance criteria
delonly; re-earn produces a new id.setanddelnever both for one id; no explored cell or tile written by a retraction.MARKER_EARLY,MARKER_EXTRA,MARKER_OFFeach caught as exactly their own class, with negative controls.User stories covered
37, 38, 53, 57, 67
Proven at
Notes
Implemented in
c3c0a39.Retraction / re-earn:
syncMarkersretracts a marker when its wall is gone or its marker signature changed (endpoints, thickness, position,player_marker, derivedwindow). Retraction sendsdelonly and never the new anchor; a re-earned marker gets a fresh id (dead ids are excluded from reuse). Marker deletes run in the same derived-memory NORMAL transaction as the explored chunks, after the wall row commits and before the ack. WS black-box grouptools/markers.test.mjs: all four causes (del only), fresh ids on five re-earns, no untouched re-send, noset+delfor one id, no explored/vision frame from a pure retraction, and delete/cascade durability across a restart.Fault classes: aggregate
MARKERreplaced byMARKER_EARLY,MARKER_EXTRA,MARKER_OFF; hooksmarkerEarly(drop extent gate),markerExtra(drop derived-window gate),markerOff(never mint), each caught as exactly its own class bytools/fault.test.mjs. Leak scenario gains an unseen marked window and a marked solid wall as negative controls; checker oracle now retracts expected markers on cause change.Suites:
nimble test -ygreen (all in-process suites);node --test --test-concurrency=1 tools/*.test.mjs136/136 pass. No existing test weakened or skipped;results/*reverted before commit.Standing note:
#61still owns the final leak scenario rewrite; this kept the scenario addition minimal for the fault controls.Crash-window leak fix landed in
a69563f(fix: marker_seen deletes commit with the wall change).A cause-change
wall.updatenow deletes the affectedmarker_seenrows in the same FULL transaction as the wall row (like thewall.removeFK cascade); livedelframes and the NORMAL-transaction marker inserts are unchanged.markerSigmoved toworld.markerSigso the write path and the online retraction share one rule.Proof: leakfault-only
LEAK_FAULT=markerCrashquits between the wall commit and the derived write.tools/markers.test.mjscovers all four causes (endpoint move, thickness, player_marker off, no longer a window), restarts clean, asserts none restores the old marker (endpoint move also asserts the new anchor is absent) and that an untouched window's marker is restored as positive control. Fullnimble test -yandnode --test --test-concurrency=1 tools/*.test.mjsgreen (141/141).