Skip to content

Skip benchmark workflow for bot review events#1192

Merged
sbryngelson merged 3 commits intoMFlowCode:masterfrom
sbryngelson:ci-bench-bot-fix
Feb 21, 2026
Merged

Skip benchmark workflow for bot review events#1192
sbryngelson merged 3 commits intoMFlowCode:masterfrom
sbryngelson:ci-bench-bot-fix

Conversation

@sbryngelson
Copy link
Copy Markdown
Member

@sbryngelson sbryngelson commented Feb 21, 2026

User description

Summary

  • Bot reviews (AI code reviewers like Copilot, CodeRabbit, etc.) trigger pull_request_review events that start a new Benchmark workflow run
  • The concurrency group then cancels the real benchmark run from the pull_request event
  • This causes all benchmark jobs to be cancelled on every PR with AI reviewers enabled

Adds an if condition on the file-changes job to skip the workflow when the review author is a Bot account type.

Test plan

  • Open a PR and verify benchmarks run from pull_request trigger
  • Verify bot reviews no longer cancel in-progress benchmark runs

🤖 Generated with Claude Code


CodeAnt-AI Description

Skip benchmark workflow when review is from a bot

What Changed

  • The benchmark workflow's initial file-change check is skipped for pull_request_review events authored by Bot accounts
  • Prevents benchmark runs started by bot review events from cancelling the real benchmark runs triggered by the pull_request event

Impact

✅ Fewer cancelled benchmark runs
✅ Benchmarks from pull_request triggers complete reliably
✅ Reduced wasted CI time

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Bot reviews (AI code reviewers) trigger pull_request_review events that
start a new Benchmark workflow run. The concurrency group then cancels
the real benchmark run from the pull_request event, causing all
benchmark jobs to be cancelled on every PR with AI reviewers enabled.

Fix: skip the workflow early when the review author is a Bot account.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings February 21, 2026 03:32
@codeant-ai
Copy link
Copy Markdown
Contributor

codeant-ai bot commented Feb 21, 2026

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 21, 2026

Warning

Rate limit exceeded

@sbryngelson has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 8 minutes and 22 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

@codeant-ai codeant-ai bot added the size:XS This PR changes 0-9 lines, ignoring generated files label Feb 21, 2026
@codeant-ai
Copy link
Copy Markdown
Contributor

codeant-ai bot commented Feb 21, 2026

CodeAnt AI finished reviewing your PR.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Prevents benchmark workloads from being started by bot-authored PR review events (which can interfere with “real” benchmark runs).

Changes:

  • Adds a job-level if guard to skip the file-changes job when the triggering event is pull_request_review and the reviewer is a Bot.

sbryngelson and others added 2 commits February 20, 2026 22:39
Job-level `if` doesn't prevent the workflow run from being created,
so the concurrency group still cancels in-progress runs. Fix by
giving bot review runs a unique concurrency group (appending run_id)
so they can't cancel real benchmark runs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
AI reviewer accounts (coderabbitai, copilot-pull-request-reviewer,
etc.) are Organization or User type, not Bot. Instead of trying to
detect bots, give all pull_request_review runs a unique concurrency
group so they never cancel pull_request benchmark runs. The self
job's if condition already gates for approved human reviews only.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 1 file

Confidence score: 5/5

  • Automated review surfaced no issues in the provided summaries.
  • No files require special attention.

@sbryngelson sbryngelson merged commit 84c46e0 into MFlowCode:master Feb 21, 2026
20 checks passed
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 1 file (changes from recent commits).

Prompt for AI agents (all issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name=".github/workflows/bench.yml">

<violation number="1" location=".github/workflows/bench.yml:10">
P2: This concurrency group now makes every pull_request_review run unique, so human review approvals won’t cancel the pull_request benchmark run and you can end up running benchmarks twice for the same PR. If the intent is only to avoid bot cancellations, restrict the run_id suffix to bot reviews.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.


concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}${{ github.event_name == 'pull_request_review' && format('-review-{0}', github.run_id) || '' }}
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.

P2: This concurrency group now makes every pull_request_review run unique, so human review approvals won’t cancel the pull_request benchmark run and you can end up running benchmarks twice for the same PR. If the intent is only to avoid bot cancellations, restrict the run_id suffix to bot reviews.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At .github/workflows/bench.yml, line 10:

<comment>This concurrency group now makes every pull_request_review run unique, so human review approvals won’t cancel the pull_request benchmark run and you can end up running benchmarks twice for the same PR. If the intent is only to avoid bot cancellations, restrict the run_id suffix to bot reviews.</comment>

<file context>
@@ -7,15 +7,12 @@ on:
 
 concurrency:
-  group: ${{ github.workflow }}-${{ github.ref }}${{ github.event_name == 'pull_request_review' && github.event.review.user.type == 'Bot' && format('-bot-{0}', github.run_id) || '' }}
+  group: ${{ github.workflow }}-${{ github.ref }}${{ github.event_name == 'pull_request_review' && format('-review-{0}', github.run_id) || '' }}
   cancel-in-progress: true
 
</file context>
Suggested change
group: ${{ github.workflow }}-${{ github.ref }}${{ github.event_name == 'pull_request_review' && format('-review-{0}', github.run_id) || '' }}
group: ${{ github.workflow }}-${{ github.ref }}${{ github.event_name == 'pull_request_review' && github.event.review.user.type == 'Bot' && format('-review-{0}', github.run_id) || '' }}

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 21, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 44.05%. Comparing base (356b61f) to head (ad670bb).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1192   +/-   ##
=======================================
  Coverage   44.05%   44.05%           
=======================================
  Files          70       70           
  Lines       20498    20498           
  Branches     1990     1990           
=======================================
  Hits         9030     9030           
  Misses      10329    10329           
  Partials     1139     1139           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sbryngelson sbryngelson deleted the ci-bench-bot-fix branch February 22, 2026 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Development

Successfully merging this pull request may close these issues.

2 participants