|
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 1m35s
🚀 Deploy / ʦ TypeScript (pull_request) Successful in 1m20s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 49s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Saving a bracket result was slow and left the projected-points column showing pre-result EVs until the next simulation. Root causes: - Side effects ran in the wrong order: recalculateAffectedLeagues (which reads EVs to compute projected points) fired before updateProbabilitiesAfterResult wrote the new EVs. - calculateTeamProjectedScore issued one getParticipantEV query per unfinished pick, multiplied by every team in every affected league. Changes: - Swap side-effect order in processMatchResult, processPlayoffEvent, and the set-round-winners route so probabilities update first. - Pre-fetch every EV referenced by a season's draft picks in a single inArray query inside recalculateStandings and pass the map down to calculateTeamProjectedScore (with a getParticipantEV fallback). - Add skipProbabilities option to processPlayoffEvent and use it from autoCompleteRoundIfDone, where the caller has already refreshed EVs. Fixes #31 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| simulations | ||
| standings-sync | ||
| bracket-simulator.ts | ||
| brackt.server.ts | ||
| discord.ts | ||
| draft-autostart.ts | ||
| draft-discord.server.ts | ||
| draft-email.server.ts | ||
| ev-calculator.ts | ||
| icm-calculator.ts | ||
| probability-engine.ts | ||
| probability-updater.ts | ||
| sync-tournament-results.ts | ||