feat: implement issue #608 — pr-review CI gate treats CANCELLED checks as failing — dev-lead's concurrency-cancelled jobs falsely block reviews#609
Conversation
…s as failing — dev-lead's concurrency-cancelled jobs falsely block reviews
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
Warning Review limit reached
More reviews will be available in 35 minutes and 29 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the 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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 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 |
There was a problem hiding this comment.
Code Review
This pull request updates the CI status script to treat CANCELLED checks as non-blocking (passing) rather than failing, resolving issue #608 where superseded orchestration jobs blocked PR reviews. It also adds comprehensive tests to verify this behavior. The reviewer suggested a minor improvement to use the idiomatic all/2 jq builtin for better readability when checking if all external runs are successful or cancelled.
Dev-Lead — fix-reviews (applied)Changes committed and pushed. |
|
Dev-Lead — review-changes (no-changes)No changes were needed for this PR. |
Dev-Lead — fix-reviews (no-changes)Agent reasoning |
donpetry-bot
left a comment
There was a problem hiding this comment.
Automated review — APPROVED ✓
Risk: MEDIUM
Reviewed commit: 6255bea2a327b7bbb1d9a918710259bab3ca4c19
Review mode: triage-approved (single reviewer)
Summary
Treats CANCELLED check conclusions as non-blocking (success-equivalent) in compute_ci_status (scripts/lib/ci-status.sh), fixing the false ci-failing classification caused by dev-lead's concurrency-cancelled orchestration jobs (issue #608). Adds 8 targeted bats tests covering the fix plus regression guards (FAILURE, TIMED_OUT, IN_PROGRESS still classify correctly). The change is small, well-commented with rationale, and the gemini reviewer's all/2 jq suggestion was applied in the head commit. I independently smoke-tested the new logic against five scenarios (cancelled-only, cancelled+failure, cancelled+pending, timed-out, and the exact issue repro) — all classify correctly. shellcheck passes on the modified script.
Linked issue analysis
Closes #608. The issue's documented evidence (PRs #549, #521, #528, #483, #606 falsely blocked by CANCELLED dev-lead checks) is fully resolved by this change — it implements option 1 of the issue's proposed fixes. Note: the issue title was broadened to ask for gating on REQUIRED checks only (non-required FAILED checks also false-block), which this PR does not implement; non-required FAILED checks will still block reviews. Since merging closes #608, consider filing a follow-up issue for required-checks-only gating (and/or option 2, excluding dev-lead orchestration jobs in is_own_check) if that broader behavior is still wanted.
Findings
- Correct fix with guards:
is_cancelledis only consulted in the final passing/failing branch, after the pending check — so CANCELLED alongside in-progress checks still yieldspending, and CANCELLED alongside FAILURE still yieldsfailing. Verified by tests and independent smoke-test. - Known tradeoff (acceptable, documented): a check CANCELLED because a real CI suite was manually aborted now also counts as passing. The issue explicitly considered finer granularity (option 3) and chose the simple approach; the header comment documents why.
- Minor (non-blocking): the test named "status context CANCELLED-equivalent: real TIMED_OUT…" actually uses a CheckRun, not a StatusContext — the name is slightly misleading but the assertion is valid.
- Scope gap (non-blocking, see issue analysis): non-required FAILED checks still block; the broader "gate on REQUIRED checks only" ask in the issue title is unimplemented — recommend a follow-up issue.
CI status
All checks green at 6255bea2a327b7bbb1d9a918710259bab3ca4c19: Lint (shellcheck, bats, gh-aw-compile, validate-agent-profiles), CI (ShellCheck, Agent Security Scan, gitleaks, compile), CodeQL (actions, python), SonarCloud quality gate passed (0 new issues, 0 hotspots), Test Dev-Lead Agent suite, dependency-audit (skipped — no ecosystems), AgentShield, CodeRabbit (approved). The new bats tests ran in the bats Lint job and passed.
Reviewed automatically by the PR-review agent (single-reviewer mode: fable 5). Reply if you need a human review.
…s as failing — dev-lead's concurrency-cancelled jobs falsely block reviews (#609) * feat: implement issue #608 — pr-review CI gate treats CANCELLED checks as failing — dev-lead's concurrency-cancelled jobs falsely block reviews * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…s as failing — dev-lead's concurrency-cancelled jobs falsely block reviews (#609) * feat: implement issue #608 — pr-review CI gate treats CANCELLED checks as failing — dev-lead's concurrency-cancelled jobs falsely block reviews * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…s as failing — dev-lead's concurrency-cancelled jobs falsely block reviews (#609) * feat: implement issue #608 — pr-review CI gate treats CANCELLED checks as failing — dev-lead's concurrency-cancelled jobs falsely block reviews * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…s as failing — dev-lead's concurrency-cancelled jobs falsely block reviews (#609) * feat: implement issue #608 — pr-review CI gate treats CANCELLED checks as failing — dev-lead's concurrency-cancelled jobs falsely block reviews * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>
…s as failing — dev-lead's concurrency-cancelled jobs falsely block reviews (#609) * feat: implement issue #608 — pr-review CI gate treats CANCELLED checks as failing — dev-lead's concurrency-cancelled jobs falsely block reviews * fix(reviews): address review comments [skip ci-relay] --------- Co-authored-by: donpetry-bot <{}+donpetry-bot@users.noreply.github.com> Co-authored-by: donpetry-bot <281750570+donpetry-bot@users.noreply.github.com>



Closes #608
Implemented by dev-lead agent. Please review.