Skip to content

ci: exclude ready_for_review from the always-on cancelling arm - #2357

Merged
heskew merged 1 commit into
mainfrom
review-ready-alwayson-cancel
Aug 27, 2026
Merged

ci: exclude ready_for_review from the always-on cancelling arm#2357
heskew merged 1 commit into
mainfrom
review-ready-alwayson-cancel

Conversation

@heskew

@heskew heskew commented Aug 26, 2026

Copy link
Copy Markdown
Member

Corrective follow-up to #2353, from the Codex pass: ready_for_review is a non-labeled event, so the ALWAYS_ON arm of the concurrency predicate still placed it in the shared cancelling group in always-on mode — a label-opted bot PR's ready-flip could cancel the labeler's in-flight review and then fail author-based authorization. The cancelling set now excludes ready_for_review in both modes; the job gates are unchanged (ready-flips run review, in their own run_id group, so they run but never cancel).

Propagation: #2354 (v5.1) carries this; a v5.2 sync PR follows this merge; harper-pro #766/#767/#768 updated. An event-matrix regression check (ready_for_review + ALWAYS_ON ⇒ runs-but-does-not-cancel) lands in ai-review-prompts alongside the examples.

Merge order: this, then #2354 and the v5.2 sync.

🤖 Generated with Claude Code

https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

Codex follow-up on #2353: ready_for_review is a non-labeled event, so
the ALWAYS_ON arm of the concurrency predicate still placed it in the
shared cancelling group in always-on mode — a label-opted bot PR's
ready-flip could cancel the labeler's in-flight review and then fail
author-based authorization. The cancelling set now excludes
ready_for_review in BOTH modes; the job gates are unchanged
(ready-flips run review, in their own run_id group).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

heskew added a commit that referenced this pull request Aug 26, 2026
@heskew
heskew enabled auto-merge (squash) August 27, 2026 00:11
@heskew
heskew disabled auto-merge August 27, 2026 00:11
@heskew
heskew merged commit 30db07a into main Aug 27, 2026
41 of 42 checks passed
@heskew
heskew deleted the review-ready-alwayson-cancel branch August 27, 2026 00:11
heskew added a commit that referenced this pull request Aug 27, 2026
* ci(v5.1): sync bot caller workflows with main

Content matches bump-ai-review-prompts-pin (#2328) — identical to main
once that merges.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: adopt ai-review-prompts #90 cost gates (pin be549ad) + ready_for_review trigger

Draft PRs skip review until flipped ready (label still opts one in),
mechanical diffs skip pre-run, reasoning effort scales with diff size
(60/high, 1500/xhigh, else max), synchronize runs debounce 120s.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: admit ready_for_review on label-opted PRs in opt-in mode

kriszyp review finding on the pin-bump PR: with *_ALWAYS_ON unset, the
caller gate admitted only labeled events, so a PR opted in by label
while draft never resumed review when flipped ready — the event died at
the caller gate. Admit ready_for_review when the opt-in label is still
present.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: keep ineligible runs out of the review concurrency group

kriszyp review finding: workflow-level cancel-in-progress fires before
job if:, so in opt-in mode an ineligible event (a push, or a ready-flip
without the opt-in label) cancels an in-flight label-triggered review
and then skips — silently losing the requested review. Ineligible runs
now take a unique run_id group and can never cancel an eligible one;
eligible runs keep cancelling each other (the debounce contract).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: only the provider's own label makes a labeled run eligible

Review finding (Codex + kriszyp, independently): the eligibility
predicate admitted every labeled event, so in opt-in mode an unrelated
label applied mid-review joined the eligible concurrency group,
cancelled the running review, and the replacement then failed the
reusable's exact-label gate — no completed review. The same
unrelated-label cancellation existed in always-on mode before this
series (any labeled event shared the group and authorize then skipped).

The labeled branch now requires the provider's own label, in both the
concurrency predicate and the review job gate, and unrelated-label
events are ineligible in both modes.

Event matrix (opt-in / always-on):
- labeled(provider label): eligible / eligible — supersedes in-flight
- labeled(other): ineligible / ineligible (was: cancelled + no review)
- synchronize: ineligible / eligible
- ready_for_review + label: eligible / eligible
- ready_for_review, no label: ineligible / eligible
- opened, reopened: ineligible / eligible

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: ready_for_review runs review but never cancels

kriszyp follow-up finding: the label-opted ready_for_review event sat
in the shared eligible concurrency group, so on a bot-authored PR it
could cancel the trusted labeler's in-flight review and then be
rejected by author-based authorization — no completed review. The
cancelling set (concurrency predicate) now excludes ready_for_review;
the running set (job gate) keeps it, so trusted-author ready-flips
still review, without the power to cancel. Revisit if the reusable
gains persisted-label authorization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: exclude ready_for_review from the always-on cancelling arm (see #2357)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
heskew added a commit that referenced this pull request Aug 27, 2026
* ci(v5.2): sync bot caller workflows with main

Content matches bump-ai-review-prompts-pin (#2328) — identical to main
once that merges.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: adopt ai-review-prompts #90 cost gates (pin be549ad) + ready_for_review trigger

Draft PRs skip review until flipped ready (label still opts one in),
mechanical diffs skip pre-run, reasoning effort scales with diff size
(60/high, 1500/xhigh, else max), synchronize runs debounce 120s.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: admit ready_for_review on label-opted PRs in opt-in mode

kriszyp review finding on the pin-bump PR: with *_ALWAYS_ON unset, the
caller gate admitted only labeled events, so a PR opted in by label
while draft never resumed review when flipped ready — the event died at
the caller gate. Admit ready_for_review when the opt-in label is still
present.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: keep ineligible runs out of the review concurrency group

kriszyp review finding: workflow-level cancel-in-progress fires before
job if:, so in opt-in mode an ineligible event (a push, or a ready-flip
without the opt-in label) cancels an in-flight label-triggered review
and then skips — silently losing the requested review. Ineligible runs
now take a unique run_id group and can never cancel an eligible one;
eligible runs keep cancelling each other (the debounce contract).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: only the provider's own label makes a labeled run eligible

Review finding (Codex + kriszyp, independently): the eligibility
predicate admitted every labeled event, so in opt-in mode an unrelated
label applied mid-review joined the eligible concurrency group,
cancelled the running review, and the replacement then failed the
reusable's exact-label gate — no completed review. The same
unrelated-label cancellation existed in always-on mode before this
series (any labeled event shared the group and authorize then skipped).

The labeled branch now requires the provider's own label, in both the
concurrency predicate and the review job gate, and unrelated-label
events are ineligible in both modes.

Event matrix (opt-in / always-on):
- labeled(provider label): eligible / eligible — supersedes in-flight
- labeled(other): ineligible / ineligible (was: cancelled + no review)
- synchronize: ineligible / eligible
- ready_for_review + label: eligible / eligible
- ready_for_review, no label: ineligible / eligible
- opened, reopened: ineligible / eligible

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci: ready_for_review runs review but never cancels

kriszyp follow-up finding: the label-opted ready_for_review event sat
in the shared eligible concurrency group, so on a bot-authored PR it
could cancel the trusted labeler's in-flight review and then be
rejected by author-based authorization — no completed review. The
cancelling set (concurrency predicate) now excludes ready_for_review;
the running set (job gate) keeps it, so trusted-author ready-flips
still review, without the power to cancel. Revisit if the reusable
gains persisted-label authorization.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

* ci(v5.2): sync the always-on ready_for_review cancelling fix (see #2357)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S94XethbGXpAb4DRKMD4kt

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant