Conversation
…nual force-review dispatch Keying the concurrency group by pull request number let a later push's review cancel an earlier push's still-in-flight review outright, with nothing left to finish it. Sha-keying means two pushes' reviews never share a group, so one can no longer cancel the other. The direct form also gains a workflow_dispatch trigger accepting a pr_number, so a fresh review of an already-reviewed commit can be forced by hand -- useful after fixing a bug in the review prompt itself, where the code hasn't changed but the review it would produce now has. Dismissing a stale review doesn't retrigger anything on its own, so without this there was no way to ask for a redo short of pushing an empty commit.
…d sha Same race as the direct form: keying by pull request number let a later push's review cancel an earlier push's still-in-flight review, losing it outright rather than just wasting a run. This form has no equivalent force-review dispatch, since that needs an explicit checkout ref and pr_number passed straight to the composite action, which only the direct form can do without changing review.yml itself.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two robustness fixes to the shipped
claude-review.ymlexamples, both confirmed as real problems in production use of this action:Concurrency keyed by head sha, not PR number. Keying by PR number cancels an in-flight review outright whenever a second push lands on the same PR before the first review finishes -- the earlier commit's review is lost, not just delayed, and nothing re-runs it. Sha-keying means two pushes' reviews never share a concurrency group, so a newer commit can't cancel an older one's still-running review; at worst that's one redundant run, not a lost review. Applied to both the reusable-workflow and direct-form examples.
A
workflow_dispatchescape hatch on the direct form, accepting apr_number, to force a fresh review of a commitclaude[bot]already reviewed. There was previously no way to ask for a redo short of pushing an empty commit -- dismissing a stale/wrong review doesn't retrigger anything on its own. The gate step resolveshead_sha/base_ref/draft state via the API for this trigger (workflow_dispatch carries nopull_requestpayload), deliberately skips the "already reviewed this sha" check for this path only, and keeps the draft check exactly as strict as the ordinarypull_requestpath.The reusable-workflow example only gets fix 1 -- fix 2 needs an explicit checkout ref and
pr_numberpassed straight to the composite action, which only the direct form (callingExaDev/claude-code-action@v1directly) can do without changingreview.yml's own inputs. Left a comment there pointing at the direct form.Test plan
actionlintclean on both changed workflow filesprettier --checkcleanworkflow_dispatchflow end-to-end against a real PR (resolvingpr_number→ checking out the right sha → posting a review that bypasses the dedup)