strat-gameplay-webapp/backend/app
Cal Corum 2a70df74bf CLAUDE: Fix on_base_code encoding bug + add truth table & invariant tests
Fix critical encoding mismatch where calculate_on_base_code() returned
bit-field encoding (3=R1+R2, 4=R3) but runner_advancement.py charts
expected sequential encoding (3=R3, 4=R1+R2). Values 3 and 4 were
swapped, causing wrong groundball results for R1+R2 and R3-only scenarios.

Add comprehensive test coverage:
- 1184 invariant tests (structural correctness across all outcomes × base codes)
- 49 hit truth table tests (SINGLE_1/2, DOUBLE_2/3, TRIPLE, HOMERUN)
- 33 walk truth table tests (WALK, HBP with stat flag verification)
- 42 simple out truth table tests (STRIKEOUT, LINEOUT, POPOUT, WP, PB)
- 88 groundball truth table tests (GB_A/B/C × infield back/in/corners_in × locations)

Total: 2401 unit tests passing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-08 23:33:10 -06:00
..
api CLAUDE: Add validation to prevent null team metadata in game creation 2026-01-24 18:19:15 -06:00
config CLAUDE: Replace black and flake8 with ruff for formatting and linting 2025-11-20 15:33:21 -06:00
core CLAUDE: Fix on_base_code encoding bug + add truth table & invariant tests 2026-02-08 23:33:10 -06:00
data CLAUDE: Refactor ManualOutcomeSubmission to use PlayOutcome enum + comprehensive documentation 2025-10-31 16:03:54 -05:00
database CLAUDE: Complete in-game UI overhaul with player cards and outcome wizard 2026-01-23 15:23:38 -06:00
middleware CLAUDE: Add rate limiting, pool monitoring, and exception infrastructure 2025-11-28 12:06:10 -06:00
models CLAUDE: Fix on_base_code encoding bug + add truth table & invariant tests 2026-02-08 23:33:10 -06:00
monitoring CLAUDE: Add rate limiting, pool monitoring, and exception infrastructure 2025-11-28 12:06:10 -06:00
services CLAUDE: Add validation to prevent null team metadata in game creation 2026-01-24 18:19:15 -06:00
utils CLAUDE: Add native development workflow for instant startup and hot-reload 2026-02-06 17:56:56 -06:00
websocket CLAUDE: Add interactive x-check workflow foundation (steps 1-5) 2026-02-07 17:21:19 -06:00
__init__.py CLAUDE: Complete Phase 1 backend infrastructure setup 2025-10-21 19:46:16 -05:00
config.py CLAUDE: Add team ownership to auth flow (CRIT-002) 2026-01-13 20:28:08 -06:00
main.py CLAUDE: Add SBA schedule integration with weekly matchup display 2026-01-14 23:39:31 -06:00