Issue #4 from code review - multi-step database operations were not wrapped in transactions, risking partial state on failure. Changes: - Modified save_play() and update_game_state() in DatabaseOperations to accept optional session parameter for transaction grouping - Wrapped resolve_play() DB operations in single atomic transaction - Wrapped resolve_manual_play() DB operations in single atomic transaction - Transaction commits atomically or rolls back entirely on failure Pattern: When session provided, use flush() for IDs without committing; caller controls transaction. When no session, create internal transaction. All 739 unit tests passing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| CLAUDE.md | ||
| operations.py | ||
| session.py | ||