CLAUDE: Complete review of high-priority issues #6-11
Reviewed all remaining high-severity issues from code review: Issues #6, #7 (Input validation): Already implemented in validators.py - hold_runners validation: lines 71-77 - steal_attempts validation: lines 156-165 - Called from submit_defensive_decision and submit_offensive_decision Issue #8 (Hardcoded inning limit): Deferred to next sprint - Requires config system changes across validators.py and game_models.py - Appropriate for technical debt phase Issue #9 (Cleanup on abandon): Already fixed (part of Issue #3) - _cleanup_game_resources() called in end_game() at line 1109 Issue #10 (Direct state mutation): Architectural acknowledgment - Current pattern with debug logging throughout - Consider immutable state pattern for v2 if auditability needed Issue #11 (Logger singleton): Verified correct - Module-level singleton at line 34, outside class All high-priority issues now addressed or appropriately deferred. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
b95c5837b0
commit
86f671ba0c
@ -291,10 +291,26 @@ Some methods seem designed for testing but are public API.
|
||||
- `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
|
||||
- [ ] High issues #6-11 pending
|
||||
- [x] High issues #6, #7 already implemented (2025-11-19)
|
||||
- Validation exists in validators.py: hold_runners validates against occupied bases (lines 71-77)
|
||||
- Validation exists in validators.py: steal_attempts validates against runner state (lines 156-165)
|
||||
- Validators called in submit_defensive_decision (line 225) and submit_offensive_decision (line 263)
|
||||
- [x] High issue #8 deferred to next sprint (2025-11-19)
|
||||
- Hardcoded inning limit (9) used in validators.py and game_models.py
|
||||
- Requires config system changes - appropriate for technical debt phase
|
||||
- [x] High issue #9 already fixed (part of Issue #3)
|
||||
- `_cleanup_game_resources()` called in `end_game()` at line 1109
|
||||
- [x] High issue #10 acknowledged (2025-11-19)
|
||||
- Direct state mutation is current architecture pattern
|
||||
- Would require significant refactor for immutable state pattern
|
||||
- State changes are logged at debug level throughout
|
||||
- Consider for v2 if auditability becomes a requirement
|
||||
- [x] High issue #11 verified correct (2025-11-19)
|
||||
- Logger is module-level singleton at line 34 (outside class)
|
||||
- Pattern is correct: `logger = logging.getLogger(f'{__name__}.GameEngine')`
|
||||
- [ ] Medium issues addressed
|
||||
- [ ] Low issues addressed
|
||||
|
||||
**Tests**: 739/739 passing after fixes (100%)
|
||||
|
||||
**Last Updated**: 2025-01-19
|
||||
**Last Updated**: 2025-11-19
|
||||
|
||||
Loading…
Reference in New Issue
Block a user