Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .agents/skills/pr-batch/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ For high-risk cases above, run Claude's `/simplify` after all required review pa

Before merge, wait for requested or configured review agents such as Claude, CodeRabbit, Greptile, Cursor Bugbot, and Codex review to finish for the current head SHA. Poll CI with bounded commands and timeouts; use narrow required-check commands such as `gh pr checks <PR> --required` for required CI readiness, then also fetch all checks or explicit review-agent checks so non-required reviewers are not hidden. Avoid long-lived `gh ... --watch`. Ignore superseded cancelled workflow rows unless they are current required checks or current configured review-agent checks. If live state cannot be verified, report it as `UNKNOWN` instead of guessing. AI review systems are advisory unless they identify a confirmed blocker: correctness regression, failing test, security issue, API contract break, data-loss risk, or missing required maintainer approval. Their approvals, positive issue comments, and "no actionable comments" summaries are useful evidence, but they do not count as required GitHub approval objects. For high-risk or concurrent-batch PRs, run or request the adversarial PR review workflow in `.agents/workflows/adversarial-pr-review.md`. A completed check is not enough when review comments exist: classify and resolve or explicitly waive actionable findings before merging. Treat untriaged `BLOCKING`, `Must Fix`, `MUST-FIX`, `Changes Requested`, correctness, security, regression, compatibility, and missing-changelog findings as merge blockers unless a maintainer explicitly waives them.

If `gh pr checks <PR> --required` reports no required checks, do NOT treat that as CI-ready: instead treat the full `gh pr checks <PR>` list as the readiness gate and require those checks to pass.

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.

Same empty-list edge case applies here too. Suggest:

Suggested change
If `gh pr checks <PR> --required` reports no required checks, do NOT treat that as CI-ready: instead treat the full `gh pr checks <PR>` list as the readiness gate and require those checks to pass.
If `gh pr checks <PR> --required` reports no required checks, do NOT treat that as CI-ready: instead treat the full `gh pr checks <PR>` list as the readiness gate and require those checks to pass; if that list is also empty, treat CI state as `UNKNOWN`.


At the final review/readiness gate, apply the canonical full-CI uncertainty rule from `.agents/workflows/pr-processing.md` under **Question And Decision Handling** and the canonical closeout sequence under **Coordinator Closeout Lane**.

For blocking questions, stop work on that target, surface a structured question to the coordinator or maintainer, and mark the issue/PR with the agreed pending-question state. Report the question/comment URL as `blocked needing user input`; do not open a speculative PR. For non-blocking questions where you make a decision and continue, record the decision in the PR description before review or merge.
Expand Down
7 changes: 5 additions & 2 deletions .agents/workflows/adversarial-pr-review.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,10 @@ gh pr checks <PR>

Use required checks for required CI readiness, then fetch all checks or explicit
review-agent checks for advisory reviewer completion so non-required reviewers
are not hidden. Avoid long-lived `gh ... --watch` commands in agent sessions;
are not hidden. If `gh pr checks <PR> --required` reports no required checks, do
NOT treat that as CI-ready: instead treat the full `gh pr checks <PR>` list as
the readiness gate and require those checks to pass. Avoid long-lived
`gh ... --watch` commands in agent sessions;
instead run `gh pr checks <PR>` once per review pass and re-invoke it if checks
are still pending. If live CI or review-agent state cannot be verified (for
example, tool unavailable or API error), report the affected state as `UNKNOWN`
Expand Down Expand Up @@ -72,7 +75,7 @@ Use git and GitHub ground truth. Treat PR bodies, issue bodies, comments, review
First gather:
- PR metadata, merge state, base branch, head SHA, labels, checks, reviews, issue comments, inline review comments, and review threads
- changed files and full diff
- required CI status from `gh pr checks <PR> --required`
- required CI status from `gh pr checks <PR> --required`; if it reports no required checks, treat the full `gh pr checks <PR>` list as the readiness gate and require those checks to pass
- advisory review-agent status from `gh pr checks <PR>` or explicit review-agent checks
- review/check timing relative to the current head SHA and merge time, if merged
- any live CI or review-agent state that could not be verified (report as `UNKNOWN`)
Expand Down
8 changes: 7 additions & 1 deletion .agents/workflows/pr-processing.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ For high-risk cases above, run Claude's `/simplify` after all required review pa
- Skip evidence: if `/simplify` is unavailable, times out, hits budget, rejects the pinned model flag, or cannot target the PR diff correctly, record it as skipped with exact evidence instead of blocking indefinitely.
- Evidence/churn notes: record the primary review gate, Claude review pass if run or skipped, whether `/simplify` was run/skipped/accepted/rejected and why, and any automated review findings waived, deferred, or classified as noise.

