- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
1.6 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | |||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5d8e1ff5-3354-4cfa-ab63-bf96b5ce1e01 | solution | Fix for play lock never released on exception |
|
0.95 | 0.8 | 2026-02-04T15:09:38.128767+00:00 | 2026-02-04T15:09:38.128767+00:00 |
|
Implemented 3-layer defense against stuck play locks: (1) Added release_play_lock() helper function in logic_gameplay.py for manual lock release. (2) Created safe_play_lock() context manager that automatically releases locks on exception via try/except/finally. (3) Added automatic lock release to global error handler in paperdynasty.py @bot.tree.error - on ANY app command exception, checks if there's a locked play in the channel and releases it. This prevents all 13+ stuck locks we found in production. Updated error message from 'auto-unlock will trigger' (which didn't exist) to 'go call dad'. Added comprehensive tests in test_play_locking.py for lock release scenarios. Key files modified: command_logic/logic_gameplay.py (added release_play_lock, safe_play_lock context manager), paperdynasty.py (updated on_app_command_error), cogs/gameplay.py (imported new functions, example usage in end_game_command).