An interrupted atomic write can leave a player file truncated (0 bytes).
JSON.parse of such a file threw SyntaxError, which was unhandled and
crashed the whole presence process (cursors/Yjs/cookies all share it),
putting the canary into a crash loop.
Add tryReadJsonFile() that treats ENOENT and invalid JSON the same way
(as absent) and route readPlayerRecord, getLeaderboard and
sumAllBalances through it. A corrupt file is rebuilt on next access.
Add a regression test covering a truncated player file.
Add authenticated document objects persisted on the BOTSU drive, opaque shared references for local drafts, and websocket document snapshots/patches.
Add synchronized cookie counter API/client slice and keep the canary UI icon updates covered by BOTSU tests.