Skip to content

feat: store eval results in a Supabase project (AI-922) - #90

Closed
Rodriguespn wants to merge 6 commits into
mainfrom
pedrorodrigues/ai-922-supabase-results-store
Closed

feat: store eval results in a Supabase project (AI-922)#90
Rodriguespn wants to merge 6 commits into
mainfrom
pedrorodrigues/ai-922-supabase-results-store

Conversation

@Rodriguespn

@Rodriguespn Rodriguespn commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Replaces apps/web/src/data/eval-results.json with a durable postgres database hosted on Supabase as the leaderboard's source of truth, as Braintrust retention is just 30d for Pro plans.

The results are stored on project supabase-evals-results (refwuoyotyfgfnxqqraadih) belonging to Supabase Dev org and hosted on us-east-1.

Config needed

GitHub secrets SUPABASE_URL + SUPABASE_SERVICE_ROLE_KEY for CI; VITE_SUPABASE_URL + VITE_SUPABASE_PUBLISHABLE_KEY for the web build.

Closes AI-922.

@linear-code

linear-code Bot commented Jul 14, 2026

Copy link
Copy Markdown
AI-922 Store eval results in a Supabase project (durable leaderboard store)

Store eval results in a dedicated Supabase project (org: Supabase Dev) as the durable, queryable source of truth for the public leaderboard, replacing the committed apps/web/src/data/eval-results.json file. Makes CI more robust and easier to maintain.

Complements [[AI-921]] (mirror results to Braintrust for analysis/traces): Braintrust reads are free but retention is limited (14d free / 30d Pro), so it isn't a durable store for a public leaderboard. A Supabase project is durable + free-to-read and lets the web app query results directly.

Scope (rough):

  • Schema/migration for eval results in the new project
  • Uploader that writes the exported results to the project (parallels upload:braintrust)
  • Point apps/web / CI at the project instead of committing the JSON

Review in Linear

@vercel

vercel Bot commented Jul 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
evals Ignored Ignored Preview Jul 14, 2026 7:34pm

Request Review

Rodriguespn and others added 4 commits July 14, 2026 19:49
Add the schema for a durable, queryable eval-results store in a dedicated
Supabase project (supabase-evals-results), intended to replace the committed
eval-results.json as the leaderboard source of truth. Complements AI-921.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… path (AI-922)

Replace the committed apps/web/src/data/eval-results.json with a durable Supabase
store as the leaderboard source of truth.

- Real Supabase project in-repo (`supabase/`): config + migration for
  public.eval_results with RLS ("public read"), anon/authenticated SELECT grant,
  and service_role write grants (secure-by-default needs explicit grants).
- Uploader `pnpm upload:supabase`: upserts the exported snapshot by
  (experiment, eval); --dry for a credential-free preview.
- Web reads from Supabase at runtime via the anon key (data/eval-results.ts +
  a runtime result store), replacing the static JSON import.
- CI: publish-results uploads to Supabase (service-role secret) instead of
  committing/PR-ing the JSON; stop tracking the JSON (now gitignored).

Verified locally end-to-end: migration applies, uploader writes 144 rows
(idempotent), anon REST read returns all rows; web typechecks and builds.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rename VITE_SUPABASE_ANON_KEY -> VITE_SUPABASE_PUBLISHABLE_KEY; publishable keys
are preferred over legacy anon keys for frontend code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- web: validate DB rows per-row with safeParse and drop failures instead of
  throwing (a single drifted row no longer blanks the leaderboard); mount even
  if the fetch rejects, so an outage renders the empty state, not a blank page.
- ci: reduce workflow permissions to contents:read (commit/PR steps are gone);
  fail loudly when SUPABASE_* secrets are missing (Supabase is now the only
  persistence path); refresh stale merge/concurrency/empty-state comments.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Rodriguespn
Rodriguespn force-pushed the pedrorodrigues/ai-922-supabase-results-store branch from 070ebeb to 15d526f Compare July 14, 2026 18:49
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Rodriguespn Rodriguespn added run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes run-evals Add to a PR to refresh benchmark evals and removed run-evals-changed Add to a PR to refresh only the benchmark evals that have had changes labels Jul 14, 2026
@Rodriguespn

Copy link
Copy Markdown
Contributor Author

Closing this as we're not going forward with this (thread)

@raulb
raulb deleted the pedrorodrigues/ai-922-supabase-results-store branch July 29, 2026 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-evals Add to a PR to refresh benchmark evals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant