Repository navigation
automerge: R6, merge only when every review thread is resolved (+ R3 test) - #1081
Conversation
Owner ruling R6 (2026-11-13): auto-merge only when all review threads are resolved. #1072 and #1073 merged with open bot findings because nothing checked threads. pr_threads_ready (scripts/sweeps/lib/merge-ready.sh) reads the PR's review threads through GraphQL (resolution state is not in REST) and is called for every auto_merge row at --execute, after merge_ready. It blocks with unresolved_review_threads:<n>, and fails closed with check_unavailable:review_threads when the answer is unreadable or there are more than 100 threads. Tests (stub gh now serves GraphQL per PR number): an open thread, a 502 and an unread second page each stop the merge with the reason logged; all-resolved merges again; R3, a PR not authored by a dependency bot (e.g. the template upgrade wave) is flagged and never merged. Removing the call makes the first case fail. This gate covers the sweep. GitHub's native auto-merge waits for later threads only if the ruleset requires conversation resolution, which is an owner setting. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7Zo6VBPrBWYUmDJZR1H
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 31 minutes. View limit details
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. |
Name the threads() parameters, use one constant for the PR 7 merge marker, and [[ ]] for the R3 check. No behaviour change; the sweep test still passes. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_0136P7Zo6VBPrBWYUmDJZR1H
|
|
This security review couldn’t start because the paying account has exhausted its Codex allowance and has insufficient available credits. The payer can check their balance and add credits in the Codex usage dashboard, then try again. If you do not manage the paying account, contact this repository's admins. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |



Summary
Owner ruling R6 (2026-11-13): auto-merge only when all review threads are resolved. Today nothing checks threads, so #1072 and #1073 merged with open bot findings.
pr_threads_ready FULL NUMinscripts/sweeps/lib/merge-ready.sh. It reads the PR's review threads through GraphQL (resolution state is not in REST) and is called byscripts/sweeps/estate-pr-automerge.shfor everyauto_mergerow at--execute, right aftermerge_ready.unresolved_review_threads:<n>. Fails closed withcheck_unavailable:review_threadswhen the answer is unreadable or there are more than 100 threads.docs/operations/estate-automerge.adoc: the execute-time gate list names it.Limit: this covers the estate sweep at the moment it queues a merge. GitHub's native auto-merge (
--auto) waits for threads opened later only if the ruleset requires conversation resolution. That is an owner setting, not part of this PR.R3 (the template upgrade wave never auto-merges) needs no code: the sweep already blocks every PR not authored by a dependency bot (
not_a_dependency_bot). This PR adds a test that pins it.Test plan
test/pr-automerge-sweep-test.sh(the stubghnow serves GraphQL per PR number): an open thread, a GraphQL 502 and an unread second page each stop the merge with the reason logged; all threads resolved merges again; R3: a non-bot PR is flagged and never merged.bash -non the changed scripts. ShellCheck is not installed in this session; CI runs it.Generated by Claude Code