Fix debate transcript pages returning 404 on Vercel#4
Draft
emregucerr wants to merge 1 commit into
Draft
Conversation
The debate detail page (/debate/[id]) was loading transcript data from ../benchmark/results/debates/ using fs.readFileSync. This directory only exists in the monorepo during local development and benchmark runs — it is not included in Vercel deployments where only the web/ directory is deployed. Changes: - Add getDebateById() to benchmark-data.ts that reconstructs a DebateResult from the bundled benchmark-results.json summary data, deriving initial/final votes from vote_details - Update debate page's getDebateData() to fall back to bundled data when filesystem files aren't available - Update generateStaticParams() to fall back to bundled debate list, so all 45 debate pages are pre-rendered at build time - Show a helpful message in DebateReplay when transcript is empty instead of rendering a blank section Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cursor Bot
pushed a commit
that referenced
this pull request
Apr 9, 2026
* Phase 0+1: Benchmark engine scaffolding - models, prompts, API client, audience, debate engine, scoring, tests Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Fix: min max_tokens for OpenAI models (>=16), handle null content in question gen Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Add benchmark runner.py for full 45-matchup benchmark Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Phase 2+3: Web app with leaderboard, arena, SSE debate API, generated visual assets Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Fix: remove nested git repo in web/, add all web files properly Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Add results sync script, fix data loading, update synced data Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Add RecentDebates sidebar, sync 2 debate results Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Add debate replay pages with full transcript, vote analysis, and vote shift table Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Generate full 45-debate sample results (2 real + 43 simulated), populate leaderboard and judge analysis Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Add comprehensive README with architecture docs, model table, getting started guide Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Add model detail pages: ELO, win rate, h2h records, judge profile, debate history Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Add fallback for empty cross-exam questions before full benchmark run Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Batch judge calls (3 at a time) to avoid credit pre-auth spikes Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Fix: always load existing debates to skip them, dotenv override=True for new API key Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 3 real benchmark debates (debates 1-3 complete, debate 4 in progress) Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 5 real debates, benchmark running steadily (~$1/debate) Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 7 real debates Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 9 real debates (10th in progress) Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 11 real debates Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 15 real debates ($12.58 credits remaining) Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 17 real debates Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 20 real debates - past halfway mark Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 22 real debates (~50%) Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Parallelize benchmark: run 3 debates concurrently in batches Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 29 real debates (parallel execution working, ~3x speedup) Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * Sync 32 real debates (auto top-up replenished credits) Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> * 🏆 Complete benchmark: all 45 real debates finished, final ELO leaderboard FINAL RESULTS (45 real head-to-head debates): #1 Claude Opus 4.6 (Thinking) ELO: 1590 #2 Grok 4.20 (Reasoning) ELO: 1577 #3 Grok 4.20 Multi-Agent ELO: 1560 #4 Grok 4.20 ELO: 1546 #5 GPT-5.2 Chat ELO: 1546 #6 Claude Opus 4.6 ELO: 1508 #7 Gemini 3 Flash ELO: 1459 #8 Gemini 3 Pro ELO: 1430 #9 GPT-5.4 (High) ELO: 1407 #10 Gemini 3.1 Pro Preview ELO: 1377 Stats: 1,038 API calls, 9.2M input tokens, 1.2M output tokens, 0 errors Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com>
cursor Bot
pushed a commit
that referenced
this pull request
Apr 9, 2026
…oard FINAL RESULTS (45 real head-to-head debates): #1 Claude Opus 4.6 (Thinking) ELO: 1590 #2 Grok 4.20 (Reasoning) ELO: 1577 #3 Grok 4.20 Multi-Agent ELO: 1560 #4 Grok 4.20 ELO: 1546 #5 GPT-5.2 Chat ELO: 1546 #6 Claude Opus 4.6 ELO: 1508 #7 Gemini 3 Flash ELO: 1459 #8 Gemini 3 Pro ELO: 1430 #9 GPT-5.4 (High) ELO: 1407 #10 Gemini 3.1 Pro Preview ELO: 1377 Stats: 1,038 API calls, 9.2M input tokens, 1.2M output tokens, 0 errors Co-authored-by: Emre Gucer <emregucerr@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Debate detail pages like
/debate/debate-041-grok-4.20-reasoning-vs-grok-4.20-multi-agentreturn 404 after deploying to Vercel.Root cause
The debate page (
/debate/[id]/page.tsx) loads transcript data usingfs.readFileSyncfrom../benchmark/results/debates/, a path that only exists in the monorepo during local development or benchmark runs. On Vercel, only theweb/directory is deployed, so the filesystem read always fails andgetDebateData()returnsnull, triggeringnotFound().Additionally,
generateStaticParams()tried to enumerate debate files from the same missing directory, returning[]— meaning zero debate pages were pre-rendered at build time.Fix
web/src/lib/benchmark-data.tsgetDebateById(debateId)that reconstructs a fullDebateResultfrom the bundledbenchmark-results.jsonsummary datainitial_votesandfinal_votesarrays from thevote_detailsalready present in each debate's score objectweb/src/app/debate/[id]/page.tsxgetDebateData()now falls back togetDebateById()when the filesystem path doesn't existgenerateStaticParams()now falls back to the bundled debate list, so all 45 debate pages are pre-rendered at build timeweb/src/components/debate/DebateReplay.tsxVerification
Build output confirms all 45 debate pages are now statically generated: