Skip to content

ci(leaderboard): run the three shell steps as one Python call each (#2812) - #2818

Merged
zackees merged 2 commits into
masterfrom
infra/2812-leaderboard-python
Oct 28, 2026
Merged

zackees merged 2 commits into
masterfrom
infra/2812-leaderboard-python

Conversation

@zackees

@zackees zackees commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

Fixes #2812 (one unit of the #962 burn-down).

What changed

.github/workflows/leaderboard.yml's update job had three run: blocks over GEN-005's one-line
budget, plus an ubuntu-latest runner (RUN-001). All four findings are one path, so this PR clears the
path completely: 4 approved exceptions leave the baseline.

step before after
Generate (steps[3]) cp site/*, touch .nojekyll, uv run generate.py uv run --no-project ci/leaderboard.py generate --repo … --data data
Render JPEG (steps[5]) playwright install + 3 render.py runs uv run --no-project ci/leaderboard.py render --data data
Commit to leaderboard branch (steps[6], working-directory: data) config/add/diff-guard/commit/push uv run --no-project ci/leaderboard.py commit --data data
runs-on ubuntu-latest ubuntu-24.04 (the fleet label)

ci/leaderboard.py runs the same command lines, in the same order, with the runner's stdio
inherited and the first non-zero status as the step's status (the bash -e the steps ran under):

  • generate — overlay --site (default tools/leaderboard/site) onto the data checkout, write
    .nojekyll, then uv run --no-project --python 3.12 tools/leaderboard/generate.py --repo <r> --out <data>/leaderboard.json.
    Skips a directory in the site tree, the way cp site/* did.
  • render — uv run --python 3.12 --with playwright==1.49.1 playwright install --with-deps chromium,
    then render.py <data> (defaults to index.html → leaderboard.jpg), render.py <data> conversion.html conversion.jpg,
    render.py <data> conversion-minimal.html conversion-minimal.jpg 640x100.
  • commit — git config user.name/user.email (the github-actions[bot] identity), git add -A,
    git diff --cached --quiet → no changes with status 0, else git commit -m "leaderboard: update <UTC>T<HH:MM>Z"
    (date -u +%FT%H:%MZ's exact shape) and git push origin HEAD:leaderboard.

Nothing about the schedule, the fork guard, the concurrency group or the two actions/checkout steps
(including ref: leaderboard, path: data) changes. Step indices are 1:1, so no CACHE-001/013 churn.

RED

0fdbdca32 — ci/test_leaderboard_python.py (14 cases) on master: ci/leaderboard.py does not exist,
the three blocks are multi-line, the runner is ubuntu-latest, and both ci.toml blocks are present
(11 failures, 1 error).

GREEN

  • a8ac9c0ed — module, workflow, both ci.toml blocks deleted, and ci/test_conversion_card.py
    repointed: it pinned the literal render.py data conversion.html conversion.jpg order inside the
    workflow text
    , and the renders live in the module now, so it asserts the module's argv order and
    keeps the measure-before-render ordering on the workflow.
  • ci-lint precheck (pin a1917ce7…), master 5fd1c516d → branch:
    5 violation(s), 407 approved exception(s), 10 needs_review → 5 violation(s), 403 approved exception(s), 10 needs_review;
    no leaderboard.yml line left in the GEN-005 or RUN-001 sections.
  • uv run ci/local_gate.py --only self-test: every module ok, including test_leaderboard_python.py,
    test_conversion_card.py, test_leaderboard_schedule.py and test_ci_toml.py. The one red,
    test_tier2_serial_cpus.py (elapsed 1.8267 not less than 1.8), is a host-load timing flake in a
    test that sleeps across two cores — it is ok on a clean re-run and is untouched by this PR.
  • uv run ruff check on the touched Python: clean (no ruff format; the tree is not formatted that way).

Evidence this does not need a local-gate stamp

The change touches no Rust, C, CMake or build input — it is ci/ + one workflow YAML — so per
coordination.md §4 there is no stamp to look for; PR CI (Fast Gate ⚡, Format 🔍 / checks) is the gate.

What is deliberately not here

The leaderboard branch commit is the only place this runs end to end, so the first scheduled run
after merge (17 */4 * * *) is the Tier-4-style proof; the module's own tests assert the argv, the
no changes path and the push, not the GitHub-side Pages result.

…each (#2812)

RED: ci/test_leaderboard_python.py fails on master -- ci/leaderboard.py does not exist, the three run: blocks are multi-line and jobs.update.runs-on is ubuntu-latest, and both the GEN-005 and RUN-001 ci.toml blocks are still present (11 failures, 1 error).
…2812)

GREEN: ci/leaderboard.py carries `generate`, `render` and `commit` with the
exact command lines the three `run:` blocks used, so each workflow step is one
line (`uv run --no-project ci/leaderboard.py <cmd>`) and stays inside GEN-005's
budget. `jobs.update.runs-on` moves from `ubuntu-latest` to the fleet label
`ubuntu-24.04` (RUN-001).

ci.toml loses both path-scoped blocks (GEN-005, RUN-001). ci/test_conversion_card
pinned the literal `render.py data conversion.html …` order inside the workflow
text; the renders live in the module now, so it asserts the module's argv order
and keeps the measure-before-render ordering on the workflow.

precheck, branch vs master: 5 violation(s), 407 -> 403 approved exception(s),
10 needs_review, no leaderboard.yml line left in either rule's section.
@zackees

zackees commented Oct 28, 2026

Copy link
Copy Markdown
Member Author

Green: Build 🧱 / Fast Gate ⚡ 3m50s, Format 🔍 / checks 1m54s, Validate Data 🕵️ 16s, Build 🧱 / CI Mode 🛂 22s, Build 🧱 / Event Data 🔎 17s, CI Gate ✅ pass (run 40714943435); every other job skipping, which is what a ci/ + workflow-YAML-only change should produce.

No local-gate stamp: no Rust/C/CMake or build input is touched, so there is nothing for CI to skip.
Queued for merge (state CLEAN, queue entry live) — handed off to the coordinator.

Merged via the queue into master with commit 66ac3be Oct 28, 2026
34 checks passed
@zackees
zackees deleted the infra/2812-leaderboard-python branch October 28, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

infra: port leaderboard.yml's three shell steps to Python and pin its runner (GEN-005 + RUN-001, #962)

1 participant