f963e8f4d6d802a787324d8ad00a0f1c2729dd32
scene.set reassigns app.scene under dbLock while the HTTP handlers read it with no lock and no stable snapshot: tileGate read it three times (twice outside the lock) and checkScene read the id unlocked, so a swap could hand a request two records, or race ORC freeing the old walls seq. tileGate now takes one snapshot under the lock and uses it for the URL parse, the explored check and the X-Accel-Redirect; checkScene and scene.set read under the lock; the wall/door handlers capture sceneId inside their lock for the post-lock log and effect frame. Tests: ttiles pins that one record gives one whole answer after a swap; tiles.test.mjs pins the handler shape (one code read, after the lock) and interleaves 20 scene.set plus wall edits with 200 tile fetches -- only whole tiles, no crash.
Description
No description provided
9.2 MiB
Languages
JavaScript
38.4%
Nim
38.3%
TypeScript
20.9%
Shell
1.9%
CSS
0.5%