brackt/drizzle
Chris Parsons 81d063faa1
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m13s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m23s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Auto-populate & auto-score tennis Grand Slam brackets from Wikipedia
Add a per-event "Sync Draw" that pulls a tennis major's full 128-player
draw from its Wikipedia article, auto-creates/links participants (and
propagates them to every linked sibling season), builds the bracket, and
runs the qualifying-points scorer. Re-running advances the bracket and
scoring as matches complete.

Core
- match-sync: WikipediaTennisAdapter + wikitext bracket parser, DrawSync
  DTOs, syncTennisDraw orchestrator, pure draw->rows mapping
- playoff-match: populateBracketFromDraw (idempotent upsert on externalMatchId)
- scoring_events.externalSourceKey column (Wikipedia article; migration 0123)
- admin bracket "Sync Draw" card (accepts URL or title) + cron pass

Scoring fix
- deriveBracketQualifyingStates only floors players who have reached the
  scoring stage; for deep brackets (tennis_128) early-round losers earn 0 QP
  instead of a phantom 9th-place floor. CS2/simple_8 behavior preserved
  (gated on rounds[0].isScoring). Re-sync reconciles stale QP rows in a
  transaction.

Matching & parsing
- accent-folding in normalizeTeamName; strip Wikipedia "(tennis)"
  disambiguators; treat Bye/TBD/Qualifier as TBD; extract wikilink before
  template-stripping so {{nowrap}}-wrapped players parse

Admin UX
- dry-run preview (matched / will-create / possible duplicates / unfilled
  slots) with inline "rename existing" / "create as new" resolution via
  fetcher (no full reload)

