brackt/app/services
Claude ac33e9e223
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m50s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Failing after 51s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
fix: address 10 code review issues in match sync system
- Fix 1 (CRITICAL): CS2 "Sync from API" button was always 401 because it
  POSTed to /admin/jobs/sync-matches which requires a cron secret header
  that browsers can't send. Added sync-matches intent to cs2-setup action.

- Fix 2 (CRITICAL): loserAdvances was hardcoded false in match-sync/index.ts,
  breaking NBA Play-In scoring. Now calls doesLoserAdvance().

- Fix 3: ESPN score "0" was falsy → stored as null. Non-numeric strings
  like "F/OT" produced NaN. Added parseScore() helper.

- Fix 4: ESPN limit=1000 silently truncated MLB/NBA playoff games. Added
  seasonType param to EspnScheduleAdapter; all *_bracket types pass 3
  (postseason only).

- Fix 5: Cron job was syncing completed seasons unnecessarily. Added
  active status filter.

- Fix 6: hasLiveMatches triggered perpetual 30s polling for unseeded
  brackets. Added participant presence check.

- Fix 7: autoCompleteRoundIfDone was duplicated between bracket.server.ts
  and scoring-calculator.ts. Removed inline copy, imported shared version.

- Fix 8: MatchSchedule date grouping never ran for ESPN sports (no matchday
  field). Removed hasMatchdays gate, always call groupByMatchday with
  stable UTC date key.

- Fix 9: Silent failure when bracket matches exist but no scoring events.
  Added warning log.

- Fix 10: Added 3 tests — zero score preservation, NaN from non-numeric
  score, seasonType in URL.

https://claude.ai/code/session_01WUUM7uWzFoSkGcZRhnEKG6
2026-06-12 21:53:06 +00:00
..
__tests__ claude/discord-pick-notification-refactor-FeusJ (#58) 2026-05-29 16:24:22 +00:00
match-sync fix: address 10 code review issues in match sync system 2026-06-12 21:53:06 +00:00
simulations Fix remaining world-cup simulator test timeouts (100 → 20 iterations) 2026-06-06 09:47:24 -07:00
standings-sync mlb fix (#87) 2026-06-12 04:09:51 +00:00
bracket-simulator.ts Replace console.* with structured logger, fix no-inferrable-types (closes #98) (#199) 2026-03-21 13:41:39 -07:00
brackt.server.ts Add Brackt as a league-private meta-sport (#200) (#377) 2026-05-04 20:31:44 -07:00
discord.ts claude/discord-pick-notification-refactor-FeusJ (#58) 2026-05-29 16:24:22 +00:00
draft-autostart.ts Add auto-start draft at scheduled time (#437) (#438) 2026-05-16 23:37:29 -07:00
draft-discord.server.ts claude/discord-pick-notification-refactor-FeusJ (#58) 2026-05-29 16:24:22 +00:00
draft-email.server.ts Add draft email notifications feature (#459) 2026-05-20 15:35:43 -07:00
ev-calculator.ts fix: address VORP code review issues (#283) 2026-04-08 23:20:02 -04:00
icm-calculator.ts Replace console.* with structured logger, fix no-inferrable-types (closes #98) (#199) 2026-03-21 13:41:39 -07:00
probability-engine.ts Fix NCAAW futures odds simulation and admin import UX (#420) 2026-05-13 01:06:16 -07:00
probability-updater.ts Fix slow bracket save and stale projected points (#54) 2026-05-27 04:28:10 +00:00
sync-tournament-results.ts Canonical tournament layer: 2026-05-01 21:04:48 -07:00