Skip to content

feat: implement issue #608 — pr-review CI gate treats CANCELLED checks as failing — dev-lead's concurrency-cancelled jobs falsely block reviews#609

Merged
don-petry merged 2 commits into
mainfrom
dev-lead/issue-608-20260612-0055
Jun 12, 2026
Merged

feat: implement issue #608 — pr-review CI gate treats CANCELLED checks as failing — dev-lead's concurrency-cancelled jobs falsely block reviews#609
don-petry merged 2 commits into
mainfrom
dev-lead/issue-608-20260612-0055

Conversation

@don-petry

Copy link
Copy Markdown
Collaborator

Closes #608

Implemented by dev-lead agent. Please review.

…s as failing — dev-lead's concurrency-cancelled jobs falsely block reviews
@don-petry don-petry requested a review from a team as a code owner June 12, 2026 01:01
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@don-petry, we couldn't start this review because you've reached your PR review rate limit.

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 @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 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 configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 793ae3f7-08b2-4b78-9378-65c9c53d1872

📥 Commits

Reviewing files that changed from the base of the PR and between afb4acd and 6255bea.

📒 Files selected for processing (2)
  • scripts/lib/ci-status.sh
  • tests/test_ci_status.bats
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch dev-lead/issue-608-20260612-0055

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.

@gemini-code-assist gemini-code-assist 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.

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.

Comment thread scripts/lib/ci-status.sh Outdated
@don-petry don-petry enabled auto-merge (squash) June 12, 2026 01:03
@don-petry don-petry disabled auto-merge June 12, 2026 01:03
@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (applied)

Changes committed and pushed.

@don-petry don-petry enabled auto-merge (squash) June 12, 2026 01:05
@don-petry don-petry disabled auto-merge June 12, 2026 01:06
@sonarqubecloud

Copy link
Copy Markdown

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — review-changes (no-changes)

No changes were needed for this PR.

@don-petry

Copy link
Copy Markdown
Collaborator Author

Dev-Lead — fix-reviews (no-changes)

Agent reasoning
`bats` is not installed locally, but CI already ran `bats` and reported **success** (see `bats` check in the CI results). No local changes were made.
---
**Addressed 0 threads:**
*(Open threads JSON was empty — nothing to address.)*
**Holistic assessment:**
- No CI checks with `failure`, `timed_out`, `cancelled`, `action_required`, `stale`, or `startup_failure` — zero Tier 1 CI blockers.
- No reviewer with `CHANGES_REQUESTED` — zero Tier 1 review blockers.
- `coderabbitai[bot]` has `APPROVED`; `don-petry` and `gemini-code-assist[bot]` are `COMMENTED` only.
**Test verification:** CI `bats` check completed with `success`; no local changes to re-test.
**Files changed:** none.

@don-petry don-petry enabled auto-merge (squash) June 12, 2026 01:41

@donpetry-bot donpetry-bot left a comment

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.

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_cancelled is only consulted in the final passing/failing branch, after the pending check — so CANCELLED alongside in-progress checks still yields pending, and CANCELLED alongside FAILURE still yields failing. 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.

@don-petry don-petry merged commit 29e5974 into main Jun 12, 2026
38 of 40 checks passed
@don-petry don-petry deleted the dev-lead/issue-608-20260612-0055 branch June 12, 2026 01:43
don-petry added a commit that referenced this pull request Jun 12, 2026
…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>
don-petry added a commit that referenced this pull request Jun 14, 2026
…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>
don-petry added a commit that referenced this pull request Jun 18, 2026
…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>
don-petry added a commit that referenced this pull request Jun 25, 2026
…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>
don-petry added a commit that referenced this pull request Jun 25, 2026
…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>
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.

pr-review CI gate should gate on REQUIRED checks only — non-required CANCELLED *and* FAILED checks falsely block reviews

2 participants