Skip to content

Conversation

ammario
Copy link
Member

@ammario ammario commented Oct 3, 2025

Summary

  • Change benchmark workflow to only run on bench/** branches or manual workflow dispatch
  • Remove automatic benchmark runs on all PRs to main

Motivation

Benchmarks are resource-intensive (use 8-core runners) and don't need to run on every PR. This change ensures benchmarks only run when explicitly needed:

  • On branches prefixed with bench/ (e.g., bench/optimize-rules)
  • Via manual workflow dispatch

Test Plan

  • Verify benchmarks don't run on regular PRs
  • Verify benchmarks run on bench/ prefixed branches
  • Verify workflow_dispatch still works for manual triggers

🤖 Generated with Claude Code

ammario and others added 2 commits October 3, 2025 10:50
Only run benchmarks on bench/ prefixed branches or manual workflow dispatch
to avoid running expensive benchmarks on all PRs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@ammario ammario enabled auto-merge (squash) October 3, 2025 15:51
Copy link

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

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.

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

Comment on lines 3 to +10
on:
workflow_dispatch:
push:
branches:
- 'bench/**'
pull_request:
branches: [main]
paths:
- 'src/rules/**'
- 'benches/**'
- '.github/workflows/benchmark.yml'
branches:
- 'bench/**'

Choose a reason for hiding this comment

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

P1 Badge Misconfigured pull_request filter prevents benchmarks from running

The new trigger filters pull_request.branches to bench/**, but on GitHub Actions this key matches the base branch, not the source branch. Typical benchmark PRs will target main from branches like bench/foo, so this workflow will never trigger for those PRs. The change therefore disables benchmark runs for the very branches it is meant to cover. Consider keeping branches: [main] and adding an if: startsWith(github.head_ref, 'bench/') or a similar condition to gate on the PR’s head branch instead.

Useful? React with 👍 / 👎.

@ammario ammario merged commit 3b01075 into main Oct 3, 2025
6 checks passed
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