• Your Name's avatar
    Fix duplicate WIN2 payout in extraction and bet resync after settlement · 488d84c7
    Your Name authored
    - BET CALC: deduplicate ExtractionAssociation outcomes per result before
      summing payout so WIN2 appearing twice no longer doubles the expected
      payout (14720→7360) fed into the extraction decision algorithm
    - _update_bet_results: add updated_at to all bulk losing-bet UPDATE calls
      so BetDetailModel.updated_at is set correctly on bulk paths
    - _update_bet_results: bump BetModel.updated_at on all parent bet records
      after settling, so the incremental sync (which gates on
      BetModel.updated_at > last_synced_at) will re-send previously-pending
      bets with their final win/lost result
    - Migration 071: delete duplicate (outcome_name, extraction_result) rows
      from extraction_associations keeping the lowest-id survivor, then
      recreate the table with UNIQUE(outcome_name, extraction_result) to
      prevent recurrence
    Co-Authored-By: 's avatarClaude Sonnet 4.6 <noreply@anthropic.com>
    488d84c7
games_thread.py 280 KB