Repository navigation
feat: implement issue #1126 — Free-plan 20-job cap: PR Auto-Review Ready Check has no concurrency and fans out per check_suite/workflow_run — dedupe the default-branch-context runs only - #1131
Conversation
…ady Check has no concurrency and fans out per check_suite/workflow_run — dedupe the default-branch-context runs only
|
ⓘ Qodo reviews are paused because your trial has ended. Ask your workspace admin to add credits to resume reviews. Manage billing |
🤖 CodeAnt AI — Review Status
|
Thanks for using CodeAnt! 🎉We're free for open-source projects. if you're enjoying it, help us grow by sharing. Share on X · |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reachedNext included review available in 40 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe workflow adds concurrency rules that deduplicate ChangesPR Auto-Review concurrency
Priority: ⚪ Not assessed Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Feature · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The concurrency configuration preserves unique PR-less and PR-head runs while deduplicating PR-associated default-branch events. No concrete merge-blocking behavior remains. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation Issue Resolution Apply the same concurrency block to the Full details: Docstring CoverageExplanation Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. (2 skipped: 2 unsupported.) ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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. Comment |
Dev-Lead — waiting on PR blockers (intent: review-changes)PR: #1131 |
|
Note @don-petry I reviewed this PR and no code changes were needed, but it still has blocking checks or reviews (failing or cancelled checks, or changes-requested reviews), so I cannot mark it done yet. I'll re-check automatically. |
There was a problem hiding this comment.
Code Review
This pull request adds a workflow-level concurrency configuration to the pr-auto-review.yml template to deduplicate default-branch-context triggers based on the PR number, and introduces a comprehensive BATS test suite to verify this behavior. The review feedback highlights a critical issue where the live copy of the workflow must also be updated to prevent the new tests from failing in CI. Additionally, it is recommended to explicitly assert a successful exit status ($status -eq 0) in the BATS tests before evaluating their output.
|
No description provided. |
CodeAnt Nitpicks1 code suggestion1. Cancellation can occur after the readiness check but during dispatch, allowing the replacement run to dispatch the same PR again and create duplicate reviews.Race condition · |
Dev-Lead — fix-reviews (partial)A commit was pushed, but not every requested change was applied. Per requested item:
The unaddressed items above still need work. |
Superseded by automated re-review at
|
Superseded by automated re-review at
|
|
pr-review approved on PARTIAL advisory evidence: 4/6 required advisory bots reported before the gate's head-age-timeout fallback proceeded. Recorded for the miss-rate metric (#1596). |
|
Dev-Lead — fix-bot-comment (no-changes)Agent reasoning |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 05fb262666f51f4bef6032bfc6450063b9b88c7c
Cascade: triage → deep (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5)
Summary
Adds a workflow-level concurrency block to the PR Auto-Review Ready Check caller stub to dedupe only the default-branch-context triggers (check_suite/workflow_run) per PR on GitHub Free's 20-job cap, while keeping PR-head triggers (pull_request/pull_request_review) unique and never-cancelled. Traced the GitHub expression across all four event types plus the no-PR/fork fallback — grouping and cancel-in-progress are correct, live and template copies match exactly (resolving the earlier gemini template-drift finding), and all CI/bats checks are green. The codeant race concern is an inherent best-effort property of cancel-in-progress that strictly improves on the prior no-concurrency fan-out and aligns with #1126's dedup goal, not a correctness regression.
Findings
- info: Concurrency group expression traced correct across all triggers: check_suite/workflow_run with a PR collapse onto the shared 'pr-auto-review-ready-check-pr-' group (cancel-in-progress: true); check_suite with no associated PR (fork/no-PR) safely falls through to the unique-per-run group; pull_request/pull_request_review always take the unique fallback and never cancel. Verified live==template via yq folding and the folded string matches the pinned bats expectations; all CI/bats checks pass. [auditable: repro confirmed]
- minor: codeant-ai flagged that cancel-in-progress can supersede a check_suite/workflow_run run after its readiness check but during dispatch, letting the replacement run dispatch the same PR and produce a duplicate review. This is an inherent best-effort property of cancel-in-progress, not a defect in the added expression: it strictly reduces duplicates versus the prior no-concurrency fan-out and matches issue #1126's 'reduce duplicate runs' goal (not exactly-once). The dispatch and any idempotency guard live in the out-of-scope reusable (@pr-auto-review/v1-next); worst case is a rare duplicate in a narrow window, no worse than prior behavior. Not blocking; note for maintainers if exactly-once dispatch is later required.
Reviewed by the PR-review cascade (triage: haiku 4.5 [sonnet 5] → deep: opus 4.8 [sonnet 5] + duck: o4-mini → audit: fable 5). Reply if you need a human review.
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 05fb262666f51f4bef6032bfc6450063b9b88c7c
Review mode: triage-approved (single reviewer)
Summary
Adds a workflow-level concurrency: block to the PR Auto-Review Ready Check caller stub — identically in the live copy (.github/workflows/pr-auto-review.yml) and the standards template (standards/workflows/pr-auto-review.yml) — plus a 152-line bats suite. The block deduplicates ONLY the default-branch-context triggers (check_suite/workflow_run), keying them on the associated PR number with cancel-in-progress: true, while pull_request/pull_request_review runs (and any default-branch trigger with no associated PR) fall back to a unique-per-run group keyed on github.run_id, preserving today's behavior and avoiding the #1422/#1427 cancelled-check stranding shape. The GitHub Actions &&/|| value-returning expression chain resolves correctly for all four events, including the empty pull_requests[0] fork/no-PR fallback. Trigger events and job-level permissions: are untouched.
Linked issue analysis
Linked issue #1126 is substantively addressed. AC1 (dedupe only default-branch-context triggers, PR-number group, unique fallback, expression-gated cancel-in-progress): implemented exactly as specified. AC2 (template and live copy changed together, drift reconciled): both files in this repo carry byte-identical blocks, and the bats suite pins template/live parity so a standards resync cannot revert it; the .github-private copy lives in a separate repo and is necessarily out of this PR's scope. AC3 (per-event resolved group/cancel tests incl. no-PR check_suite): covered by the pinned-expression and resolver tests. AC4 is a post-deploy observation recorded on the issue. AC5: Lint/actionlint and bats checks are green.
Findings
No blocking findings. Triage-approved confirmation review verified: (1) no secret handling — the stub's permissions: {} and job permissions are untouched and no third-party action or reusable is added; (2) the concurrency group expression uses only numeric/event-name contexts, no script-injection surface; (3) both prior review-bot threads (gemini-code-assist) are resolved; the prior automated review at this same SHA approved at MEDIUM risk. Note: the run_secret_scanning MCP tool is not available in this environment — the gitleaks CI check (green) covers secret scanning. Risk is MEDIUM (non-trivial workflow logic change), consistent with the prior cascade assessment.
CI status
All required checks green at 05fb262: Lint, ShellCheck, bats (both suites), CodeQL, Agent Security Scan, agent-shield, Secret scan (gitleaks), SonarCloud (quality gate passed), duplicate-decl-gate, dependency-audit (ecosystem-gated jobs skipped as expected), CodeRabbit. No failures or pending checks.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.



User description
Closes #1126
Implemented by dev-lead agent. Please review.
Summary by CodeRabbit
Improvements
Tests
CodeAnt-AI Description
Deduplicate default-branch review checks without interrupting PR checks
What Changed
Impact
✅ Fewer duplicate review runs✅ Lower GitHub Actions concurrency usage✅ No stranded canceled checks on pull requests💡 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:
This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.
Example
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:
This helps CodeAnt AI learn and adapt to your team's coding style and standards.
Example
Retrigger review
Ask CodeAnt AI to review the PR again, by typing:
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.