DUNGEONS-33: fix shutdown lock cleanup and add optional Telegram 2048 #1
Reference in New Issue
Block a user
Delete Branch "agent/codex-chatgpt/0403ec7892cd"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ctrl+C could leave the access store locked when shutdown stalled or another interrupt arrived before pending work finished. Install shutdown handling immediately after opening the store, preserve the lock while writers drain, and release it synchronously on process exit. Startup failures clean up too; stalled shutdown exits after five seconds.
Add optional
TELEGRAM_GAME_SHORT_NAMEfor the game registered to the configured bot in BotFather. Pending requesters receive a native Telegram game card whose Play callback opens the original 2048 at https://play2048.co/. Empty configuration disables games, unknown game callbacks are rejected, and game delivery failures leave requests and approvals intact. Setup is documented in the README and.env.example.Validation:
npm run checkand all 28 tests pass on Node 18.20.8. Regression coverage includes real SIGINT/SIGTERM and restart, repeated interrupts, failed/stalled cleanup, startup failure, optional game delivery, Play callbacks, and game failure isolation. Live Telegram gameplay requires the operator's configured bot and was not exercised locally.Closes DUNGEONS-33