This commit completes all Phase 3 work with comprehensive test coverage: Test Coverage: - 31 unit tests for SubstitutionRules (all validation paths) - 10 integration tests for SubstitutionManager (DB + state sync) - 679 total tests in test suite (609/609 unit tests passing - 100%) Testing Scope: - Pinch hitter validation and execution - Defensive replacement validation and execution - Pitching change validation and execution (min batters, force changes) - Double switch validation - Multiple substitutions in sequence - Batting order preservation - Database persistence verification - State sync verification - Lineup cache updates All substitution system components are now production-ready: ✅ Core validation logic (SubstitutionRules) ✅ Orchestration layer (SubstitutionManager) ✅ Database operations ✅ WebSocket event handlers ✅ Comprehensive test coverage ✅ Complete documentation Phase 3 Overall: 100% Complete - Phase 3A-D (X-Check Core): 100% - Phase 3E (Position Ratings + Redis): 100% - Phase 3F (Substitutions): 100% 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| .claude | ||
| .git-hooks | ||
| app | ||
| scripts | ||
| terminal_client | ||
| tests | ||
| .dockerignore | ||
| .env.example | ||
| .python-version | ||
| CLAUDE.md | ||
| clean_test_data.py | ||
| docker-compose.yml | ||
| Dockerfile | ||
| mypy.ini | ||
| pyproject.toml | ||
| pyrightconfig.json | ||
| pytest.ini | ||
| README.md | ||
| requirements-dev.txt | ||
| requirements.txt | ||
| TEST_COVERAGE_SUMMARY.md | ||
| test_db_playground.py | ||
| test_pd_api_live.py | ||
| test_pd_api_mock.py | ||
| test_redis_cache.py | ||
| uv.lock | ||
Paper Dynasty Backend
FastAPI-based real-time baseball game engine with WebSocket support.
Quick Start
# Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
uv sync
# Run server
uv run python -m app.main
Documentation
See CLAUDE.md for full documentation.