## Summary - 0-3 teams in Stage 3 were being assigned slots 9–10 (high QP) when marked eliminated before other Stage 3 teams, because `computeStage3ExitQP` filled from slot 9 upward using only the teams passed in - 1-3 teams had the same problem when marked before 2-3 teams - Fix: gate all Stage 3 QP computation on `stage3Exits.length === STAGE3_TOTAL_EXITS` (8) — partial saves write 0 QP as a placeholder, and correct QP/placements are assigned once all 8 exits are known - As belt-and-suspenders, `computeStage3ExitQP` now places 0-wins teams from the bottom of the slot range so the function itself is correct even if called with a partial set ## Test plan - [ ] Run `npm run test:run -- app/models/__tests__/cs2-major-stage.test.ts` — all 17 tests pass - [ ] Mark 2 Stage 3 teams as 0-3 eliminated and save — confirm they show 0 QP (not 2 QP) - [ ] Mark all 8 Stage 3 exits and save — confirm 0-3 teams get slots 15–16 QP, 1-3 teams get slots 12–14 QP split correctly 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Chris Parsons <chrisparsons1127@gmail.com> Reviewed-on: #89 |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| match-sync | ||
| 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 | ||