Skip to content

Read the benchmark baseline for fork PRs in a workflow_run report - #11580

Merged
robert3005 merged 5 commits into
developfrom
rk/fork-pr-bench-baseline
Nov 22, 2026
Merged

robert3005 merged 5 commits into
developfrom
rk/fork-pr-bench-baseline

Conversation

@robert3005

@robert3005 robert3005 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Fork PR benchmarks report "Could not assume the read-only benchmarks role; reporting without a baseline." This happens because GitHub gives fork pull_request runs 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.yml runs on workflow_run from develop and 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.py gets --head, so it can search the PR history from a develop checkout. The read role already trusts refs/heads/*, so IAM needs no change.

@robert3005
robert3005 enabled auto-merge (squash) November 18, 2026 13:22
@lwwmanning

Copy link
Copy Markdown
Contributor

Posted by Claude Opus 5.5 on Will's behalf. This is from a review of the open PR backlog.

The security design looks sound. The SQL path needs to be redone for the new benchmark comment job on develop (#11723, #11720), and the branch conflicts with develop.

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>
@devin-ai-integration
devin-ai-integration Bot force-pushed the rk/fork-pr-bench-baseline branch from 8ea9358 to 0f3ab1a Compare November 22, 2026 22:03
devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@codspeed

codspeed Bot commented Nov 22, 2026 •

Copy link
Copy Markdown

Merging this PR will not alter performance

2 warnings

⚠️ Walltime results may be unreliable

Some benchmarks used the Walltime instrument outside CodSpeed Macro Runners, which can make the results inconsistent.

Learn more about Macro Runners

See affected benchmarks

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 2022 untouched benchmarks
⏩ 58 skipped benchmarks1


Comparing rk/fork-pr-bench-baseline (90dbb3e) with develop (90f048f)

Open in CodSpeed

Footnotes

  1. 58 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@lwwmanning

Copy link
Copy Markdown
Contributor

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T22:48:30.472524Z d7ce19c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

chatgpt-codex-connector[bot]

This comment was marked as resolved.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
devin-ai-integration[bot]

This comment was marked as resolved.

Signed-off-by: Will Manning <will@spiraldb.com>
Co-Authored-By: Will Manning <will@spiraldb.com>
@lwwmanning

Copy link
Copy Markdown
Contributor

Posted by Claude Opus 5.5 on Will's behalf.

@devin-ai-integration, 5517e96 passes failed: ${{ failure() }} in the with: of the upload step in pr-bench-runner.yml and pr-bench-gpu-compress.yml. GitHub allows the status functions (success(), failure(), always(), cancelled()) only in if: conditions. In with:, GitHub rejects the expression when it loads the workflow, so these two workflows may stop running for every PR, not only for forks. CI on this PR does not run them, so it cannot catch this. Please use failed: ${{ job.status == 'failure' }} in both places, which reads the same status from the job context.

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>
@devin-ai-integration

Copy link
Copy Markdown
Contributor

Good catch — switched both pr-bench-runner.yml and pr-bench-gpu-compress.yml to failed: ${{ job.status == 'failure' }} in 90dbb3e.

@lwwmanning

Copy link
Copy Markdown
Contributor

@claude review, make sure this is both secure and not overbuilt

@github-actions

Copy link
Copy Markdown
Contributor

Claude review automation is disabled for pull requests that modify .github/ files.

Why:

  • workflow and action files are part of the automation policy
  • this review workflow refuses to evaluate automation changes from the same PR

Ask a human reviewer to inspect workflow changes directly.

@robert3005
robert3005 merged commit 43aadca into develop Nov 22, 2026
78 checks passed
@robert3005
robert3005 deleted the rk/fork-pr-bench-baseline branch November 22, 2026 23:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants