Major Domo v2 - Discord bot for Strat-o-Matic Baseball Association
Go to file
Cal Corum 62c658fb57 CLAUDE: Add automated weekly transaction freeze/thaw system
Implements comprehensive automated system for weekly transaction freeze periods
with priority-based contested player resolution.

New Features:
- Weekly freeze/thaw task (Monday 00:00 freeze, Saturday 00:00 thaw)
- Priority resolution for contested transactions (worst teams get first priority)
- Admin league management commands (/freeze-begin, /freeze-end, /advance-week)
- Enhanced API client to handle string-based transaction IDs (moveids)
- Service layer methods for transaction cancellation, unfreezing, and bulk operations
- Offseason mode configuration flag to disable freeze operations

Technical Changes:
- api/client.py: URL-encode object_id parameter to handle colons in moveids
- bot.py: Initialize and shutdown transaction freeze task
- config.py: Add offseason_flag to BotConfig
- services/league_service.py: Add update_current_state() for week/freeze updates
- services/transaction_service.py: Add cancel/unfreeze methods with bulk support
- tasks/transaction_freeze.py: Main freeze/thaw automation with error recovery
- commands/admin/league_management.py: Manual admin controls for freeze system

Infrastructure:
- .gitlab-ci.yml and .gitlab/: GitLab CI/CD pipeline configuration
- .mcp.json: MCP server configuration
- Dockerfile.versioned: Versioned Docker build support
- .dockerignore: Added .gitlab/ to ignore list

Testing:
- tests/test_tasks_transaction_freeze.py: Comprehensive freeze task tests

The system uses team standings to fairly resolve contested players (multiple teams
trying to acquire the same player), with worst-record teams getting priority.
Includes comprehensive error handling, GM notifications, and admin reporting.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-20 12:16:13 -05:00
.gitlab CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
.vscode CLAUDE: Convert constants to configurable environment variables 2025-10-16 10:40:22 -05:00
api CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
commands CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
models CLAUDE: Add toggleable stats to /player command and injury system improvements 2025-10-17 23:26:08 -05:00
services CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
tasks CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
tests CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
utils rename all readme files 2025-10-17 08:00:59 -05:00
views CLAUDE: Add toggleable stats to /player command and injury system improvements 2025-10-17 23:26:08 -05:00
.dockerignore CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
.gitignore CLAUDE: Convert constants to configurable environment variables 2025-10-16 10:40:22 -05:00
.gitlab-ci.yml CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
.mcp.json CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
bot.py CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
BUILD_AND_PUSH.md CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
build-and-push.sh CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
COMMAND_LIST.md CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
config.py CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
docker-compose.dev.yml CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
docker-compose.yml CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
DOCKER.md CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
Dockerfile CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
Dockerfile.versioned CLAUDE: Add automated weekly transaction freeze/thaw system 2025-10-20 12:16:13 -05:00
exceptions.py CLAUDE: Add comprehensive scorecard submission system 2025-10-16 00:21:32 -05:00
PRE_LAUNCH_ROADMAP.md CLAUDE: Reorganize data storage and enhance team/roster displays 2025-10-15 19:05:51 -05:00
pyrightconfig.json CLAUDE: Convert constants to configurable environment variables 2025-10-16 10:40:22 -05:00
requirements.txt CLAUDE: Add comprehensive Docker deployment infrastructure 2025-10-16 00:54:56 -05:00
test_real_data.py CLAUDE: Refine injury roll display and cleanup imports 2025-10-16 22:20:13 -05:00