Paper Dynasty Database - PostgreSQL database service
Go to file
Cal Corum 6a176af7da feat: Refractor Phase 2 integration — wire boost into evaluate-game
When a card reaches a new Refractor tier during game evaluation, the
system now creates a boosted variant card with modified ratings. This
connects the Phase 2 Foundation pure functions (PR #176) to the live
evaluate-game endpoint.

Key changes:
- evaluate_card() gains dry_run parameter so apply_tier_boost() is the
  sole writer of current_tier, ensuring atomicity with variant creation
- apply_tier_boost() orchestrates the full boost flow: source card
  lookup, boost application, variant card + ratings creation, audit
  record, and atomic state mutations inside db.atomic()
- evaluate_game() calls evaluate_card(dry_run=True) then loops through
  intermediate tiers on tier-up, with error isolation per player
- Display stat helpers compute fresh avg/obp/slg for variant cards
- REFRACTOR_BOOST_ENABLED env var provides a kill switch
- 51 new tests: unit tests for display stats, integration tests for
  orchestration, HTTP endpoint tests for multi-tier jumps, pitcher
  path, kill switch, atomicity, idempotency, and cross-player isolation
- Clarified all "79-sum" references to note the 108-total card invariant

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-30 13:04:52 -05:00
.gitea/workflows ci: switch buildx cache from registry to local volume 2026-03-24 00:15:38 -05:00
app feat: Refractor Phase 2 integration — wire boost into evaluate-game 2026-03-30 13:04:52 -05:00
docs Remove deprecated legacy files and reorganize documentation 2026-02-05 13:34:09 -06:00
migrations feat: add Refractor Phase 2 foundation — boost functions, schema, tests 2026-03-29 13:39:03 -05:00
scripts Add production deployment config and fix stringified list parsing 2026-01-30 14:03:07 -06:00
storage/templates fix: add asyncio.Lock to get_browser() and deduplicate font-face blocks 2026-03-13 08:28:58 -05:00
tests feat: Refractor Phase 2 integration — wire boost into evaluate-game 2026-03-30 13:04:52 -05:00
.dockerignore Add .dockerignore 2026-01-30 22:47:07 -06:00
.env fix: correct inverted TESTING env check and leading space in .env (#23) 2026-03-03 21:43:54 +00:00
.env.example CLAUDE: Add .env.example with comprehensive configuration guide 2025-11-07 11:53:23 -06:00
.gitignore ci: Use Gitea API for tag creation to avoid branch protection issues 2026-02-17 17:23:21 -06:00
CLAUDE.md ci: switch to tag-based Docker builds 2026-03-23 10:49:23 -05:00
compose.production.yml Add production deployment config and fix stringified list parsing 2026-01-30 14:03:07 -06:00
docker-compose.yml CLAUDE: Comment out API service - prevents race condition in db_engine.py 2025-11-07 14:07:13 -06:00
Dockerfile fix: correct COPY path and add CMD in Dockerfile 2026-03-17 20:09:04 +00:00
LICENSE Initial commit 2023-02-19 21:38:07 -06:00
pyproject.toml feat: Track Catalog API endpoints (WP-06) (#71) 2026-03-12 20:40:38 -05:00
requirements.txt chore: pin all Python dependency versions in requirements.txt (#64) 2026-03-10 01:35:31 -05:00
ruff.toml fix: address PR review findings 2026-03-17 21:38:12 -05:00
VERSION Bump version to 1.5.5 2026-02-04 08:48:12 -06:00