strat-gameplay-webapp/backend/app
Cal Corum 72a3b94ce7 CLAUDE: Add transaction handling for multi-step DB operations
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>
2025-11-19 16:39:01 -06:00
..
api CLAUDE: Refactor backend CLAUDE.md files for conciseness 2025-11-19 16:10:08 -06:00
config CLAUDE: Add test game creation utilities 2025-11-19 16:30:29 -06:00
core CLAUDE: Add transaction handling for multi-step DB operations 2025-11-19 16:39:01 -06:00
data CLAUDE: Refactor ManualOutcomeSubmission to use PlayOutcome enum + comprehensive documentation 2025-10-31 16:03:54 -05:00
database CLAUDE: Add transaction handling for multi-step DB operations 2025-11-19 16:39:01 -06:00
models CLAUDE: Fix pitcher/catcher recovery and lineup data format 2025-11-19 16:30:05 -06:00
services CLAUDE: Fix pitcher/catcher recovery and lineup data format 2025-11-19 16:30:05 -06:00
utils CLAUDE: Refactor ManualOutcomeSubmission to use PlayOutcome enum + comprehensive documentation 2025-10-31 16:03:54 -05:00
websocket CLAUDE: Fix pitcher/catcher recovery and lineup data format 2025-11-19 16:30:05 -06:00
__init__.py CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
config.py CLAUDE: Phase 3E-Final - Redis Caching & X-Check WebSocket Integration 2025-11-03 22:46:59 -06:00
main.py CLAUDE: Phase 3E-Final - Redis Caching & X-Check WebSocket Integration 2025-11-03 22:46:59 -06:00