Repository navigation
bench: a trend over the records, and a regression alert - #2215
Merged
Merged
Conversation
A night's table compares two binaries on one runner. It cannot show a step that got a few percent slower many nights running, and nothing read the records on the benchmarks branch at all. scripts/agentbench/trend rebuilds TREND.md and trend.json from every record: per session a Mermaid chart of the weighted total and a row per step. The bench job commits them with the record, and opens or updates one issue (benchmark-regression) when a step was slower than its baseline two runs running, a count rose above its baseline's, a settled re-run wrote, or a step drifted -- the last three runs against the seven before, each corrected for its runner, since the first two records differ by a quarter on every step from the machine alone. A lost push is retried from the branch as it then stands rather than rebased: the trend is a function of the records. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011oK82u4HRCKfX2BBvhgsNm
ako
marked this pull request as ready for review
November 13, 2026 09:32
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
The last two pieces of the agent dev-loop benchmark proposal: the trend chart and the alert.
A night's table compares two binaries on one runner. It says whether last night's commits made a step slower, and cannot show a step that got a few percent slower many nights running. Nothing read the records on the
benchmarksbranch at all.scripts/agentbench/trendreads every record and writesTREND.mdandtrend.json. Per session: a Mermaid chart of the session-weighted total over the last 30 runs, and a table with a row per step (latest, run before, median of the seven before, the night's A/B ratio, a sparkline of the last 14). The scale session also chartscheck-oneandexec-batchper statement. GitHub renders the file in place on the branch, so nothing is hosted (Open Question 6).benchjob commits both files with the record, uploads them as an artifact, and opens or updates one issue labelledbenchmark-regressionwhen there is something to report. It comments only when the set of alerts changed, and never closes the issue.make bench-trend RECORDS=<dir>builds it locally.The alerts
slower-two-runsdriftcounts-increasedwrote-on-re-execDrift compares different nights, so different machines. The two records that exist differ by about a quarter on every step from the runner alone (
describe× 0.70 night to night, × 0.91 against its own baseline). So each run is first corrected by the median, over all steps, of its time against each step's own median. The limit of that: a change that slows every step alike looks like a slow machine. The nightly A/B is what catches that one.The thresholds are flags and are provisional. The proposal's plan was to set them from two weeks of data; there are two records.
Verified
>changed to!=on counts).benchmarksbranch; rendered the generated Mermaid in Chromium to confirm the charts parse and the line is visible.TREND.md).workflow_dispatchof the bench job from this branch (run 43391783249) passed: the trend step ran on the runner, theagent-benchmark-trendartifact holdsTREND.md,trend.jsonand the alerts file, the issue step was skipped, and thebenchmarksbranch is unchanged (still ate52592d4e).Not verified
gh issue create/edit/comment, theissues: writepermission) has only been syntax-checked. It runs onmainonly, so its first real run is after merge, and only when an alert fires.TREND.mdfrom the real runner; the same shell was run against a local remote only.🤖 Generated with Claude Code
https://claude.ai/code/session_011oK82u4HRCKfX2BBvhgsNm