strat-gameplay-webapp/backend/app
Cal Corum b95c5837b0 CLAUDE: Extract common resolution logic to _finalize_play method
Issue #5 from code review - resolve_play and resolve_manual_play shared
~70% of their code causing maintenance burden and divergent behavior risk.

Changes:
- Extracted common finalization logic to new _finalize_play() method
- resolve_play reduced from ~150 lines to ~60 lines
- resolve_manual_play reduced from ~135 lines to ~60 lines
- Single source of truth for: roll tracking, state capture, transaction
  handling, inning advance, cleanup, and state updates

Benefits:
- Changes to play finalization only need to be made in one place
- Reduced risk of divergent behavior between resolution modes
- Better testability and maintainability

All 739 unit tests passing (1 flaky probabilistic test occasionally fails).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-19 16:44:04 -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: Extract common resolution logic to _finalize_play method 2025-11-19 16:44:04 -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