brackt/scripts
Chris Parsons 6772079e86
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 2m53s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m19s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
🚀 Deploy / 🧪 Test (push) Successful in 3m6s
🚀 Deploy / ʦ🔍 Typecheck & Lint (push) Successful in 1m22s
🚀 Deploy / 🐳 Build (push) Successful in 1m13s
🚀 Deploy / 🚀 Deploy (push) Successful in 13s
Reflect group stage in World Cup sim; seed R32 from real 2026 bracket
The World Cup Monte Carlo simulator ignored the admin-populated knockout
draw and re-paired its own simulated group output sequentially, so bracket
paths from the Round of 32 onward did not match the real tournament. It
also silently invented 12 synthetic groups when none were configured,
discarding real group-stage results.

Rework the simulator around three regimes:
- draw set     → simulate the real R32 matchups, advancing through the
  bracket tree via the canonical ceil(matchNumber/2) rule (matching
  advanceWinnerTemplate) so sim paths match the admin tooling.
- groups only  → simulate remaining group matches, then seed the R32 with
  the official 2026 group-position template + FIFA's exact Annex C
  best-third-place allocation (495-row published table).
- neither      → futures-seeded bracket fallback, flagged via result source.

Completed group and knockout matches still lock in real results at every
round.

New app/lib/fifa-2026-bracket.ts encodes the R32 group-position template
(official FIFA matches 73-88 mapped onto DB matchNumbers 1-16 so the tree
reproduces the real halves) and assignThirdPlaceSlots(). The Annex C table
is generated deterministically by scripts/gen-fifa-third-place.mjs into
app/lib/fifa-2026-third-place-allocation.ts.

Tests assert exact Annex C values, cross-check the template's eligible
groups against all 495 combinations, and cover each regime including the
partial-draw dedup and fully-drawn fast path.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-23 12:15:45 -07:00
..
backfill-major-linking.ts Unify majors: score once, fan out across windows + tennis bracket EV 2026-06-22 20:32:22 -07:00
build-server.mjs refactor: migrate server code from JavaScript to TypeScript with build pipeline 2025-10-18 22:16:04 -07:00
capture-baseline.ts Fix capture-baseline.ts: postgres-js returns rows directly 2026-05-01 06:07:14 +00:00
fix-group-match-times-utc.mjs claude/practical-newton-4v041g (#98) 2026-06-18 02:33:05 +00:00
gen-fifa-third-place.mjs Reflect group stage in World Cup sim; seed R32 from real 2026 bracket 2026-06-23 12:15:45 -07:00
generate-sitemap.mjs Add robots.txt and sitemap.xml.gz for SEO 2026-05-24 22:05:37 -07:00
migrate-clerk-passwords.mjs Migrate authentication from Clerk to BetterAuth (#324) 2026-04-24 22:00:49 -07:00
migrate.mjs Add email verification for email/password signups (#400) 2026-05-09 23:58:45 -07:00
sync-prod-db.sh Add branded dark-themed HTML email template (#402) 2026-05-10 11:18:57 -07:00