The before/after QP diff (with its null = "no prior award" and null → value "first-time score" semantics) was duplicated in processQualifyingEvent and rescoreTennisBracketAndDetectChanges. The two entry points must stay separate (tennis snapshots before an authoritative delete-all; CS2 preserves rows), but the comparison itself should live in one place. Add diffChangedQualifyingPoints(before, after) in qualifying-points.ts and call it from both paths. Unit-tested directly; the two integration tests still cover the end-to-end behavior. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hq3fG4Zn3unntbSQAGSqCq |
||
|---|---|---|
| .. | ||
| __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 | ||
| qualifying-points-discord.server.ts | ||
| sync-tournament-results.ts | ||