Tests: parser vs real 2025 Wimbledon fixture, draw mapping, tennis_128
scoring, accent/disambiguator/nowrap parsing, URL parsing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-26 21:48:00 -07:00
..
meta Auto-populate & auto-score tennis Grand Slam brackets from Wikipedia 2026-06-26 21:48:00 -07:00
0000_short_donald_blake.sql Initial commit from create-react-router 2025-10-10 23:04:50 -07:00
0001_serious_la_nuit.sql feat: add fantasy league schema and new league routes 2025-10-11 00:07:39 -07:00
0002_tired_iron_man.sql feat: add commissioner model and league management features 2025-10-11 00:29:04 -07:00
0003_public_shadowcat.sql feat: add user model, routes, and Clerk webhook integration 2025-10-11 00:53:39 -07:00
0004_spicy_zarda.sql feat: add user model, routes, and Clerk webhook integration 2025-10-11 00:53:39 -07:00
0005_abnormal_thunderbird.sql refactor: remove guest book feature and update league settings success flow 2025-10-11 01:03:31 -07:00
0006_needy_junta.sql feat: add current season tracking and active league listing by user 2025-10-11 21:10:01 -07:00
0007_pink_nebula.sql feat: add sports and participant models with admin user functionality 2025-10-12 21:16:00 -07:00
0008_salty_trauma.sql feat: add icon support for sports with file upload and active seasons display 2025-10-13 10:30:47 -07:00
0009_fuzzy_korvac.sql refactor: remove isRequired field from season sports and templates 2025-10-13 15:00:59 -07:00
0010_complex_the_stranger.sql feat: add invite code system for league seasons with member access control 2025-10-14 12:20:36 -07:00
0011_gifted_mystique.sql feat: add username field to users and display in league views 2025-10-14 21:20:58 -07:00
0012_yielding_phil_sheldon.sql feat: add team settings route and logo URL field to teams table 2025-10-14 22:04:37 -07:00
0013_pink_the_order.sql feat: add draft order management with UI for manual and random ordering 2025-10-15 08:58:35 -07:00
0014_lowly_gateway.sql feat: add bulk participant creation and expected value field 2025-10-15 21:21:33 -07:00
0015_exotic_loners.sql feat: add draft rounds configuration to league settings 2025-10-15 21:50:02 -07:00
0016_majestic_roulette.sql feat: add draft date/time selection to league creation and settings 2025-10-15 22:02:21 -07:00
0017_calm_zarda.sql feat: add draft pick, queue, and timer models with database schema updates 2025-10-16 00:32:48 -07:00
0018_numerous_stardust.sql feat: add public draft board and simplify draft speed settings 2025-10-20 15:03:11 -07:00
0019_acoustic_ben_grimm.sql feat: add autodraft status and team connection indicators to draft grid 2025-10-21 23:22:17 -07:00
0020_slim_spacker_dave.sql feat: Add comprehensive scoring system database schema 2025-10-28 23:40:11 -07:00
0021_fair_ser_duncan.sql feat: Implement bracket expansion plan to support various tournament structures 2025-11-03 09:36:16 -08:00
0022_shiny_mother_askani.sql feat: Implement bracket expansion plan to support various tournament structures 2025-11-03 09:36:16 -08:00
0023_cynical_jack_power.sql Refactor code structure for improved readability and maintainability 2025-11-03 13:16:37 -08:00
0024_faithful_mesmero.sql feat: implement Expected Value System with ICM probability calculator 2025-11-17 22:19:46 -08:00
0025_rename_participant_ev_season_to_sports_season.sql feat: implement Expected Value System with ICM probability calculator 2025-11-17 22:19:46 -08:00
0026_add_source_odds_to_participant_ev.sql feat: implement Expected Value System with ICM probability calculator 2025-11-17 22:19:46 -08:00
0027_add_projected_points_to_team_standings.sql feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
0028_add_tournament_groups.sql feat: add FIFA World Cup 48-team bracket template with group stage and projected scoring 2026-02-14 22:30:12 -08:00
0029_change_participant_ev_to_decimal.sql Change participant expectedValue from integer to decimal (#1) 2026-02-19 11:26:40 -08:00
0030_add_draft_picks_unique_slot.sql fix: harden draft timer system with race-condition safety and DRY refactor (#34) 2026-02-23 23:23:24 -08:00
0031_add_autodraft_queue_only.sql Claude/redesign autodraft queue c4 kp r (#40) 2026-02-27 22:16:26 -08:00
0032_consolidate_playoff_pattern.sql User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
0033_add_schedule_event_type.sql fix: add statement-breakpoint to schedule_event enum migration (#86) 2026-03-07 22:45:59 -08:00
0034_add_ev_snapshots.sql User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
0035_increase_prob_precision.sql User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
0036_increase_ev_precision.sql User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
0037_add_simulator_type_to_sports.sql User/chris/ev f1 framework (#93) 2026-03-09 15:34:31 -07:00
0038_sad_wilson_fisk.sql feat: progressive floor scoring for playoff brackets (#100) 2026-03-10 10:27:58 -07:00
0039_add_ucl_bracket_simulator_type.sql Fix bad migration. 2026-03-11 14:38:45 -07:00
0040_fat_puma.sql Found it in a second spot. 2026-03-11 14:47:19 -07:00
0041_great_magma.sql Add event_starts_at timestamp to scoring events for sub-day ordering (#146) 2026-03-15 10:22:42 -07:00
0042_migrate_event_date_to_starts_at.sql Add event_starts_at timestamp to scoring events for sub-day ordering (#146) 2026-03-15 10:22:42 -07:00
0043_demonic_vanisher.sql Add per-event configurable region config for NCAA-style brackets (#149) (#149) 2026-03-15 21:52:47 -07:00
0044_add_ncaam_bracket_simulator_type.sql Add NCAAM and NCAAW bracket Monte Carlo simulators (#150) 2026-03-15 23:31:47 -07:00
0045_add_ncaaw_bracket_simulator_type.sql Add NCAAM and NCAAW bracket Monte Carlo simulators (#150) 2026-03-15 23:31:47 -07:00
0046_add_nba_bracket_simulator_type.sql Add NBA playoff bracket Monte Carlo simulator (#154) 2026-03-16 21:43:39 -07:00
0047_fix_nba_bracket_simulator_type.sql Fix NBA simulator missing from dropdown and enum not applied to prod DB 2026-03-16 22:18:50 -07:00
0048_eager_songbird.sql Add Discord webhook notifications for standings updates (#157) 2026-03-17 11:16:36 -07:00
0049_add_admin_picked_by_type.sql Grant sitewide admins commissioner-level access in leagues (#162) 2026-03-18 00:41:56 -07:00
0050_chief_peter_quill.sql Add NHL playoff simulator and fix simulator dropdown (#166) 2026-03-18 01:23:53 -07:00
0051_add_standings_snapshot_unique_index.sql Fix standings snapshot upsert: atomic writes, correct date, and event-driven updates (#177) 2026-03-18 22:15:28 -07:00
0052_new_warbird.sql Fix migration 2026-03-18 22:54:01 -07:00
0053_smooth_kingpin.sql Add standard draft clock mode (#67) (#189) 2026-03-20 21:36:39 -07:00
0054_massive_vulcan.sql Add regular season standings for NBA/NHL (fixes #89) (#192) 2026-03-21 00:12:01 -07:00
0055_special_vampiro.sql Add regular season standings for NBA/NHL (fixes #89) (#192) 2026-03-21 00:12:01 -07:00
0056_jittery_the_fallen.sql Add AFL season + finals simulator (closes #126) (#204) 2026-03-22 01:57:39 -07:00
0057_cultured_doctor_doom.sql Add snooker bracket simulator and Elo ratings admin UI, fixes #119 2026-03-23 08:24:28 -07:00
0058_add_unique_participant_ev.sql Add snooker bracket simulator and Elo ratings admin UI, fixes #119 2026-03-23 08:24:28 -07:00
0059_mysterious_jack_murdock.sql Add tennis Grand Slam simulator with surface Elo ratings, fixes #116 (#216) 2026-03-23 23:59:35 -07:00
0060_omniscient_outlaw_kid.sql Add tennis Grand Slam simulator with surface Elo ratings, fixes #116 (#216) 2026-03-23 23:59:35 -07:00
0061_violet_mephistopheles.sql Add golf qualifying points simulator (Plackett-Luce Monte Carlo) (#223) 2026-03-24 21:46:02 -07:00
0062_add_mlb_bracket_simulator_type.sql Add MLB playoff simulator with AL/NL division standings, fixes #121 (#225) 2026-03-25 08:47:02 -07:00
0063_bored_ultimo.sql Add WNBA playoff simulator with SRS-based Elo ratings, fixes #125 (#231) 2026-03-26 00:34:51 -07:00
0064_fuzzy_wolfsbane.sql Add FIFA World Cup 2026 support with group stage display and Monte Carlo simulator (#242) 2026-03-29 10:27:47 -07:00
0065_kind_mantis.sql Add FIFA World Cup 2026 support with group stage display and Monte Carlo simulator (#242) 2026-03-29 10:27:47 -07:00
0066_stiff_siren.sql Add FIFA World Cup 2026 support with group stage display and Monte Carlo simulator (#242) 2026-03-29 10:27:47 -07:00
0067_darts_bracket.sql Add PDC World Darts Championship simulator with Elo-based bracket (#248) 2026-03-31 15:37:28 -07:00
0068_cs2_major_simulator.sql Fix migration 0068: add IF NOT EXISTS to enum ADD VALUE (#269) 2026-04-06 11:12:13 -04:00
0069_draft_window.sql Fix idempotency on 0069 2026-04-06 15:32:39 +00:00
0070_verify_migrations.sql Clean up migration chain and add verification migration (#268) 2026-04-06 10:53:51 -04:00
0071_many_nico_minoru.sql Add NFL season + playoffs Monte Carlo simulator (#272) 2026-04-07 09:39:34 -04:00
0072_jittery_steve_rogers.sql Add NCAA Football CFP simulator (12-team bracket) (#278) 2026-04-08 09:48:32 -04:00
0073_blushing_lady_vermin.sql Add LLWS bracket Monte Carlo simulator (#280) 2026-04-08 16:52:10 -04:00
0074_clammy_tiger_shark.sql feat: add vorp_value column to participants table 2026-04-09 01:57:22 +00:00
0075_chubby_stephen_strange.sql Add audit logging for commissioner actions (#293) 2026-04-13 15:45:39 -07:00
0076_heavy_zemo.sql fix: league settings sports swap and audit log detail improvements (#294) 2026-04-14 21:41:05 -07:00
0077_lively_wolfpack.sql New design (#309) 2026-04-23 13:14:55 -07:00
0078_striped_rick_jones.sql New design (#309) 2026-04-23 13:14:55 -07:00
0079_wide_trauma.sql New design (#309) 2026-04-23 13:14:55 -07:00
0080_chemical_gorilla_man.sql New design (#309) 2026-04-23 13:14:55 -07:00
0081_careless_magdalene.sql Migrate authentication from Clerk to BetterAuth (#324) 2026-04-24 22:00:49 -07:00
0082_stale_pride.sql Migrate authentication from Clerk to BetterAuth (#324) 2026-04-24 22:00:49 -07:00
0083_fearless_leader.sql Add overnight pause for draft timers (#335) 2026-04-26 22:31:52 -07:00
0084_wooden_retro_girl.sql Migrate auth from Clerk to BetterAuth (#354) 2026-04-29 10:03:50 -07:00
0085_young_cobalt_man.sql Mobile draft room improvements: watchlist, collapsible picks feed, autodraft controls (#355) 2026-04-29 11:49:26 -07:00
0086_marvelous_infant_terrible.sql Add draft room closure after completion (#359) 2026-04-30 10:14:14 -07:00
0087_small_susan_delgado.sql Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
0088_cheerful_norrin_radd.sql Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
0089_lonely_tigra.sql Canonical tournament layer: 2026-05-01 21:04:48 -07:00
0090_powerful_redwing.sql Canonical tournament layer: 2026-05-01 21:04:48 -07:00
0091_fast_inhumans.sql Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
0092_robust_klaw.sql Add sports season ↔ tournament linking with admin UI (#372) 2026-05-02 12:45:53 -07:00
0093_ambiguous_hellcat.sql Remove sports_season_tournaments junction table — derive from scoring_events (#373) 2026-05-02 22:19:59 -07:00
0094_curved_nick_fury.sql Add Brackt as a league-private meta-sport (#200) (#377) 2026-05-04 20:31:44 -07:00
0095_lucky_madrox.sql Add Cloudinary-backed avatar system (#385) 2026-05-06 14:47:37 -07:00
0096_demonic_vulture.sql Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
0097_puzzling_spectrum.sql Add Cloudinary sports icon uploads (#393) 2026-05-07 16:07:34 -07:00
0098_lucky_sabra.sql Fix college hockey bracket resolution (#396) 2026-05-08 12:29:39 -07:00
0099_peaceful_hannibal_king.sql Remove first and last name from user profiles (#399) 2026-05-09 09:18:50 -07:00
0100_mighty_weapon_omega.sql Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00
0101_simple_black_bolt.sql Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00
0102_wild_wiccan.sql Formalize simulator system with manifest, input-policy, runner, and admin UI (#409) 2026-05-11 21:09:53 -07:00
0103_salty_runaways.sql Add NLL box lacrosse simulator implementation plan and preseason-draftability guidance (#417) 2026-05-12 14:22:34 -07:00
0104_chief_boom_boom.sql Add MLS sport simulator (mls_bracket) (#422) 2026-05-14 12:45:53 -07:00
0105_mighty_talisman.sql Add opt-in Discord pings to standings notifications (#429) 2026-05-15 10:06:54 -07:00
0106_chilly_chimera.sql Add user onboarding flow with username selection (#430) 2026-05-15 11:17:15 -07:00
0107_outgoing_mikhail_rasputin.sql Add user onboarding flow with username selection (#430) 2026-05-15 11:17:15 -07:00
0108_faulty_purple_man.sql Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
0109_fair_peter_quill.sql Add not-participating exclusion support for event results (#446) 2026-05-19 11:13:32 -07:00
0110_thankful_nova.sql Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
0111_gorgeous_captain_universe.sql Add draft email notifications feature (#459) 2026-05-20 15:35:43 -07:00
0112_married_captain_midlands.sql Add Discord draft pick announcements (#460) 2026-05-20 19:55:48 -07:00
0113_bent_banshee.sql Enforce unique team names within a season 2026-05-23 16:55:08 -07:00
0114_warm_swarm.sql claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00
0115_spooky_spot.sql claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00
0116_panoramic_human_cannonball.sql Fix draft timer: broadcasts, increments, reconnect sync, overnight pause (#72) 2026-06-06 05:57:46 +00:00
0117_fix_picks_expires_at.sql Add idempotent migration for picks_expires_at / picks_started_at columns 2026-06-05 23:44:49 -07:00
0118_chunky_vivisector.sql Phase A: external HTTP cron jobs for snapshots, standings sync, and simulation (#79) 2026-06-08 07:42:14 +00:00
0119_eminent_siren.sql sync racing standings (#80) 2026-06-10 04:25:48 +00:00
0120_tidy_invaders.sql claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
0121_even_gambit.sql claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
0122_soft_longshot.sql Unify majors: score once, fan out across windows + tennis bracket EV 2026-06-22 20:32:22 -07:00
0123_previous_expediter.sql Auto-populate & auto-score tennis Grand Slam brackets from Wikipedia 2026-06-26 21:48:00 -07:00