Paper Dynasty Database - PostgreSQL database service
Go to file
Cal Corum 569dc53c00 test: add Tier 1 and Tier 2 refractor system test cases
Implements all gap tests identified in the PO review for the refractor
card progression system (Phase 1 foundation).

TIER 1 (critical):
- T1-1: Negative singles guard in compute_batter_value — documents that
  hits=1, doubles=1, triples=1 produces singles=-1 and flows through
  unclamped (value=8.0, not 10.0)
- T1-2: SP tier boundary precision with floats — outs=29 (IP=9.666) stays
  T0, outs=30 (IP=10.0) promotes to T1; also covers T2 float boundary
- T1-3: evaluate-game with non-existent game_id returns 200 with empty results
- T1-4: Seed threshold ordering + positivity invariant (t1<t2<t3<t4, all >0)

TIER 2 (high):
- T2-1: fully_evolved=True persists when stats are zeroed or drop below
  previous tier — no-regression applies to both tier and fully_evolved flag
- T2-2: Parametrized edge cases for _determine_card_type: DH, C, 2B, empty
  string, None, and compound "SP/RP" (resolves to "sp", SP checked first)
- T2-3: evaluate-game with zero StratPlay rows returns empty batch result
- T2-4: GET /teams/{id}/refractors with valid team and zero states is empty
- T2-5: GET /teams/99999/refractors documents 200+empty (no team existence check)
- T2-6: POST /cards/{id}/evaluate with zero season stats stays at T0 value=0.0
- T2-9: Per-player error isolation — patches source module so router's local
  from-import picks up the patched version; one failure, one success = evaluated=1
- T2-10: Each card_type has exactly one RefractorTrack after seeding

All 101 tests pass (15 PostgreSQL-only tests skip without POSTGRES_HOST).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 09:02:30 -05:00
.gitea/workflows ci: switch buildx cache from registry to local volume 2026-03-24 00:15:38 -05:00
app fix: skip total_count query for CSV requests and consolidate rewards.py counts 2026-03-24 07:43:14 -05:00
docs Remove deprecated legacy files and reorganize documentation 2026-02-05 13:34:09 -06:00
migrations fix: complete remaining evolution→refractor renames from review 2026-03-23 14:17: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 test: add Tier 1 and Tier 2 refractor system test cases 2026-03-24 09:02:30 -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