Skip to content

POC for versioned leaderboards#472

Open
msaroufim wants to merge 3 commits intomainfrom
pr-467
Open

POC for versioned leaderboards#472
msaroufim wants to merge 3 commits intomainfrom
pr-467

Conversation

@msaroufim
Copy link
Member

No description provided.

Vibe-coded proof of concept — NOT production ready, putting up for
discussion. When update-problems changes a leaderboard's task/eval,
old run scores become stale. This adds:

- task_version column on leaderboard + runs tables
- Auto-bump task_version when update_leaderboard() detects task changes
- Ranking queries filter by current task_version (old scores hidden)
- POST /admin/backfill endpoint to re-run top N submissions from
  previous versions against the new eval

Known gaps / TODOs for discussion:
- No Discord slash command yet (API-only)
- No backfill progress tracking (fire-and-forget via BackgroundSubmissionManager)
- kernelboard frontend doesn't surface task_version info
- popcorn-cli unaware of version changes
- No tests
- Needs actual deployment testing with a real eval change
- Add NOT EXISTS clause to get_top_submissions_for_backfill to skip
  users who already have a passing run at the current task_version.
  Without this, running backfill twice creates duplicate submissions.
- Collapse the two near-identical UPDATE branches in update_leaderboard
  into a single query using CASE WHEN for the version bump.
…nd tests

- Resolve merge conflicts in api/main.py (keep both backfill + export-hf endpoints)
- Update backfill migration to depend on ban-user (latest main migration)
- Add /admin backfill Discord slash command with progress tracking via
  interaction.edit_original_response() updates
- Add 5 API tests for /admin/backfill endpoint (auth, validation, noop, candidates)
- Add 7 DB tests for task versioning (version bumps, rankings filtering,
  backfill candidate discovery, exclusion of current version)
@msaroufim msaroufim changed the title Pr 467 POC for versioned leaderboards Mar 19, 2026
@github-actions
Copy link

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/libkernelbot
  leaderboard_db.py 1024
  utils.py
Project Total  

This report was generated by python-coverage-comment-action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant