brackt/app/services
Claude 8990bf4281
Condition CS2 Major simulator on already-known results
The CS2 Major projected-points simulator re-simulated outcomes that had
already happened, so its projections drifted from reality as a major
played out. Specifically it ignored the Champions Stage bracket entirely
(re-simulating the whole 8-team playoff each iteration), only locked in
Swiss stages all-or-nothing once 8 eliminations were recorded, seeded the
bracket by world rank rather than real Stage 3 performance, and read
qualifying points only from fully-completed events.

This conditions each simulation on whatever is already known and only
randomizes the undecided remainder:

- Champions Stage now honors the real bracket (playoffMatches): actual QF
  pairings supply the seeding, and any completed QF/SF/Final result is used
  verbatim instead of re-simulated. Falls back to Elo seeding when no
  bracket exists.
- Swiss stages reconstruct each team's current W-L from real match results
  (seasonMatches) so partly-played stages lock in their decided games and
  only the remaining teams are simulated; generalize simulateSwiss to start
  from seeded records.
- Provisional QP already written to event_results for settled (eliminated)
  teams is used verbatim.
- reconcileAdvancers keeps each stage at exactly 8 advancers so ragged
  mid-stage snapshots can't produce malformed downstream stages.

Adds unit coverage for bracket honoring (full and partial), partial-stage
locking, and recorded-QP override.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018zMG6JFng8bMqZYweffVuE
2026-06-20 02:14:49 +00:00
..
__tests__ claude/discord-pick-notification-refactor-FeusJ (#58) 2026-05-29 16:24:22 +00:00
match-sync claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
simulations Condition CS2 Major simulator on already-known results 2026-06-20 02:14:49 +00:00
standings-sync mlb fix (#87) 2026-06-12 04:09:51 +00:00
bracket-simulator.ts Replace console.* with structured logger, fix no-inferrable-types (closes #98) (#199) 2026-03-21 13:41:39 -07:00
brackt.server.ts Add Brackt as a league-private meta-sport (#200) (#377) 2026-05-04 20:31:44 -07:00
discord.ts claude/discord-pick-notification-refactor-FeusJ (#58) 2026-05-29 16:24:22 +00:00
draft-autostart.ts Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
draft-discord.server.ts claude/discord-pick-notification-refactor-FeusJ (#58) 2026-05-29 16:24:22 +00:00
draft-email.server.ts Add draft email notifications feature (#459) 2026-05-20 15:35:43 -07:00
ev-calculator.ts fix: address VORP code review issues (#283) 2026-04-08 23:20:02 -04:00
icm-calculator.ts Replace console.* with structured logger, fix no-inferrable-types (closes #98) (#199) 2026-03-21 13:41:39 -07:00
probability-engine.ts Fix NCAAW futures odds simulation and admin import UX (#420) 2026-05-13 01:06:16 -07:00
probability-updater.ts Fix slow bracket save and stale projected points (#54) 2026-05-27 04:28:10 +00:00
sync-tournament-results.ts Canonical tournament layer: 2026-05-01 21:04:48 -07:00