Skip to content

Stop running benchmarks on non-performance PRs; add full-ci-no-benchmarks label#3950

Merged
justin808 merged 1 commit into
mainfrom
jg/benchmark-ci-trigger-fixes
Jun 12, 2026
Merged

Stop running benchmarks on non-performance PRs; add full-ci-no-benchmarks label#3950
justin808 merged 1 commit into
mainfrom
jg/benchmark-ci-trigger-fixes

Conversation

@justin808

@justin808 justin808 commented Jun 12, 2026

Copy link
Copy Markdown
Member

Problem

An audit of benchmark CI runs on the last ~2 days of PRs found that benchmark suites (30+ minutes each, sometimes producing garbage Bencher data — e.g. #3919's Pro suite logged ✗ 0/4726 successful requests) ran on PRs that cannot move runtime performance. The system never under-runs benchmarks; every defect is wasteful over-running.

Verified examples (actual workflow runs, not just rollups):

PR Changed Benchmarks ran Should have
#3919 bin/ci-rerun-failures only 4 suites 0
#3855 .ci-dependency-versions + bin + specs 4 suites 0
#3854 tool-version action + bin + config specs 3 suites 0
#3915 create-react-on-rails-app (CLI scaffolder) 4 suites 0
#3785 CI workflows + .tool-versions + specs 4 suites 0
#3841 / #3836 RuboCop/Gemfile config (benchmark label applied) 4 suites 0

Root causes (all confirmed in CI logs)

  1. Base-SHA drift × merge-ref checkout. detect-changes in benchmark.yml checks out the pull/N/merge ref (PR merged into current main) but diffs against the PR's stale recorded base.sha. When base.sha lags main, git diff stale-base..merge-ref sweeps in everything merged in between → CI-only PRs get miscategorized → all suites fire. (Fix CI rerun mapping for split dummy app tests (#3909) #3919: a bin/-only PR ran all four suites because 8 intervening main commits leaked into the diff.)
  2. Uncategorized catch-all force-ran every benchmark "for safety" (Centralize CI dependency profile constants in .ci-dependency-versions #3855, Pin prerelease gems in create-react-on-rails-app #3915, Centralize CI runtime versions #3785). Unknown files are almost always tooling/config, not hot runtime paths.
  3. Spec-only changes triggered core+pro benchmarks (Share tool-version parsing between CI action and ci-switch-config #3854). Specs are not shipped and cannot move runtime performance.

Plus an operator-error class (#3841, #3836): full-ci + benchmark were both applied to lint-config PRs, and there was no way to say "full CI but no benchmarks."

Fixes

  1. benchmark.yml: check out the PR head SHA in detect-changes so change detection sees only the PR's own commits (not main's intervening commits). Scoped to the benchmark workflow — the test workflows share the pattern but only over-run tests (safe direction).
  2. script/ci-changes-detector: the uncategorized catch-all still runs the full test suite but no longer sets any BENCH_* flag.
  3. script/ci-changes-detector: the rspec / pro-rspec arms no longer set BENCH_* flags.
  4. New full-ci-no-benchmarks label (benchmarks/generate_matrix.rb): hard-suppresses every benchmark suite for a PR, overriding both change detection and the benchmark label. Pair with full-ci for full test coverage without benchmarks.

Safety net: the benchmark label still forces a run for a genuinely new runtime path, and every push to main benchmarks unconditionally, so main remains the regression backstop for anything suppressed on a PR.

Tests

  • script/ci-changes-detector-test.bash: +2 regression tests (uncategorized → no benchmarks; spec-only → no benchmarks). 47 run, 0 failed.
  • benchmarks/spec/benchmark_matrix_spec.rb: +3 tests for the suppression label (overrides detection, beats the benchmark label, honored from forks). Full benchmarks/spec suite: 271 examples, 0 failures.
  • script/lib/git-diff-base-test.bash: 41/41 still pass. RuboCop clean.

The full-ci-no-benchmarks label has been created in the repo.

🤖 Generated with Claude Code


Note

Medium Risk
Changes CI change-detection and benchmark gating; misclassification could skip benchmarks on a PR, though every push to main still runs benchmarks unconditionally as the backstop.

Overview
Stops 30+ minute benchmark suites from running on PRs that cannot affect runtime performance, while keeping broad tests and main as the performance backstop.

benchmark.yml now checks out the PR head SHA in detect-changes so diffs reflect only the PR’s commits—not unrelated commits on main that leaked in when comparing a stale base.sha to the merge ref (#3919).

script/ci-changes-detector narrows when PR benchmarks are requested: spec-only gem/Pro spec edits no longer set BENCH_*; the uncategorized catch-all still runs the full test matrix but no longer forces all benchmark suites. Runtime source paths and the benchmark label can still trigger suites on PRs.

full-ci-no-benchmarks is added in benchmarks/generate_matrix.rb (documented in AGENTS.md): it hard-suppresses every benchmark suite on a PR, overriding change detection and even benchmark; it is honored from forks because it only disables runs.

Regression coverage: ci-changes-detector-test.bash (+2) and benchmark_matrix_spec.rb (+3).

Reviewed by Cursor Bugbot for commit df65e4e. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Chores
    • Added new full-ci-no-benchmarks PR label option for comprehensive CI testing without benchmark suite execution.
    • Updated CI change detection logic to improve accuracy in determining when benchmark tests should run.
    • Updated PR CI labeling documentation with new label combinations.

…arks label

Audit of the last two days of PRs found benchmark suites (30+ min each,
sometimes producing garbage Bencher data) running on PRs that cannot move
runtime performance. Three distinct root causes, plus a missing manual override:

1. Base-SHA drift x merge-ref checkout (benchmark.yml). detect-changes checked
   out the pull/N/merge ref (PR merged into CURRENT main) but diffed against the
   PR's stale recorded base.sha. When base.sha lagged main, the diff swept in
   every change merged in between, miscategorizing CI-only PRs and firing all
   suites (#3919: a bin/-only PR ran all four suites via 8 intervening commits).
   Fix: check out the PR head SHA so detection sees only the PR's own commits.

2. Uncategorized catch-all force-ran every benchmark "for safety" (#3855, #3915,
   #3785). Unknown files are almost always tooling/config, not hot runtime paths.
   Fix: the catch-all still runs the full TEST suite but sets no BENCH_* flag.

3. Spec-only changes triggered core+pro benchmarks (#3854). Specs are not shipped
   and cannot move runtime performance. Fix: the rspec / pro-rspec arms no longer
   set BENCH_* flags.

The benchmark label still forces a run for a genuinely new runtime path, and
every push to main benchmarks unconditionally, so main remains the regression
backstop for anything suppressed on a PR.

New full-ci-no-benchmarks label (generate_matrix.rb) hard-suppresses all
benchmark suites for a PR, overriding change detection and the benchmark label.
This is the "full CI but no benchmarks" escape hatch for the operator-error case
where full-ci + benchmark were both applied to a lint/config PR (#3841, #3836).

Tests: new regression coverage in ci-changes-detector-test.bash (uncategorized
and spec-only -> no benchmarks) and benchmark_matrix_spec.rb (suppression label).
AGENTS.md documents the new label.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR implements benchmark suppression for non-source changes and adds a PR label escape hatch. It refines change detection to prevent benchmark triggering for specs and uncategorized files, fixes the workflow's change detection accuracy by using the PR head SHA, and introduces the full-ci-no-benchmarks label with supporting matrix logic and tests.

Changes

Benchmark Suppression Strategy

Layer / File(s) Summary
Workflow change detection accuracy
.github/workflows/benchmark.yml
The detect-changes job checkout step now explicitly uses the PR head SHA (github.event.pull_request.head.sha) for pull_request events, ensuring change detection diffs only the PR's commits and avoids misclassification from unrelated intervening commits.
Change detection refinement for specs and uncategorized files
script/ci-changes-detector, script/ci-changes-detector-test.bash
The change detector no longer enables BENCH_* flags when detecting RSpec-only or uncategorized file changes, so those paths run the full test suite without triggering benchmark suites. Two new regression tests verify that uncategorized files and RSpec-only changes skip benchmarks while still running tests.
PR label escape hatch for benchmark suppression
benchmarks/generate_matrix.rb, benchmarks/spec/benchmark_matrix_spec.rb, AGENTS.md
Introduces full-ci-no-benchmarks PR label as an alternative suppression mechanism: the matrix generator skips all benchmark suites when the label is present (with precedence over other suite-selection flags), specs verify suppression behavior and label precedence, and documentation guides users on when to apply it.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Possibly related PRs

  • shakacode/react_on_rails#3608: Modifies script/ci-changes-detector to suppress BENCH_* flags for uncategorized/docs-only file paths instead of enabling them.
  • shakacode/react_on_rails#3528: Refactors benchmark CI matrix generation and gating inputs in benchmarks/generate_matrix.rb and related specs to control which benchmark suites run.
  • shakacode/react_on_rails#3747: Modifies script/ci-changes-detector to change how BENCH_* flags are set for non-runtime/CI-config changes to prevent benchmarks from running.

Suggested labels

enhancement, review-needed, full-ci, benchmark, P2

Suggested reviewers

  • alexeyr-ci2
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly and clearly summarizes the main changes: stopping unnecessary benchmark runs on non-performance PRs and introducing the full-ci-no-benchmarks label.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch jg/benchmark-ci-trigger-fixes

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: df65e4ede3

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# suites because eight intervening main commits leaked into the diff).
# Check out the PR head SHA instead so change detection sees only the
# PR's own commits. On push, this falls back to the pushed SHA.
ref: ${{ github.event.pull_request.head.sha || github.sha }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep fork PR history reachable for diff detection

On fork PRs with more than 50 commits since the base, checking out only pull_request.head.sha leaves the PR side shallow and not deepen-able by script/lib/git-diff-base: that helper tries to deepen the current side by fetching GITHUB_HEAD_REF from origin, but in this workflow origin is the base repository, where fork branches usually do not exist. In that scenario script/ci-changes-detector cannot find a merge base and the benchmark workflow fails before it can emit the empty fork matrix, even though fork PRs are supposed to skip benchmark suites.

Useful? React with 👍 / 👎.

@claude

claude Bot commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Code Review

Overview: This PR correctly addresses a real CI waste problem — 30+ minute benchmark suites running on PRs that cannot affect runtime performance. The root-cause analysis in the PR description is thorough and backed by concrete examples. The fixes are sound and well-tested.


Strengths

  • Root cause is correctly diagnosed. The pull/N/merge ref + stale base.sha combination is a classic GitHub Actions footgun, and the fix (checkout head SHA) is the right solution.
  • Defence in depth. Three independent mechanisms now prevent spurious runs: (1) corrected diff base, (2) narrowed BENCH_* flag logic, (3) new suppression label. Any one of them would help; all three together makes the system robust.
  • Good test coverage. Regression tests are added for both new rules (uncategorized → no bench, spec-only → no bench) and all three suppression-label scenarios (overrides detection, beats benchmark label, honored from forks).
  • Fork safety preserved. full-ci-no-benchmarks only disables runs; the existing BENCHMARK_PULL_REQUEST_HEAD_REPO == GITHUB_REPOSITORY gate still prevents forks from enabling suites even if RUN_CORE_BENCHMARKS=true leaks through.

Issues / Questions

1. Fork PR security note (low risk, worth acknowledging)

Checking out github.event.pull_request.head.sha in detect-changes means the job now runs the fork's version of script/ci-changes-detector. A malicious fork could modify that script to set run_core_benchmarks=true. The existing fork-gate in generate_matrix.rb (BENCHMARK_PULL_REQUEST_HEAD_REPO == GITHUB_REPOSITORY) prevents that from actually triggering benchmark jobs, so there is no practical risk — but the comment on the ref: line could note this explicitly to save the next reviewer from tracing the full chain.

2. Missing non_runtime_only assertion in test_rspec_only_change_skips_benchmarks

test_uncategorized_file_runs_tests_but_skips_benchmarks asserts "non_runtime_only": false (the catch-all marks the PR as potentially runtime-affecting for the test matrix). test_rspec_only_change_skips_benchmarks does not check non_runtime_only at all, so the expected value is undocumented. If spec-only changes should set non_runtime_only: true (plausible — specs are not shipped), the test should assert that; if false, assert that too. Worth making explicit.

3. fetch-depth: 50 adequacy (pre-existing, not a regression)

With the old merge-ref checkout, depth needed was: (commits on main since PR creation) + (PR commits). With the new head-SHA checkout it is: (PR commits only). So this PR actually improves the situation — but for a long-lived PR with many commits, 50 might still be tight. Not a blocker, just worth a follow-up if it surfaces.


Verdict: The logic is correct, the tests cover the key cases, and the safety properties (fork gating, main-push backstop) are preserved. Items 1 and 3 are informational; item 2 is a minor test-completeness gap worth fixing or consciously waiving before merge.

# suites because eight intervening main commits leaked into the diff).
# Check out the PR head SHA instead so change detection sees only the
# PR's own commits. On push, this falls back to the pushed SHA.
ref: ${{ github.event.pull_request.head.sha || github.sha }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The existing comment explains the SHA drift problem well, but it could also note that checking out the fork's head SHA is safe because the benchmark jobs themselves are gated by the BENCHMARK_PULL_REQUEST_HEAD_REPO == GITHUB_REPOSITORY check in generate_matrix.rb — so even if a fork's modified ci-changes-detector emits run_core_benchmarks=true, the matrix script drops it. A one-liner here would save the next reviewer from tracing that chain:

Suggested change
ref: ${{ github.event.pull_request.head.sha || github.sha }}
ref: ${{ github.event.pull_request.head.sha || github.sha }}

Consider appending to the comment block above: "Fork safety: even if a fork modifies script/ci-changes-detector, generate_matrix.rb gates benchmark suites on BENCHMARK_PULL_REQUEST_HEAD_REPO == GITHUB_REPOSITORY, so a fork can never enable suites — only disable them via full-ci-no-benchmarks."

setup_repo
write_file_change "react_on_rails/spec/react_on_rails/some_bench_spec.rb"

local out

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test doesn't assert the non_runtime_only flag, unlike the uncategorized-file test above which asserts "non_runtime_only": false. It's worth adding an assertion here to document the expected value — if spec-only changes correctly produce non_runtime_only: true (specs are not shipped, so the PR is runtime-non-affecting), that should be captured:

Suggested change
local out
assert_contains "$out" '"run_ruby_tests": true' "rspec-bench output"
assert_contains "$out" '"non_runtime_only": true' "rspec-bench output"
assert_contains "$out" '"run_core_benchmarks": false' "rspec-bench output"

(Adjust true/false to match the actual detector output if it differs.)

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/benchmark.yml (1)

55-56: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Include unlabeled in the PR trigger types.

Right now the workflow reevaluates benchmark selection when a label is added, but not when one is removed. That leaves the new full-ci-no-benchmarks escape hatch sticky: if a maintainer removes that label to re-enable benchmarks, this workflow will not rerun until another push/reopen. The same stale-state problem applies to removing benchmark labels.

Suggested fix
   pull_request:
-    types: [opened, synchronize, reopened, labeled]
+    types: [opened, synchronize, reopened, labeled, unlabeled]

As per coding guidelines, workflow reviews must inspect trigger changes, and this trigger set currently misses the label-removal path.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/benchmark.yml around lines 55 - 56, The pull_request
trigger in the workflow is missing the "unlabeled" event so label removals don't
retrigger the job; update the pull_request.types array in the benchmark.yml
workflow (the pull_request trigger) to include "unlabeled" alongside opened,
synchronize, reopened, and labeled so the workflow re-evaluates when a label is
removed.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In @.github/workflows/benchmark.yml:
- Around line 55-56: The pull_request trigger in the workflow is missing the
"unlabeled" event so label removals don't retrigger the job; update the
pull_request.types array in the benchmark.yml workflow (the pull_request
trigger) to include "unlabeled" alongside opened, synchronize, reopened, and
labeled so the workflow re-evaluates when a label is removed.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 83fff31c-a317-4668-8f1f-64e3962df4a8

📥 Commits

Reviewing files that changed from the base of the PR and between 661c6fa and df65e4e.

📒 Files selected for processing (6)
  • .github/workflows/benchmark.yml
  • AGENTS.md
  • benchmarks/generate_matrix.rb
  • benchmarks/spec/benchmark_matrix_spec.rb
  • script/ci-changes-detector
  • script/ci-changes-detector-test.bash

@greptile-apps

greptile-apps Bot commented Jun 12, 2026

Copy link
Copy Markdown

Greptile Summary

This PR fixes three root causes of spurious benchmark CI runs — base-SHA drift on merge-commit checkout, spec-only changes triggering benchmark suites, and uncategorized files force-running all benchmarks — and adds a full-ci-no-benchmarks label for an explicit operator-level override. All fixes include regression tests and the main-push benchmark backstop is preserved.

  • benchmark.yml: The detect-changes checkout now pins to the PR head SHA (github.event.pull_request.head.sha || github.sha), preventing intervening main commits from leaking into the diff and triggering suites on CI-only or tooling PRs.
  • script/ci-changes-detector: The rspec, pro-rspec, and catch-all arms no longer set any BENCH_* flag; only source-code arms set benchmark flags, with the benchmark label as the deliberate override.
  • benchmarks/generate_matrix.rb: A new BENCHMARK_SUPPRESS_LABEL = \"full-ci-no-benchmarks\" constant is checked at the top of build_matrix, suppressing all suite selection before the fork guard.

Confidence Score: 4/5

Safe to merge; all benchmark-suppression paths are well-tested and the main-push backstop is untouched.

The three changed behavioral paths (head-SHA checkout, spec-arm no-bench, catch-all no-bench) each have dedicated regression tests. The only open edge case is the fetch-depth: 50 window on very long PR branches — git_diff_base_resolve strict would hard-fail rather than silently skip, so the failure mode is loud.

.github/workflows/benchmark.yml — the fetch-depth: 50 + head-SHA checkout interaction on deep PR branches.

Important Files Changed

Filename Overview
.github/workflows/benchmark.yml Adds explicit ref pin to PR head SHA in detect-changes checkout, fixing base-SHA drift where the merge-commit checkout leaked intervening main commits into the diff.
benchmarks/generate_matrix.rb Introduces BENCHMARK_SUPPRESS_LABEL constant and adds it to the build_matrix guard, short-circuiting all suite selection before the fork check.
script/ci-changes-detector Removes BENCH_* flag setting from the rspec, pro-rspec, and catch-all arms; specs and uncategorized files no longer trigger benchmark suites.
script/ci-changes-detector-test.bash Adds two regression tests: uncategorized file runs tests but skips benchmarks, and spec-only change skips all benchmark flags.
benchmarks/spec/benchmark_matrix_spec.rb Adds three spec examples covering the suppression label: overrides change detection, beats benchmark label, and honored from forks.
AGENTS.md Documents the new full-ci-no-benchmarks label and updates the label recommendation format in PR descriptions.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR push / label event] --> B[detect-changes job checkout PR HEAD SHA]
    B --> C[ci-changes-detector git diff base.sha..HEAD]
    C --> D{File category?}
    D -->|lib/app source| E[Set BENCH_* flags]
    D -->|spec only| F[Set RSPEC_CHANGED no BENCH_* flags]
    D -->|CI infra / script| G[Set CI_INFRA_CHANGED no BENCH_* flags]
    D -->|uncategorized| H[Set UNCATEGORIZED_CHANGED no BENCH_* flags]
    E & F & G & H --> I[generate_matrix.rb]
    I --> J{BENCHMARK_NON_RUNTIME_ONLY OR full-ci-no-benchmarks label?}
    J -->|Yes| K[Empty matrix suite_id = none]
    J -->|No| L{suite_enabled? check fork + run_output + labels}
    L -->|benchmark label| M[Force suite ON]
    L -->|no matching signal| N[Suite skipped]
    M & N --> O[benchmark job gated by run_benchmark_suites]
    K --> P[benchmark job skipped sentinel]
Loading

Comments Outside Diff (1)

  1. benchmarks/generate_matrix.rb, line 219-225 (link)

    P2 Suppression label check precedes the fork-origin guard

    labels.include?(BENCHMARK_SUPPRESS_LABEL) is evaluated before suite_enabled?suite_requested_by_event?, which is where the fork-origin block (head_repo != GITHUB_REPOSITORY → false) lives. A fork PR with the suppress label set would hit the early-return [] path rather than reaching the fork check. This is intentional, but the fork test case (RUN_CORE_BENCHMARKS=true from a contributor fork) is synthetic: the fork guard in suite_requested_by_event? would have already produced an empty suite list, so the suppress label is redundant for forks rather than a meaningful override. No behavioral issue, but a short comment clarifying that the fork guard is the primary mechanism would help future readers.

    Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Reviews (1): Last reviewed commit: "Stop running benchmarks on non-performan..." | Re-trigger Greptile

Comment on lines +92 to 93
ref: ${{ github.event.pull_request.head.sha || github.sha }}
fetch-depth: 50

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Shallow-clone depth may not reach base SHA after ref switch

With fetch-depth: 50 and ref set to the PR head SHA, actions/checkout fetches exactly 50 commits from the PR HEAD's ancestry. The base SHA (github.event.pull_request.base.sha) is an ancestor of the PR HEAD, so it is normally within those 50 commits — but a PR branch with 50+ of its own commits would push the fork point outside the fetched window. In that case git_diff_base_resolve strict exits 1 and the detect-changes job fails, gating all benchmark jobs, rather than silently producing an empty diff. This is the safe-failure direction, but could be a surprise on long-lived squash-heavy feature branches. Consider bumping fetch-depth to a higher value (e.g. 100 or 0 for full history) if PR branches regularly exceed 50 commits.

@justin808 justin808 merged commit 55942a9 into main Jun 12, 2026
58 checks passed
@justin808 justin808 deleted the jg/benchmark-ci-trigger-fixes branch June 12, 2026 02:59
justin808 added a commit that referenced this pull request Jun 12, 2026
…wind-generator

* origin/main:
  Add preload link helper for generated component packs (#3935)
  Add experimental View Transitions recipe, Turbo interplay doc, flagged dummy demo (#3947)
  Stop running benchmarks on non-performance PRs; add full-ci-no-benchmarks label (#3950)
  Add doctor FORMAT=json machine-readable output with stable schema (#3948)
  Docs: add Inertia Rails to React on Rails migration guide v1 (#3946)
  Add stable SmartError codes and generated error reference (#3936)

# Conflicts:
#	CHANGELOG.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant