Paper Dynasty Gameplay WebApp - Web interface for gameplay
Go to file
Cal Corum 7fd9079425 CLAUDE: Improve AI Service test coverage from 60% to 72% with comprehensive integration tests
Added targeted integration tests to cover previously uncovered conditional branches
and edge cases in AI decision-making logic:

- test_ai_service_focused_coverage.py: 11 tests for key missing branches
  * Steal opportunity conditions (lines 91, 93, 98-99, 108)
  * Steal to third/home scenarios (lines 129, 157, 161)
  * Defensive alignment logic (lines 438, 480)
  * Tag decision branches (lines 204, 253)

- test_ai_service_final_coverage.py: 10 tests for remaining gaps
  * Complex steal conditions (lines 95, 118-119, 132, 136-137, 141)
  * Late inning steal logic (lines 159, 163)
  * Uncapped advance bounds checking (lines 382-388)
  * Complex defensive scenarios (lines 440-449)

- test_ai_service_coverage.py: Comprehensive coverage tests (unused due to complexity)

Fixed:
- Player model relationship syntax (removed unsupported cascade_delete parameter)
- Existing test assertion in test_ai_service_simple.py for steal to home scenario

Coverage improvement: 369 statements, 147→105 missed lines (60%→72% coverage)
All 49 AI Service tests now pass with comprehensive integration testing.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-29 21:28:43 -05:00
.claude CLAUDE: Complete Player model migration with service layer and integration test infrastructure 2025-09-29 16:20:29 -05:00
.vscode CLAUDE: Achieve 100% test pass rate with comprehensive AI service testing 2025-09-28 17:55:34 -05:00
app CLAUDE: Improve AI Service test coverage from 60% to 72% with comprehensive integration tests 2025-09-29 21:28:43 -05:00
scripts CLAUDE: Initialize Paper Dynasty web app with Model/Service Architecture 2025-09-27 21:44:12 -05:00
tests CLAUDE: Improve AI Service test coverage from 60% to 72% with comprehensive integration tests 2025-09-29 21:28:43 -05:00
.env.example CLAUDE: Initialize Paper Dynasty web app with Model/Service Architecture 2025-09-27 21:44:12 -05:00
.gitattributes Initial commit 2025-09-26 13:41:33 -05:00
.gitignore Initial commit 2025-09-26 13:41:33 -05:00
CLAUDE.md CLAUDE: Achieve 100% test pass rate with comprehensive AI service testing 2025-09-28 17:55:34 -05:00
DEVELOPMENT_GUIDE_V2.md CLAUDE: Initialize Paper Dynasty web app with Model/Service Architecture 2025-09-27 21:44:12 -05:00
docker-compose.yml CLAUDE: Achieve 100% test pass rate with comprehensive AI service testing 2025-09-28 17:55:34 -05:00
pytest.ini CLAUDE: Achieve 100% test pass rate with comprehensive AI service testing 2025-09-28 17:55:34 -05:00
requirements.txt CLAUDE: Initialize Paper Dynasty web app with Model/Service Architecture 2025-09-27 21:44:12 -05:00