- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
13 lines
828 B
Markdown
13 lines
828 B
Markdown
---
|
|
id: 1f7cd081-6532-4db7-ad4b-4049b1a5603a
|
|
type: solution
|
|
title: "Play lock context manager refactor - locked_play"
|
|
tags: [paper-dynasty, python, fix, play-lock, context-manager]
|
|
importance: 0.8
|
|
confidence: 0.8
|
|
created: "2026-02-11T03:48:13.286652+00:00"
|
|
updated: "2026-02-11T03:48:13.286652+00:00"
|
|
---
|
|
|
|
Created command_logic/play_context.py with locked_play async context manager. Wraps checks_log_interaction() and guarantees lock release on exception, early return, or normal exit. Fixed production bug where log_chaos, log_sac_bunt, and log_stealing left locks permanently stuck due to early returns after lock acquisition. Migrated all 18 locking commands in cogs/gameplay.py. Removed double-locking in end_game_command. Special handling for undo_play (sets original_play.locked=False to prevent committing deleted row).
|