Skip to content

Fix duplicate leaderboard PRs; add reset_results knob#34

Closed
isPANN wants to merge 1 commit into
mainfrom
fix/leaderboard-pr-dedup
Closed

Fix duplicate leaderboard PRs; add reset_results knob#34
isPANN wants to merge 1 commit into
mainfrom
fix/leaderboard-pr-dedup

Conversation

@isPANN

@isPANN isPANN commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Problem (spotted while testing): triggering score-from-r2 twice opened two identical leaderboard PRs (#32/#33) — each run used a fresh bot/leaderboard-<run_id> branch, so there was no dedup.

Fixes:

  • One rolling PR — use a single bot/leaderboard branch, force-updated each run; create the PR only if none is open, else update its title. At most one open leaderboard PR ever.
  • reset_results input — a manual workflow_dispatch boolean that wipes R2 results/ before scoring, to clear stale scored files (e.g. a pre---test-marker entry that keeps resurfacing on the board).
  • Pluralize the title (1 model, not 1 models).

Note: the two --test submissions were correctly excluded from the board; the lingering claude-sonnet-4-6: 1 was that stale pre-marker scored file in R2 — reset_results clears it.

🤖 Generated with Claude Code

https://claude.ai/code/session_018xw6L5yUrz33UrQpanbwnH

…e title

Each scoring run opened a fresh bot/leaderboard-<run_id> PR, so triggering the
workflow twice produced duplicate identical PRs (e.g. #32/#33) with no dedup.
Use a single rolling branch `bot/leaderboard`, force-updated every run, and
create the PR only if one isn't already open (else update its title) — so there
is at most one open leaderboard PR ever.

Also add a `reset_results` workflow_dispatch input that wipes R2 results/ before
scoring, to clear stale scored files (e.g. a pre-test-marker entry that keeps
resurfacing on the board), and fix the "1 models/bugs" pluralization.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018xw6L5yUrz33UrQpanbwnH
@isPANN

isPANN commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator Author

Superseded by #35 — the per-submission board makes each submission its own PR (idempotent by slug), which subsumes the single-rolling-PR dedup here. #35 also carries the reset_results input.

@isPANN isPANN closed this Jul 6, 2026
@isPANN isPANN deleted the fix/leaderboard-pr-dedup branch July 6, 2026 06:48
isPANN added a commit that referenced this pull request Jul 6, 2026
The public leaderboard was a single site/results.json updated by one aggregate
PR, so all models were coupled — you couldn't accept, hold, or revert one
model's result without the whole board, and triggering the scorer twice opened
duplicate PRs (no dedup).

Make each submission its own reviewable unit:
- Source of truth is now one file per submission, site/results/<slug>.json, where
  slug = <model>--<UTC-time>--<short-id>, derived deterministically from the
  scored file (backend_score.board_slug/board_entry/write_board_entries). Test
  submissions produce no public file.
- score-from-r2.yml opens ONE PR per new/changed entry on branch
  bot/leaderboard/<slug>. The slug is stable, so re-scoring the same submission
  force-updates the SAME branch/PR (idempotent — no duplicates); a different
  submission is its own independently mergeable/revertible PR.
- site/results.json becomes a generated artifact: publish-on-merge aggregates
  site/results/*.json (best run per model) via `backend_score --build-board`,
  guards each entry + the built board, and deploys. It is gitignored; `make
  board` / `make serve` build it locally.
- check_aggregate accepts a single-entry object (per-submission file) as well as
  the list, and allows the timestamp/submission_id provenance tags.
- Also adds a reset_results workflow input (supersedes PR #34) and fixes the
  root-anchored /results/ gitignore so it no longer shadows site/results/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018xw6L5yUrz33UrQpanbwnH
isPANN added a commit that referenced this pull request Jul 6, 2026
The public leaderboard was a single site/results.json updated by one aggregate
PR, so all models were coupled — you couldn't accept, hold, or revert one
model's result without the whole board, and triggering the scorer twice opened
duplicate PRs (no dedup).

Make each submission its own reviewable unit:
- Source of truth is now one file per submission, site/results/<slug>.json, where
  slug = <model>--<UTC-time>--<short-id>, derived deterministically from the
  scored file (backend_score.board_slug/board_entry/write_board_entries). Test
  submissions produce no public file.
- score-from-r2.yml opens ONE PR per new/changed entry on branch
  bot/leaderboard/<slug>. The slug is stable, so re-scoring the same submission
  force-updates the SAME branch/PR (idempotent — no duplicates); a different
  submission is its own independently mergeable/revertible PR.
- site/results.json becomes a generated artifact: publish-on-merge aggregates
  site/results/*.json (best run per model) via `backend_score --build-board`,
  guards each entry + the built board, and deploys. It is gitignored; `make
  board` / `make serve` build it locally.
- check_aggregate accepts a single-entry object (per-submission file) as well as
  the list, and allows the timestamp/submission_id provenance tags.
- Also adds a reset_results workflow input (supersedes PR #34) and fixes the
  root-anchored /results/ gitignore so it no longer shadows site/results/.


Claude-Session: https://claude.ai/code/session_018xw6L5yUrz33UrQpanbwnH

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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