* Add CS2 Major qualifying points simulator Implements a full CS2 Major tournament simulator with: - 3-stage Swiss format (Opening Bo1, Elimination Bo1/Bo3, Decider all Bo3) + Champions Stage 8-team single-elimination (QF Bo3, SF Bo3, GF Bo5) - Monte Carlo simulation (10,000 iterations) accumulating QP across 2 majors/season - Sampled 24-team field per iteration: top 12 guaranteed, remaining weighted by 1/rank - Stage 3 exits (placements 9-16) sub-ranked by W-L record (2-3 > 1-3 > 0-3) - Stage assignments stored per-event so actual field composition drives simulation - Admin CS Elo form for entering team Elo + HLTV world rankings - Admin CS2 stage setup page for assigning teams to stages and tracking advancement - Database migration: cs2_major_qualifying_points enum value + cs2_major_stage_results table - 24 unit tests covering all exported pure functions https://claude.ai/code/session_019w21Nkf5TvTZHH6oVHaQXR * Consolidate Elo + ranking input into generic elo-ratings page The darts-elo and cs-elo pages were unreachable from the admin nav, which always links to the generic elo-ratings page. Extended elo-ratings to conditionally show world ranking fields for simulator types that need it (darts_bracket, cs2_major_qualifying_points), then deleted the redundant sport-specific pages. https://claude.ai/code/session_019w21Nkf5TvTZHH6oVHaQXR * Consolidate server postgres connections into one shared pool Four separate postgres() clients were open simultaneously (app, timer, snapshots, socket), each defaulting to 10 connections, exhausting the database's max_connections limit. Replaced with a single shared lazy- initialized client in server/db.ts using a Proxy to defer the DATABASE_URL check until first use (preserving test compatibility). Also bumps the CS2 Champions Stage stochastic test from 200 → 1000 iterations to eliminate flakiness. https://claude.ai/code/session_019w21Nkf5TvTZHH6oVHaQXR * Fix and() bug and add Swiss loop safety guard - cs2-major-stage.ts: markCs2StageEliminations and setCs2FinalPlacements were using JS && instead of Drizzle and(), causing WHERE to filter only by participantId (not scoringEventId), which would update rows across all events instead of just the target event - cs-major-simulator.ts: add break guard in simulateSwiss while loop to prevent infinite loop if pairGroups returns no pairs https://claude.ai/code/session_019w21Nkf5TvTZHH6oVHaQXR * Fix all remaining code review issues - cs2-major-stage.ts: use schema column reference for stageEliminated in markCs2StageEliminations instead of raw SQL string - cs-major-simulator.ts: simulateOneMajor now locks in known stage results when a stage is complete (8 recorded eliminations), only simulating the remaining stages during live events - admin event page: add CS2 Stage Setup button for cs2_major_qualifying_points simulator types; expose simulatorType in server loader type cast - cs2-setup.tsx: replace document.getElementById DOM manipulation with React state (eliminatedChecked map) for checkbox show/hide logic; remove unused stageMap and unassignedParticipants variables https://claude.ai/code/session_019w21Nkf5TvTZHH6oVHaQXR * Fix oxlint errors: non-null assertions, sort→toSorted, unused vars - cs-major-simulator.ts: replace 5 non-null assertions (!) with safe optional chaining / if-guards; replace 6 .sort() with .toSorted() - cs2-major-stage.ts: remove unused `inArray` import - cs2-setup.tsx: remove unused `assignedIds` variable https://claude.ai/code/session_019w21Nkf5TvTZHH6oVHaQXR * Fix flaky Champions Stage stochastic test The makeTeams(8) helper creates only a 70-pt Elo spread (1800→1730). With the Champions Stage bracket math this gives team-0 a ~19.6% win rate — right at the 0.2 threshold, causing the test to fail ~63% of the time in CI despite 1000 iterations. Use 100-pt steps (1800→1100) instead, giving team-0 a ~40% win rate and raising the assertion threshold to 0.25 for a clear safety margin. https://claude.ai/code/session_019w21Nkf5TvTZHH6oVHaQXR --------- Co-authored-by: Claude <noreply@anthropic.com>
489 lines
No EOL
10 KiB
JSON
489 lines
No EOL
10 KiB
JSON
{
|
|
"version": "7",
|
|
"dialect": "postgresql",
|
|
"entries": [
|
|
{
|
|
"idx": 0,
|
|
"version": "7",
|
|
"when": 1732076135211,
|
|
"tag": "0000_short_donald_blake",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 1,
|
|
"version": "7",
|
|
"when": 1760165302772,
|
|
"tag": "0001_serious_la_nuit",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 2,
|
|
"version": "7",
|
|
"when": 1760166775427,
|
|
"tag": "0002_tired_iron_man",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 3,
|
|
"version": "7",
|
|
"when": 1760167848365,
|
|
"tag": "0003_public_shadowcat",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 4,
|
|
"version": "7",
|
|
"when": 1760168383812,
|
|
"tag": "0004_spicy_zarda",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 5,
|
|
"version": "7",
|
|
"when": 1760169537260,
|
|
"tag": "0005_abnormal_thunderbird",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 6,
|
|
"version": "7",
|
|
"when": 1760241924414,
|
|
"tag": "0006_needy_junta",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 7,
|
|
"version": "7",
|
|
"when": 1760327817376,
|
|
"tag": "0007_pink_nebula",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 8,
|
|
"version": "7",
|
|
"when": 1760375514773,
|
|
"tag": "0008_salty_trauma",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 9,
|
|
"version": "7",
|
|
"when": 1760392647508,
|
|
"tag": "0009_fuzzy_korvac",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 10,
|
|
"version": "7",
|
|
"when": 1760469105799,
|
|
"tag": "0010_complex_the_stranger",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 11,
|
|
"version": "7",
|
|
"when": 1760501621605,
|
|
"tag": "0011_gifted_mystique",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 12,
|
|
"version": "7",
|
|
"when": 1760504208398,
|
|
"tag": "0012_yielding_phil_sheldon",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 13,
|
|
"version": "7",
|
|
"when": 1760543654915,
|
|
"tag": "0013_pink_the_order",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 14,
|
|
"version": "7",
|
|
"when": 1760588333462,
|
|
"tag": "0014_lowly_gateway",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 15,
|
|
"version": "7",
|
|
"when": 1760589195551,
|
|
"tag": "0015_exotic_loners",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 16,
|
|
"version": "7",
|
|
"when": 1760590495868,
|
|
"tag": "0016_majestic_roulette",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 17,
|
|
"version": "7",
|
|
"when": 1760599350154,
|
|
"tag": "0017_calm_zarda",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 18,
|
|
"version": "7",
|
|
"when": 1760996053371,
|
|
"tag": "0018_numerous_stardust",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 19,
|
|
"version": "7",
|
|
"when": 1761112236540,
|
|
"tag": "0019_acoustic_ben_grimm",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 20,
|
|
"version": "7",
|
|
"when": 1761719248881,
|
|
"tag": "0020_slim_spacker_dave",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 21,
|
|
"version": "7",
|
|
"when": 1762190473418,
|
|
"tag": "0021_fair_ser_duncan",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 22,
|
|
"version": "7",
|
|
"when": 1762191156317,
|
|
"tag": "0022_shiny_mother_askani",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 23,
|
|
"version": "7",
|
|
"when": 1762200550705,
|
|
"tag": "0023_cynical_jack_power",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 24,
|
|
"version": "7",
|
|
"when": 1763276901482,
|
|
"tag": "0024_faithful_mesmero",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 25,
|
|
"version": "7",
|
|
"when": 1763277000000,
|
|
"tag": "0025_rename_participant_ev_season_to_sports_season",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 26,
|
|
"version": "7",
|
|
"when": 1763278000000,
|
|
"tag": "0026_add_source_odds_to_participant_ev",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 27,
|
|
"version": "7",
|
|
"when": 1763279000000,
|
|
"tag": "0027_add_projected_points_to_team_standings",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 28,
|
|
"version": "7",
|
|
"when": 1763280000000,
|
|
"tag": "0028_add_tournament_groups",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 29,
|
|
"version": "7",
|
|
"when": 1763281000000,
|
|
"tag": "0029_change_participant_ev_to_decimal",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 30,
|
|
"version": "7",
|
|
"when": 1763282000000,
|
|
"tag": "0030_add_draft_picks_unique_slot",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 31,
|
|
"version": "7",
|
|
"when": 1763283000000,
|
|
"tag": "0031_add_autodraft_queue_only",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 32,
|
|
"version": "7",
|
|
"when": 1763284000000,
|
|
"tag": "0032_consolidate_playoff_pattern",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 33,
|
|
"version": "7",
|
|
"when": 1763285000000,
|
|
"tag": "0033_add_schedule_event_type",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 34,
|
|
"version": "7",
|
|
"when": 1763286000000,
|
|
"tag": "0034_add_ev_snapshots",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 35,
|
|
"version": "7",
|
|
"when": 1763287000000,
|
|
"tag": "0035_increase_prob_precision",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 36,
|
|
"version": "7",
|
|
"when": 1763288000000,
|
|
"tag": "0036_increase_ev_precision",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 37,
|
|
"version": "7",
|
|
"when": 1763289000000,
|
|
"tag": "0037_add_simulator_type_to_sports",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 38,
|
|
"version": "7",
|
|
"when": 1773122866361,
|
|
"tag": "0038_sad_wilson_fisk",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 39,
|
|
"version": "7",
|
|
"when": 1773200000000,
|
|
"tag": "0039_add_ucl_bracket_simulator_type",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 40,
|
|
"version": "7",
|
|
"when": 1773262080928,
|
|
"tag": "0040_fat_puma",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 41,
|
|
"version": "7",
|
|
"when": 1773557500336,
|
|
"tag": "0041_great_magma",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 42,
|
|
"version": "7",
|
|
"when": 1773600000000,
|
|
"tag": "0042_migrate_event_date_to_starts_at",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 43,
|
|
"version": "7",
|
|
"when": 1773634394633,
|
|
"tag": "0043_demonic_vanisher",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 44,
|
|
"version": "7",
|
|
"when": 1773700000000,
|
|
"tag": "0044_add_ncaam_bracket_simulator_type",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 45,
|
|
"version": "7",
|
|
"when": 1773710000000,
|
|
"tag": "0045_add_ncaaw_bracket_simulator_type",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 46,
|
|
"version": "7",
|
|
"when": 1773720000000,
|
|
"tag": "0046_add_nba_bracket_simulator_type",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 47,
|
|
"version": "7",
|
|
"when": 1773730000000,
|
|
"tag": "0047_fix_nba_bracket_simulator_type",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 48,
|
|
"version": "7",
|
|
"when": 1773765768905,
|
|
"tag": "0048_eager_songbird",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 49,
|
|
"version": "7",
|
|
"when": 1773800000000,
|
|
"tag": "0049_add_admin_picked_by_type",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 50,
|
|
"version": "7",
|
|
"when": 1773821310661,
|
|
"tag": "0050_chief_peter_quill",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 51,
|
|
"version": "7",
|
|
"when": 1773900000000,
|
|
"tag": "0051_add_standings_snapshot_unique_index",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 52,
|
|
"version": "7",
|
|
"when": 1773897678653,
|
|
"tag": "0052_new_warbird",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 53,
|
|
"version": "7",
|
|
"when": 1773903201189,
|
|
"tag": "0053_smooth_kingpin",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 54,
|
|
"version": "7",
|
|
"when": 1774070769112,
|
|
"tag": "0054_massive_vulcan",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 55,
|
|
"version": "7",
|
|
"when": 1774072156237,
|
|
"tag": "0055_special_vampiro",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 56,
|
|
"version": "7",
|
|
"when": 1774167142673,
|
|
"tag": "0056_jittery_the_fallen",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 57,
|
|
"version": "7",
|
|
"when": 1774239259550,
|
|
"tag": "0057_cultured_doctor_doom",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 58,
|
|
"version": "7",
|
|
"when": 1774310000000,
|
|
"tag": "0058_add_unique_participant_ev",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 59,
|
|
"version": "7",
|
|
"when": 1774329951326,
|
|
"tag": "0059_mysterious_jack_murdock",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 60,
|
|
"version": "7",
|
|
"when": 1774330910098,
|
|
"tag": "0060_omniscient_outlaw_kid",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 61,
|
|
"version": "7",
|
|
"when": 1774410244601,
|
|
"tag": "0061_violet_mephistopheles",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 62,
|
|
"version": "7",
|
|
"when": 1774500000000,
|
|
"tag": "0062_add_mlb_bracket_simulator_type",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 63,
|
|
"version": "7",
|
|
"when": 1774504559479,
|
|
"tag": "0063_bored_ultimo",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 64,
|
|
"version": "7",
|
|
"when": 1774598151282,
|
|
"tag": "0064_fuzzy_wolfsbane",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 65,
|
|
"version": "7",
|
|
"when": 1774719902130,
|
|
"tag": "0065_kind_mantis",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 66,
|
|
"version": "7",
|
|
"when": 1774802533652,
|
|
"tag": "0066_stiff_siren",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 67,
|
|
"version": "7",
|
|
"when": 1774900000000,
|
|
"tag": "0067_darts_bracket",
|
|
"breakpoints": true
|
|
},
|
|
{
|
|
"idx": 68,
|
|
"version": "7",
|
|
"when": 1775000000000,
|
|
"tag": "0068_cs2_major_simulator",
|
|
"breakpoints": true
|
|
}
|
|
]
|
|
} |