Skip to content

Build: PR-iteration history for cross-commit peak attribution#152

Merged
jlukic merged 1 commit intomainfrom
bench/bisect
Apr 18, 2026
Merged

Build: PR-iteration history for cross-commit peak attribution#152
jlukic merged 1 commit intomainfrom
bench/bisect

Conversation

@jlukic
Copy link
Copy Markdown
Member

@jlukic jlukic commented Apr 18, 2026

Walk prior bench runs on this PR's branch to build a per-iteration history. The reporter merges it with bench-history.json (main commits) so peak attribution spans BOTH main AND this PR's iterations.

An agent iterating on a perf branch now sees: "create-1k peaked at 104.7ms on commit 9bcd3f1 (iteration 10), now at 143.9ms (+37%). Bisect candidates: 442446e, 64c6820, 5595cbd +7 more."

Walk prior bench runs on this PR's branch to build a per-iteration
history. The reporter merges it with bench-history.json (main commits)
so peak attribution spans BOTH main AND this PR's iterations.

An agent iterating on a perf branch now sees: "create-1k peaked at
104.7ms on commit 9bcd3f1 (iteration 10), now at 143.9ms (+37%).
Bisect candidates: 442446e, 64c6820, 5595cbd +7 more."

New files:
- tools/bench-reporter/fetch-pr-history.js — walks gh API for prior
  successful Benchmarks runs on the PR branch, downloads results-*
  artifacts, extracts this-change absolute CIs, outputs pr-history.json
  in bench-history.json schema.

Changed files:
- reporter.js — new --pr-history flag, mergeHistories() combines main
  + PR iteration histories sorted by timestamp with SHA dedup. The
  existing computeHistoryStatus + REOPENED rendering work unchanged.
- benchmarks-report.yml — new "Fetch PR iteration history" step before
  "Generate report" in the comment job. Uses the bot token for API auth.

Tested against PR #148's 17 prior runs: 13 REOPENED metrics surfaced
with correct peak attribution and bisect candidates.
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
semantic-next Building Building Preview, Comment Apr 18, 2026 0:53am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
mcp Ignored Ignored Apr 18, 2026 0:53am

Request Review

@github-actions github-actions Bot added the CI modifies continuous integration label Apr 18, 2026
@jlukic jlukic merged commit 7b30cbf into main Apr 18, 2026
7 of 8 checks passed
@jlukic jlukic deleted the bench/bisect branch April 18, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI modifies continuous integration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant