brackt/app/models
Claude efec504c08
Fix qualifying points scoring, Discord rounding, and majors count
Four related bugs in the Qualifying Points subsystem surfaced on Wimbledon:

1. Some leagues stored 2 QP instead of 1.5 for Round-of-16 losers. Sibling/
   mirror windows scored via the placement-group path in processQualifyingEvent,
   which took the tie span from the players present on that window's roster
   (a draftable subset) instead of the full field. A window holding fewer than
   the 8 tied R16 losers split the 9-16 points too few ways and over-awarded.
   The tie span is now derived from the canonical tournament_results (the whole
   field) for tournament-linked events, falling back to the live count only for
   standalone events. Every league now scores identically.

2. Discord notifications rounded QP with Math.round, turning 1.5 into "2".
   Both the "Points Awarded" and "QP Standings" values now use a 2-decimal
   formatter mirroring the web UI's formatQP, so Discord and the site agree.

3. The Discord "QP Standings" block ranked players only among that event's
   scorers, showing two R16 losers as T1 instead of T9. Rank is now computed
   over the full season field and passed through to the notifier.

4. "N of M majors completed" reached "11 of 4": majorsCompleted was a stored
   counter incremented on every fan-out sync with a guard that misfired. It is
   now derived on read (getMajorsCompleted = count of completed qualifying
   events), which is self-correcting; the increment/decrement writes are removed
   along with the now-unused hasProcessedQualifyingPlacement helper.

Adds scripts/backfill-qp-resplit.ts to silently re-score existing majors so
already-corrupted seasons are corrected (2 -> 1.5), and threads a
skipNotifications option through processQualifyingEvent / syncTournamentResults
so the backfill does not re-ping every league.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017AUcHy9m7aF6axsY6Grpe4
2026-07-03 20:40:47 +00:00
..
__tests__ Fix qualifying points scoring, Discord rounding, and majors count 2026-07-03 20:40:47 +00:00
account.ts Add opt-in Discord pings to standings notifications (#429) 2026-05-15 10:06:54 -07:00
audit-log.ts
autodraft-settings.ts
canonical-golf-skills.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
canonical-surface-elo.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
commissioner.ts Refactor user profile to comprehensive settings page (#403) 2026-05-10 17:26:14 -07:00
cs2-major-stage.ts claude/discord-qualifying-points-t55s3x (#121) 2026-07-01 17:29:45 +00:00
draft-pick.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
draft-queue.ts
draft-slot.ts Fix draft order initialization for teams added mid-season (#449) 2026-05-19 18:22:47 -07:00
draft-timer.ts
draft-utils.ts Fix draft timer: broadcasts, increments, reconnect sync, overnight pause (#72) 2026-06-06 05:57:46 +00:00
ev-snapshot.ts
event-result.ts Add not-participating exclusion support for event results (#446) 2026-05-19 11:13:32 -07:00
golf-skills.ts Canonical golf skills migration + copy participants feature (#369) 2026-05-02 10:29:28 -07:00
group-stage-match.ts Fix World Cup group stage display and upcoming events (#55) 2026-05-27 05:43:08 +00:00
index.ts claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
league.ts admin fixes (#85) 2026-06-11 00:32:22 +00:00
participant-expected-value.ts Centralize futures odds onto the simulator page and fix bulk import (#117) 2026-06-30 17:05:52 +00:00
participant-result.ts claude/bracket-wins-minimum-qp-el8z14 (#99) 2026-06-19 01:25:17 +00:00
participant-season-result.ts sync racing standings (#80) 2026-06-10 04:25:48 +00:00
participant.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
pending-standings-mappings.ts
playoff-match-game.ts
playoff-match-odds.ts
playoff-match.ts Announce drafted tennis players eliminated in non-scoring rounds 2026-07-03 14:42:06 +00:00
qualifying-points.ts Fix qualifying points scoring, Discord rounding, and majors count 2026-07-03 20:40:47 +00:00
regular-season-standings.ts Deduplicate soccer simulator helpers (#391) 2026-05-07 11:48:57 -07:00
scoring-calculator.ts Fix qualifying points scoring, Discord rounding, and majors count 2026-07-03 20:40:47 +00:00
scoring-event-types.ts Fix Docker build failure caused by server-only import reaching client bundle 2026-07-01 22:36:25 +00:00
scoring-event.ts Fix qualifying points scoring, Discord rounding, and majors count 2026-07-03 20:40:47 +00:00
scoring-rules.ts Fix QP tie rounding and finalized scoring (#440) 2026-05-17 21:58:53 -07:00
season-match.ts claude/great-lovelace-r3bznh (#88) 2026-06-12 22:35:35 +00:00
season-participant.ts claude/charming-tesla-re9ur7 (#93) 2026-06-16 22:11:01 +00:00
season-sport.ts claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00
season-template-sport.ts claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00
season-template.ts claude/sports-templates-conversion-ILWAM (#71) 2026-06-04 21:31:49 +00:00
season.ts claude/funny-maxwell-vcyb19 (#91) 2026-06-15 22:05:25 +00:00
simulator.ts Centralize futures odds onto the simulator page and fix bulk import (#117) 2026-06-30 17:05:52 +00:00
sport.ts Add public sports overview page (#451) 2026-05-19 23:02:58 -07:00
sports-season.ts Address code-review findings on draft schedule Gantt 2026-07-02 02:33:15 +00:00
standings.ts
surface-elo.ts Canonical tournament layer: 2026-05-01 21:04:48 -07:00
team-score-events.ts claude/charming-tesla-re9ur7 (#93) 2026-06-16 22:11:01 +00:00
team.ts Enforce unique team names within a season 2026-05-23 16:55:08 -07:00
tournament-group.ts
tournament-result.ts Canonical tournament layer: schema + backfill (1/2) (#365) 2026-05-01 20:13:18 -07:00
tournament.ts Improve shared-tournament/event management UX 2026-07-02 05:17:37 +00:00
user.ts Add admin user management interface with search and username editing (#431) 2026-05-15 12:07:51 -07:00
watchlist.ts Mobile draft room improvements: watchlist, collapsible picks feed, autodraft controls (#355) 2026-04-29 11:49:26 -07:00