-
Notifications
You must be signed in to change notification settings - Fork 3
feat(bench): aelf bench all reproducibility harness (#437) #465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
7d62029
docs(v2_reproducibility_harness): ratify 8 design asks (#437)
robotrocketscience fcbf7f5
feat(benchmarks): aelf bench all dispatcher (#437)
robotrocketscience 9c0c041
feat(cli): wire `aelf bench all` to benchmarks.run dispatcher (#437)
robotrocketscience 84a2c26
feat(benchmarks): tolerance-band classifier (#437)
robotrocketscience f524f63
test(benchmarks): dispatcher + tolerance unit tests (#437)
robotrocketscience 282df4f
ci(bench-canonical): nightly cron + band-check workflow (#437)
robotrocketscience e4f9bc2
docs(reproducibility): README badge + COMMANDS row for `aelf bench al…
robotrocketscience 01b721b
fix(benchmarks): tolerance.check_report reads metric_overrides from c…
robotrocketscience c2e57bf
feat(benchmarks): skeleton v2.0.0.json + calibration-pass note (#437)
robotrocketscience 4255eb5
test(benchmarks): adjust inert-target test for `aelf bench all` activ…
robotrocketscience 60e1b68
gate: v2.0 reproducibility harness landed for #437 — calibration pending
robotrocketscience 7dc19fa
fix(cli): aelf bench all — cwd-import + drop dead REMAINDER (#437)
robotrocketscience c4ab566
feat(bench): strip per_question detail from canonical output (#437)
robotrocketscience fe8c688
fix(bench): underscore-prefix dispatcher metadata so band-check skips…
robotrocketscience 7c38b7c
feat(bench): first canonical pass — v2.0.0.json with partial real num…
robotrocketscience 406ef03
docs(readme): flip reproducibility badge to "partial (6/11 adapters)"…
robotrocketscience 0220555
fix(bench): show valid options in 'no adapters matched' error (#437)
robotrocketscience a279f7a
fix(ci): bench-canonical band-check gates on step output, not hashFil…
robotrocketscience File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,139 @@ | ||
| name: Bench Canonical | ||
|
|
||
| # v2.0 reproducibility harness nightly cron (#437 deliverable C). | ||
| # | ||
| # Runs `aelf bench all` at the canonical headline cut (full per the | ||
| # 2026-05-06 ratification — LongMemEval full, StructMemEval --bench | ||
| # big, all 11 invocations). Writes the merged JSON to the dedicated | ||
| # `bench-canonical-results` branch and band-checks against | ||
| # `benchmarks/results/v2.0.0.json` from main. | ||
| # | ||
| # Why a dedicated branch (not `main`): | ||
| # same rationale as `replay-soak.yml` after #461 — the `main` ruleset | ||
| # blocks unsigned bot pushes and direct pushes. `bench-canonical-results` | ||
| # is unconstrained, which lets the cron commit cron snapshots without | ||
| # a long-lived signing key. | ||
| # | ||
| # Runtime budget: spec says multi-hour at the full cut. `timeout-minutes` | ||
| # is 360 (6h) to leave headroom; the operator can tune down once a few | ||
| # real cron entries land. | ||
|
|
||
| on: | ||
| schedule: | ||
| # 05:00 UTC daily — staggered after `replay-soak` (04:00) so a | ||
| # single GitHub Actions runner pool doesn't see two long-running | ||
| # crons concurrent. | ||
| - cron: '0 5 * * *' | ||
| workflow_dispatch: | ||
| # Manual trigger lets the operator force a cron entry mid-day | ||
| # after a deliberate canonical re-run. | ||
|
|
||
| permissions: | ||
| contents: write | ||
| # `contents: write` so the cron can push to `bench-canonical-results`. | ||
|
|
||
| concurrency: | ||
| group: bench-canonical | ||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| canonical: | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 360 | ||
| steps: | ||
| - uses: step-security/harden-runner@8d3c67de8e2fe68ef647c8db1e6a09f647780f40 # v2.19.0 | ||
| with: | ||
| egress-policy: audit | ||
|
|
||
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: true | ||
|
|
||
| - uses: astral-sh/setup-uv@d4b2f3b6ecc6e67c4457f6d3e41ec42d3d0fcb86 # v5.4.2 | ||
| with: | ||
| python-version: '3.13' | ||
| enable-cache: true | ||
| cache-dependency-glob: "uv.lock" | ||
|
|
||
| - name: Install dev group | ||
| run: uv sync --frozen --group dev --extra archive | ||
|
|
||
| - name: Bootstrap bench-canonical-results worktree | ||
| run: | | ||
| set -euo pipefail | ||
| # Fetch the dedicated branch; create empty if first run. | ||
| if git ls-remote --exit-code origin bench-canonical-results > /dev/null 2>&1; then | ||
| git fetch origin bench-canonical-results:refs/remotes/origin/bench-canonical-results | ||
| git worktree add .bench-results-branch \ | ||
| -B bench-canonical-results origin/bench-canonical-results | ||
| else | ||
| git worktree add --orphan -b bench-canonical-results .bench-results-branch | ||
| (cd .bench-results-branch && git rm -rf . 2>/dev/null || true) | ||
| fi | ||
|
|
||
| - name: Run aelf bench all --canonical | ||
| id: bench | ||
| run: | | ||
| set -euo pipefail | ||
| today=$(date -u +%Y-%m-%d) | ||
| out=".bench-results-branch/v2.0.0-cron-${today}.json" | ||
| # `--canonical` so the dispatcher refuses if the cut doesn't | ||
| # match CANONICAL_INVOCATIONS. The merged JSON's label still | ||
| # reads `v2.0.0 cron <ts>` (canonical-vs-cron is by filename, | ||
| # not by --canonical flag inside the run). | ||
| uv run aelf bench all --canonical --out "${out}" | ||
| echo "out=${out}" >> "$GITHUB_OUTPUT" | ||
| # Continue on band-check failure so we still commit the cron | ||
| # entry; `Band-check` step below sets the actual job status. | ||
| continue-on-error: true | ||
|
|
||
| - name: Band-check vs canonical | ||
| id: bandcheck | ||
| # `hashFiles()` only accepts string literals (not expressions | ||
| # like `steps.bench.outputs.out`), so the previous form was | ||
| # silently always-empty and skipped the band-check on every | ||
| # run. Gate on the step output directly: when bench succeeded, | ||
| # `out` is set; when it errored under continue-on-error, `out` | ||
| # is unset. | ||
| if: steps.bench.outputs.out != '' | ||
| run: | | ||
| set -euo pipefail | ||
| uv run python -c " | ||
| import json, sys | ||
| from pathlib import Path | ||
| from benchmarks import tolerance | ||
| cano = tolerance.load_report(Path('benchmarks/results/v2.0.0.json')) | ||
| obs = tolerance.load_report(Path('${{ steps.bench.outputs.out }}')) | ||
|
|
||
| checks = tolerance.check_report(cano, obs) | ||
| overall, counts = tolerance.summarize(checks) | ||
| print(f'overall: {overall.value}; counts: {counts}') | ||
| for c in checks: | ||
| if c.verdict.value != 'pass': | ||
| print(f' {\"/\".join(c.path)}: {c.verdict.value} — {c.note}') | ||
| sys.exit(0 if overall.value == 'pass' else (1 if overall.value == 'fail' else 0)) | ||
| " | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| - name: Commit + push to bench-canonical-results | ||
| env: | ||
| GIT_AUTHOR_NAME: aelfrice-bench-bot | ||
| GIT_AUTHOR_EMAIL: aelfrice-bench-bot@users.noreply.github.com | ||
| GIT_COMMITTER_NAME: aelfrice-bench-bot | ||
| GIT_COMMITTER_EMAIL: aelfrice-bench-bot@users.noreply.github.com | ||
| run: | | ||
| set -euo pipefail | ||
| cd .bench-results-branch | ||
| if git status --porcelain | grep -q .; then | ||
| today=$(date -u +%Y-%m-%d) | ||
| git add -A | ||
| git commit -m "audit(bench-canonical): ${today} entry" | ||
| git push origin HEAD:bench-canonical-results | ||
| else | ||
| echo "no bench-canonical delta to commit" | ||
| fi | ||
|
|
||
| - name: Fail job if band-busting regression | ||
| if: steps.bandcheck.outcome == 'failure' | ||
| run: | | ||
| echo "::error::bench-canonical detected a band-busting regression vs benchmarks/results/v2.0.0.json" | ||
| exit 1 | ||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't let benchmark execution failures go green.
Because this step has
continue-on-error: trueand the final gate only checkssteps.bandcheck.outcome, a hard failure inuv run aelf bench all ...will skip the band-check and still leave the workflow successful. That turns adapter crashes, parser failures, and missing-data failures into false-green nightlies.🤖 Prompt for AI Agents