Skip to content

feat(review): warn and close abandoned CI-failing pull requests #670

Description

@neubig

Desired Behavior

Extend the existing GitHub PR review automation so that its scheduled reconciliation also handles every open, non-draft pull request in its configured repositories whose GitHub-required checks for the base branch have remained failing. A reviewer trigger label or review request is not required for this deterministic maintenance pass. Optional checks do not count.

The lifecycle must be deterministic and idempotent:

  1. After required CI has been continuously failing for at least seven days, post one marked comment asking the author to repair CI.
  2. If the PR still has failing required CI seven days after that warning and the author has neither pushed a commit nor commented after the warning, close the PR with a marked explanation.
  3. Do not close when CI recovered, CI is pending, the PR became draft, the PR was already closed/merged, or the author followed up after the warning.
  4. A head update or author comment after the warning counts as follow-up. If CI remains failing, a later warning must start a new seven-day response window rather than immediately closing.

Reuse the reviewer automation's existing GitHub request, pagination, repository configuration, and durable state/comment-marker mechanisms. Keep the stale-CI decision deterministic; it should not consume an LLM review slot.

Acceptance Criteria

  • The scheduled maintenance pass covers every open, non-draft PR in configured repositories, regardless of review trigger state.
  • Required CI is derived from GitHub's required checks for the PR's base branch; optional failed checks do not trigger this lifecycle.
  • A non-draft PR with required CI continuously failing for at least seven days receives exactly one clearly marked repair-CI warning.
  • Repeated scans do not duplicate the warning.
  • A warned PR is closed only after seven additional days with required CI still failing and no author commit or comment after the warning.
  • Passing or pending required CI, a new author commit, an author comment, draft conversion, merge, or closure prevents the stale close.
  • After author follow-up, any later warning starts a fresh seven-day response window.
  • The logic uses existing reviewer extension machinery and works the same in local and Docker-backed Canvas deployments.
  • Focused tests cover warning, idempotent rescan, close, CI recovery, pending CI, and author follow-up without duplicating existing GitHub helper tests.
  • A live Canvas validation demonstrates the warning path and a time-controlled close/no-close reconciliation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestpriority:normalNormal priorityready-for-devScoped for contribution; managed by repository readiness checks.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions