Skip to content

fix(ci): isolate OpenCodeReview concurrency by event - #946

Merged
think-in-universe merged 2 commits into
mainfrom
codex/fix-ocr-review-concurrency
Aug 20, 2026
Merged

fix(ci): isolate OpenCodeReview concurrency by event#946
think-in-universe merged 2 commits into
mainfrom
codex/fix-ocr-review-concurrency

Conversation

@hanakannzashi

Copy link
Copy Markdown
Contributor

Summary

  • separate pull_request_target and issue_comment OpenCodeReview concurrency groups
  • prevent ordinary bot comments from spawning skipped issue-comment runs that cancel the active PR review
  • retain cancellation behavior for newer /ocr comment reviews on the same PR

Validation

  • git diff --check
  • YAML parse
  • concurrency-group assertion

Unblocks the cancelled code-review checks on #942, #943, and #944.

@claude

claude Bot commented Aug 19, 2026

Copy link
Copy Markdown

Review — fix(ci): isolate OpenCodeReview concurrency by event

Diff is one line: adding ${{ github.event_name }} to the workflow-level concurrency group.

The diagnosis is correct. GitHub evaluates workflow-level concurrency before job-level if, so an issue_comment run that skips the code-review job entirely still claims the group and, with cancel-in-progress: true, kills the in-flight pull_request_target review. Splitting the group by event name fixes exactly that. No other workflow shares this group (promote.yml / rollback.yml use a static prod-image-mutation group), so there is no collateral impact, and /ocr re-runs on the same PR still supersede each other since they share event_name == issue_comment.

No blocking issues.

Non-blocking follow-up

The fix only protects pull_request_target-triggered reviews. A review started by /ocr is still cancellable by any unrelated comment on the same PR, because every issue_comment on PR N lands in OpenCodeReview-issue_comment-N regardless of comment body. This repo has claude.yml and claude-code-review.yml reacting to @claude comments and posting back, so PR threads see plenty of comment traffic — an /ocr run can still be cancelled mid-flight by a comment that was never meant to trigger it.

If you want to close that too, give non-/ocr comment runs a unique group so they cancel nothing:

concurrency:
  group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event.pull_request.number || github.event.issue.number || github.ref }}-${{ (github.event_name == 'issue_comment' && !startsWith(github.event.comment.body, '/ocr')) && github.run_id || 'review' }}
  cancel-in-progress: true

Same startsWith predicate already used in the job if (line 22), so the two stay consistent. Fine as a separate PR — this one already unblocks the cancelled checks on #942, #943, #944.

@ironloopai

ironloopai Bot commented Aug 19, 2026

Copy link
Copy Markdown

🧭 IronLoop Run · Review

This comment updates in place as the Run moves through its stages.

🟩 Final result · Completed

🟨 Queued🟦 Working🟦 Posting results🟩 Completed

Automatic trigger · attempt 1 of 3 · completed in 38s

IronLoop completed the review and posted it to GitHub.

🔗 Result

Open submitted review →

Run details

Run: 2d6c0fcb-2a02-4a28-8bb9-7805cdd6b947
Base: main at 95b3c8c
Head: codex/fix-ocr-review-concurrency at 59d808c
Created: 2026-08-19 08:56 UTC
Updated: 2026-08-19 08:57 UTC

@ironloopai ironloopai 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.

🔍 IronLoop review

🟢 No actionable findings

No actionable findings. The concurrency key now separates pull-request and issue-comment events while retaining cancellation for newer reviews of the same event type. The remaining unrelated-comment behavior was already captured in the existing review discussion.

Validation

  • Workflow concurrency inspection — Static inspection confirms pull-request and issue-comment runs now use distinct groups for the same PR.
  • Diff integrity — The changed workflow contains no whitespace errors.
Review details
  • Run: 2d6c0fcb-2a02-4a28-8bb9-7805cdd6b947
  • Workflow: Review
  • Attempts: 1

@github-actions

Copy link
Copy Markdown

OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@think-in-universe
think-in-universe merged commit 1fdca88 into main Aug 20, 2026
9 checks passed
@PierreLeGuen
PierreLeGuen deleted the codex/fix-ocr-review-concurrency branch August 20, 2026 07:23
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.

3 participants