Repository navigation
Read the benchmark baseline for fork PRs in a workflow_run report - #11580
Conversation
GitHub gives a fork PR's `pull_request` run a read-only token with no OIDC token and no repository variables. The benchmark jobs of a fork PR therefore skip the role assumption and report "Could not assume the read-only benchmarks role; reporting without a baseline.", and they cannot comment on the PR. On fork PRs, the benchmark jobs now upload their records. The new pr-bench-report.yml runs after the dispatch run in the base repository, reads the baseline for those records, and comments the comparison under the same tag as a same-repository PR. It only parses the artifacts and never checks out or runs code from the PR. fetch-benchmark-baseline.py gets `--head`, because the report checks out the default branch and must walk the history of the PR head. Signed-off-by: Robert Kruszewski <github@robertk.io> Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
8ea9358 to
0f3ab1a
Compare
Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
Merging this PR will not alter performance2 warnings
Comparing Footnotes
|
|
@codex review |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
|
Posted by Claude Opus 5.5 on Will's behalf. @devin-ai-integration, The rest of the commit looks right: the benchmark name is checked against a strict pattern before it reaches the comment, the report files are bounded in size and record count before the database query, and the baseline is written outside the uploaded artifact directory. |
Signed-off-by: Will Manning <will@spiraldb.com> Co-Authored-By: Will Manning <will@spiraldb.com>
|
Good catch — switched both |
|
@claude review, make sure this is both secure and not overbuilt |
|
Claude review automation is disabled for pull requests that modify Why:
Ask a human reviewer to inspect workflow changes directly. |
Fork PR benchmarks report "Could not assume the read-only benchmarks role; reporting without a baseline." This happens because GitHub gives fork
pull_requestruns no OIDC token and no repository variables. For the same reason, fork PRs get no benchmark comment.On fork PRs, the benchmark jobs now upload their results. The new
pr-bench-report.ymlruns onworkflow_runfromdevelopand reads the baseline. It then comments under the same tag as a same-repo PR. It only parses the artifacts and never runs PR code.fetch-benchmark-baseline.pygets--head, so it can search the PR history from adevelopcheckout. The read role already trustsrefs/heads/*, so IAM needs no change.