Skip to content

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

Description

@don-petry

Summary

compute_ci_status (scripts/lib/ci-status.sh) classifies any check that is not SUCCESS/SKIPPED/NEUTRAL/pending as failing — which sweeps in CANCELLED checks. dev-lead's own orchestration jobs (dev-lead / dispatch, dev-lead / ci-relay) are routinely cancelled by dev-lead's concurrency (superseded runs), leaving CANCELLED check-runs on the PR. The gate then reads the PR as ci-failing and pr-review skips it — even though nothing actually failed. FORCE_REVIEW=true does not bypass this (the CI gate precedes the force path).

Root cause

scripts/lib/ci-status.sh:

def is_success:
  .conclusion == "SUCCESS" or .conclusion == "SKIPPED" or .conclusion == "NEUTRAL" or .state == "SUCCESS";
...
elif ([$ext[] | select(is_success)] | length) == ($ext | length) then "passing"
else "failing"   # <-- CANCELLED, TIMED_OUT, etc. all land here

A CANCELLED check is neither pending nor success → falls through to failing.

Evidence (2026-06-12)

Of the PRs skipped as ci-failing in batch run 27376131558, only one has a real failure:

PR real FAILUREs CANCELLED reality
#570 3 0 genuinely failing ✓ correct skip
#549 0 2 only cancelled dev-lead checks — false block
#521 0 2 false block
#528 0 4 false block
#483 0 6 false block

The cancelled checks are dev-lead orchestration jobs:

dev-lead / dispatch    COMPLETED  CANCELLED
dev-lead / ci-relay    COMPLETED  CANCELLED

This is currently blocking PR #606 (the fix for #574) — its only non-green checks are two CANCELLED dev-lead jobs, so the force-review run logged:

{"pr":".../pull/606","decision":"skip","reason":"ci-failing"}

Impact

A large share of the "PRs pending review" backlog is not genuinely failing CI — it's this false-positive. dev-lead's concurrency cancellations are a normal, frequent occurrence, so many PRs carry CANCELLED orchestration checks and are silently un-reviewable. Force-review can't rescue them.

Proposed fix (pick one or combine)

  1. Treat CANCELLED as non-blocking in is_success (or as pending) — a cancelled check is not a failed check. Simplest, broad fix.
  2. Extend is_own_check to also exclude dev-lead's orchestration jobs (dev-lead / dispatch, dev-lead / ci-relay, ^Dev-Lead) the same way it excludes the pr-review cascade's own checks — these aren't real CI signal for merge-readiness.
  3. Distinguish "cancelled because superseded" (ignore) from "cancelled because the suite was aborted" (treat as pending/failing) if finer granularity is wanted.

Option 1 + 2 together is safest: ignore dev-lead's own orchestration checks, and don't treat a bare CANCELLED as a hard failure.

Related


Filed from an investigation into "pr-review agent not working — many PRs pending review."

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug reportsdev-leadFor dev-lead agent pickup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions