- 313 new markdown files created - 30 relationships embedded - 313 entries indexed - State initialized with usage data
2.5 KiB
| id | type | title | tags | importance | confidence | created | updated | relations | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 69415fc4-08c7-497a-b1ef-2f135c6400f2 | solution | Implemented dem_week parameter for player team updates in Major Domo |
|
0.7 | 0.8 | 2026-02-02T03:18:47.588736+00:00 | 2026-02-02T03:18:47.588736+00:00 |
|
Added optional dem_week (demotion/designation week) parameter to player team updates for tracking roster move eligibility.
Problem: Player team updates weren't setting the dem_week field in the database, which tracks when players become eligible for certain roster moves.
Solution: Added optional dem_week parameter to PlayerService.update_player_team() method with backwards compatibility.
Implementation Details:
- Modified services/player_service.py: Added optional dem_week parameter with None default
- Transaction freeze (Monday 00:00): Sets dem_week = current.week + 2
- IL moves (/ilmove command): Sets dem_week = current.week
- Draft picks (manual and auto): Set dem_week = current.week + 2
- Admin commands: Don't set dem_week (None) - backwards compatible
Files Modified:
- services/player_service.py - Added dem_week parameter to update_player_team()
- tasks/transaction_freeze.py - Pass dem_week=current.week+2 for transaction processing
- views/transaction_embed.py - Pass dem_week=current.week for IL moves
- commands/draft/picks.py - Pass dem_week=current.week+2 for manual draft picks
- tasks/draft_monitor.py - Pass dem_week=current.week+2 for auto-draft picks
- tests/test_services_player_service.py - Added 4 comprehensive unit tests
Testing: All 21 player service tests pass, including 4 new dem_week-specific tests verifying: with dem_week, without dem_week, dem_week=0, and explicit None.
Critical Bug Fixed: Initially forgot to import Optional from typing in transaction_freeze.py, causing production crash. Fixed with hotfix v2.29.1.
Git Workflow: Used feature branch pattern (feature/add-dem-week-to-player-updates), merged to main, deployed as v2.29.0 (feature) then v2.29.1 (hotfix).
Key Design Decision: Optional parameter with None default maintains backwards compatibility. Service layer passes values directly to API without business logic validation.