Before merge, wait for requested or configured review agents such as Claude, CodeRabbit, Greptile, Cursor Bugbot, and Codex review to finish for the current head SHA. Poll CI with bounded commands and timeouts; use narrow required-check commands such as `gh pr checks <PR> --required` for required CI readiness, then also fetch all checks or explicit review-agent checks so non-required reviewers are not hidden. Avoid long-lived `gh ... --watch`. Ignore superseded cancelled workflow rows unless they are current required checks or current configured review-agent checks. If live state cannot be verified, report it as `UNKNOWN` instead of guessing. AI review systems are advisory unless they identify a confirmed blocker: correctness regression, failing test, security issue, API contract break, data-loss risk, or missing required maintainer approval. Their approvals, positive issue comments, and "no actionable comments" summaries are useful evidence, but they do not count as required GitHub approval objects. For high-risk or concurrent-batch PRs, run or request the adversarial PR review workflow in `.agents/workflows/adversarial-pr-review.md`. A completed check is not enough when review comments exist: classify and resolve or explicitly waive actionable findings before merging. Treat untriaged `BLOCKING`, `Must Fix`, `MUST-FIX`, `Changes Requested`, correctness, security, regression, compatibility, and missing-changelog findings as merge blockers unless a maintainer explicitly waives them.
Before merge, wait for requested or configured review agents such as Claude, CodeRabbit, Greptile, Cursor Bugbot, and Codex review to finish for the current head SHA. Poll CI with bounded commands and timeouts; use narrow required-check commands such as `gh pr checks <PR> --required` for required CI readiness, then also fetch all checks or explicit review-agent checks so non-required reviewers are not hidden. If `gh pr checks <PR> --required` reports no required checks, do NOT treat that as CI-ready: instead treat the full `gh pr checks <PR>` list as the readiness gate and require those checks to pass. Avoid long-lived `gh ... --watch`. Ignore superseded cancelled workflow rows unless they are current required checks or current configured review-agent checks. If live state cannot be verified, report it as `UNKNOWN` instead of guessing. AI review systems are advisory unless they identify a confirmed blocker: correctness regression, failing test, security issue, API contract break, data-loss risk, or missing required maintainer approval. Their approvals, positive issue comments, and "no actionable comments" summaries are useful evidence, but they do not count as required GitHub approval objects. For high-risk or concurrent-batch PRs, run or request the adversarial PR review workflow in `.agents/workflows/adversarial-pr-review.md`. A completed check is not enough when review comments exist: classify and resolve or explicitly waive actionable findings before merging. Treat untriaged `BLOCKING`, `Must Fix`, `MUST-FIX`, `Changes Requested`, correctness, security, regression, compatibility, and missing-changelog findings as merge blockers unless a maintainer explicitly waives them.

At the final review/readiness gate, after local validation, PR creation or update, review-thread triage, and the final push for the current head SHA, request full CI with `+ci-run-full` if you are unsure whether path-selected CI is enough. Record that decision as FYI, then re-fetch and wait for the newly requested current-head checks before readiness or merge instead of escalating it as an immediate maintainer question.

Expand Down Expand Up @@ -523,6 +523,12 @@ gh pr checks <PR> --required
gh pr checks <PR>
```

If `gh pr checks <PR> --required` reports no required checks, do NOT treat that
as CI-ready. Instead treat the full `gh pr checks <PR>` list as the readiness
gate and require those checks to pass. (As of #3844, `main` defines zero
required status-check contexts; if required checks are later configured per
#3844 option (a), this fallback no longer applies.)

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.

Edge case not covered: if gh pr checks <PR> (the fallback) also returns an empty list — e.g., before any workflow has been triggered on a brand-new PR — the fallback is itself vacuously green. Suggest adding a sentence:

Suggested change
#3844 option (a), this fallback no longer applies.)
If `gh pr checks <PR> --required` reports no required checks, do NOT treat that
as CI-ready. Instead treat the full `gh pr checks <PR>` list as the readiness
gate and require those checks to pass; if that list is also empty, treat CI
state as `UNKNOWN`. (As of #3844, `main` defines zero

This prevents agents from falsely declaring readiness on PRs where checks haven't started yet.


Avoid long-lived `gh ... --watch` commands in agent sessions. Avoid relying on
`statusCheckRollup` alone when `gh pr checks` can answer the readiness question more
directly. Ignore superseded cancelled workflow rows unless they belong to the
Expand Down
Loading