brackt/app/services/simulations
Chris Parsons af64a29cfa
Fix NCAAW futures odds simulation and admin import UX (#420)
- Revert ncaaw-simulator to Barthag win probability formula; set
  realistic rating bounds (ratingMin: 0.70, ratingMax: 0.97) so derived
  ratings stay in the range where the formula behaves well
- Add batchSaveFuturesOddsForSimulator which clears all ratings (manual
  and generated) before upserting sourceOdds, so futures odds always
  drive the simulation rather than being silently overridden by existing
  Barthag ratings from Simulator Setup
- Add clearSourceOddsForParticipants to zero out both tables for
  participants excluded from a bulk import
- Add "Clear existing odds" checkbox to the bulk import card; applies
  client-side on match and server-side on submit
- Fix missing sportsSeasonId filter in batchSaveFuturesOddsForSimulator
  pre-clear UPDATE (could have wiped ratings across other seasons)
- Fix race condition: run batchSaveSourceOdds then
  batchSaveFuturesOddsForSimulator sequentially so the simulator inputs
  table always ends in the correct cleared state
- Fix Math.round in convertFuturesToElo collapsing Barthag-scale ratings
  to 0 or 1; Elo callers already round after clamping
- Handle all-identical-odds edge case in convertFuturesToElo (assign
  midpoint instead of throwing)
- Add missingRatingStrategy: worstKnownMinus to ncaaw_bracket manifest
  so fallbackRatingDelta is live config, not dead
- Log warning in resolveRatings when only 1 participant has odds
- Reset clearExisting checkbox after applyMatches

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 01:06:16 -07:00
..
__tests__ Upgrade NCAA preseason simulators (#419) 2026-05-12 22:26:25 -07:00
afl-simulator.ts Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
auto-racing-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
bracket-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
brackt-simulator.ts Add Brackt as a league-private meta-sport (#200) (#377) 2026-05-04 20:31:44 -07:00
college-hockey-simulator.ts Fix college hockey bracket resolution (#396) 2026-05-08 12:29:39 -07:00
cs-major-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
darts-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
epl-simulator.ts Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
golf-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
input-policy.ts Fix NCAAW futures odds simulation and admin import UX (#420) 2026-05-13 01:06:16 -07:00
llws-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
manifest.ts Fix NCAAW futures odds simulation and admin import UX (#420) 2026-05-13 01:06:16 -07:00
mlb-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
nba-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
ncaa-basketball-simulator.ts Upgrade NCAA preseason simulators (#419) 2026-05-12 22:26:25 -07:00
ncaa-football-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
ncaam-simulator.ts Upgrade NCAA preseason simulators (#419) 2026-05-12 22:26:25 -07:00
ncaaw-simulator.ts Fix NCAAW futures odds simulation and admin import UX (#420) 2026-05-13 01:06:16 -07:00
nfl-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
nhl-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
nll-simulator.ts Add NLL box lacrosse simulator implementation plan and preseason-draftability guidance (#417) 2026-05-12 14:22:34 -07:00
registry.ts Upgrade NCAA preseason simulators (#419) 2026-05-12 22:26:25 -07:00
runner.ts Hide completed seasons in admin tools (#418) 2026-05-12 16:52:26 -07:00
simulation-probabilities.ts Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
simulator-config.ts Add NLL box lacrosse simulator implementation plan and preseason-draftability guidance (#417) 2026-05-12 14:22:34 -07:00
snooker-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
soccer-helpers.ts Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
tennis-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
types.ts User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
ucl-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
wnba-simulator.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
world-cup-simulator.ts Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00