Fix slow bracket save and stale projected points #54
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/bracket-save-projected-points"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
updateProbabilitiesAfterResultruns beforerecalculateAffectedLeaguesinprocessMatchResult,processPlayoffEvent, and theset-round-winnersroute — projected points now reflect the new result immediately instead of waiting on the next simulation.calculateTeamProjectedScoreby pre-fetching every EV the season needs in a singleinArrayquery insiderecalculateStandingsand passing the map down.skipProbabilitiesoption toprocessPlayoffEvent, used fromautoCompleteRoundIfDone(callers have already refreshed EVs), avoiding a redundant pass on round-completing saves.Fixes #31
Test plan
npm run typechecknpx vitest run app/models/__tests__/team-projected-score.test.ts app/models/__tests__/process-match-result.test.ts app/services/__tests__/probability-updater.test.ts— 57/57 passing🤖 Generated with Claude Code