fix: marker_seen deletes commit with the wall change

A wall cause change (endpoint move, thickness/position, player_marker off,
no longer window) committed the wall row in the FULL transaction while its
marker_seen deletes rode the later NORMAL derived-memory transaction. A crash
between them left the stale row, and restart restored the marker with the
anchor recomputed from the NEW geometry, revealing a position the player never
saw (DESIGN 5.8).

updateWall now deletes the affected rows in the same FULL transaction as the
replaced row, exactly as the composite FK cascade already does for wall.remove.
The live del frames are unchanged and marker inserts stay in the derived
transaction: wall+deletes commit, derived inserts, then ack.

The marker cause signature moves to world.markerSig so the write-time delete
and the online retraction cannot drift.

Proof: a leakfault-only markerCrash hook quits between the wall commit and
the derived write; tools/markers.test.mjs covers all four causes and restarts
on a clean build, asserting no marker for the changed wall (no new anchor) and
restoring the untouched window's marker as the positive control.

Ref #60
This commit is contained in:
2026-11-19 23:52:13 +01:00
parent c3c0a39188
commit a69563f701
8 changed files with 160 additions and 27 deletions
+3 -1
View File
@@ -462,7 +462,9 @@ from the prototype, what was missing, what the M3 build added, and the tools it
and marked solid wall as the negative controls. The WS group `tools/markers.test.mjs` proves the
four retraction causes (del only), a fresh id on re-earn, no re-send of an untouched marker, no
`set` and `del` for one id in a frame, no explored write from a pure retraction, and durability
of the deletes across a restart.
of the deletes across a restart. A `LEAK_FAULT=markerCrash` hook quits in a `-d:leakfault` build
between the wall commit and the derived write; after a restart the changed wall's marker is gone
for all four causes while the untouched window's marker is restored (the positive control).
- **Wall fields, storage and migration (#49).** Three gates. **Leak:** `BannedAlways` contains every
wall field name (`thickness`, `position`, `height`, `blocks_sight`, `blocks_movement`, `sight_dir`,
`player_marker`, `door`, `open`, `secret`, `locked`, `label`, `a`, `b`), so any of them in a player