major-domo-v2/services
Cal Corum 37bf797254 Fix critical week rollover bugs causing 60x freeze message spam
Three bugs identified and fixed:

1. Deduplication logic tracked wrong week (transaction_freeze.py:216-219)
   - Saved freeze_from_week BEFORE _begin_freeze() modifies current.week
   - Prevents re-execution when API returns stale data

2. _run_transactions() bypassed service layer (transaction_freeze.py:350-394)
   - Added get_regular_transactions_by_week() to transaction_service.py
   - Now properly filters frozen=false and cancelled=false
   - Uses Transaction model objects instead of raw dict access

3. CRITICAL: Hardcoded current_id=1 (league_service.py:88-106)
   - Current table has one row PER SEASON, not a single row
   - Was patching Season 3 (id=1) instead of Season 13 (id=11)
   - Now fetches actual current state ID before patching

Root cause: The hardcoded ID caused every PATCH to update the wrong
season's record, so freeze was never actually set to True on the
current season. This caused the dedup check to pass 60 times (once
per minute during hour 0).

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-22 14:15:26 -06:00
..
__init__.py Add Google Sheets integration for draft pick tracking 2025-12-11 11:18:27 -06:00
base_service.py CLAUDE: Fix /set-image command to use query parameters for API updates 2025-10-13 17:52:14 -05:00
chart_service.py CLAUDE: Add multi-image support for charts 2025-10-20 22:00:19 -05:00
CLAUDE.md Add Google Sheets integration for draft pick tracking 2025-12-11 11:18:27 -06:00
custom_commands_service.py Fix /cc-create endpoint path mismatch (v2.19.2) 2025-11-24 21:20:28 -06:00
decision_service.py CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
draft_list_service.py Add comprehensive draft services test suite and API fixes (v2.23.0) 2025-12-09 15:11:51 -06:00
draft_pick_service.py Fix off-by-one error in draft recent picks display 2025-12-12 19:14:53 -06:00
draft_service.py Add draft pause/resume functionality 2025-12-11 19:58:37 -06:00
draft_sheet_service.py Optimize draft sheet batch writes to single API call 2025-12-12 15:01:48 -06:00
game_service.py CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
giphy_service.py CLAUDE: Fix GroupCog interaction bug and GIF display issues 2025-10-16 22:15:42 -05:00
help_commands_service.py CLAUDE: Implement custom help commands system 2025-10-10 13:14:13 -05:00
injury_service.py Add injury log posting and fix view interaction permissions 2025-12-19 00:08:11 -06:00
league_service.py Fix critical week rollover bugs causing 60x freeze message spam 2025-12-22 14:15:26 -06:00
play_service.py CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
player_service.py Add draft monitor auto-start and on-clock announcement embed 2025-12-10 23:04:39 -06:00
roster_service.py Fix sWAR display precision and draft team role pings 2025-12-12 18:41:46 -06:00
schedule_service.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
scorebug_service.py CLAUDE: Refactor scorebug display and add dynamic channel visibility 2025-10-22 16:58:21 -05:00
sheets_service.py CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
standings_service.py CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
stats_service.py CLAUDE: Major bot enhancements - Admin commands, player stats, standings, schedules 2025-08-28 15:32:38 -05:00
team_service.py Consolidate season config variables to single source (v2.21.0) 2025-12-02 16:12:16 -06:00
trade_builder.py Add pending transaction validation for /dropadd command 2025-12-21 17:13:43 -06:00
transaction_builder.py Add pending transaction validation for /dropadd command 2025-12-21 17:13:43 -06:00
transaction_service.py Fix critical week rollover bugs causing 60x freeze message spam 2025-12-22 14:15:26 -06:00