diff --git a/.agents/skills/pr-batch/SKILL.md b/.agents/skills/pr-batch/SKILL.md index e0e0cf3e51..d2ba4275cf 100644 --- a/.agents/skills/pr-batch/SKILL.md +++ b/.agents/skills/pr-batch/SKILL.md @@ -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 --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 --required` reports no required checks, do NOT treat that as CI-ready: instead treat the full `gh pr checks ` list as the readiness gate and require those checks to pass. + 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. diff --git a/.agents/workflows/adversarial-pr-review.md b/.agents/workflows/adversarial-pr-review.md index c26d4bd3d0..3c9601c7c4 100644 --- a/.agents/workflows/adversarial-pr-review.md +++ b/.agents/workflows/adversarial-pr-review.md @@ -26,7 +26,10 @@ gh pr checks 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 --required` reports no required checks, do +NOT treat that as CI-ready: instead treat the full `gh pr checks ` 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 ` 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` @@ -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 --required` +- required CI status from `gh pr checks --required`; if it reports no required checks, treat the full `gh pr checks ` list as the readiness gate and require those checks to pass - advisory review-agent status from `gh pr checks ` 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`) diff --git a/.agents/workflows/pr-processing.md b/.agents/workflows/pr-processing.md index 15e79240f0..6291fc46ec 100644 --- a/.agents/workflows/pr-processing.md +++ b/.agents/workflows/pr-processing.md @@ -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 --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 --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 --required` reports no required checks, do NOT treat that as CI-ready: instead treat the full `gh pr checks ` 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. @@ -523,6 +523,12 @@ gh pr checks --required gh pr checks ``` +If `gh pr checks --required` reports no required checks, do NOT treat that +as CI-ready. Instead treat the full `gh pr checks ` 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.) + 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