Problem
The PR review-state workflow can remove awaiting-author before the author completes the required re-review step.
The workflow only considers human maintainer reviews attached to the current head SHA. After an author pushes fixes or merges the base branch, an older CHANGES_REQUESTED review no longer affects label selection. If CI passes and CodeRabbit approves the new head, the workflow can incorrectly select awaiting-maintainer even though the author did not re-request review from the blocking maintainer.
This behavior conflicts with the contributor instruction to re-request review from the reviewer after changes are ready.
Example
PR #1119 shows this failure mode.
- A human maintainer submitted
CHANGES_REQUESTED.
- Later commits changed the head SHA.
- The workflow ignored the older human review because it was not attached to the current head SHA.
- CI and CodeRabbit could then move the PR to
awaiting-maintainer without an explicit re-request.
Relevant evidence:
Expected behavior
Keep awaiting-author after a human maintainer requests changes until one of these events occurs for that same maintainer:
- The PR author explicitly re-requests review.
- The maintainer submits a newer review.
- GitHub dismisses the blocking review.
Do not clear the blocker because another maintainer approves. Keep awaiting-author while any human maintainer blocker remains.
Use this label precedence:
has-conflicts
- CI pending or failed
awaiting-author
awaiting-coderabbit
awaiting-ready
awaiting-maintainer
- No state label after final approval
Proposed design
- Create one durable blocker for each human maintainer who submits
CHANGES_REQUESTED.
- Preserve each blocker across author pushes, base updates, CI runs, and CodeRabbit reviews.
- Reconstruct blocker state from paginated issue timeline events and review history.
- Require the review-request event actor to match the PR author.
- Require the requested reviewer to match the blocking maintainer.
- Do not let team review requests clear an individual blocker.
- Add
review_request_removed as a reconciliation trigger.
- Do not treat review-request removal alone as evidence that clears a blocker.
- Keep current-head freshness rules for approvals and CodeRabbit reviews.
- Preserve
awaiting-author when reconstruction is incomplete.
Acceptance criteria
Risks
GitHub does not expose a durable field that directly records an author re-request after a specific review. The workflow must correlate timeline events and review history carefully.
Missing pages, delayed events, duplicate delivery, or reordered events can create false transitions. The workflow must use idempotent reconstruction and fail closed when evidence is incomplete.
Problem
The PR review-state workflow can remove
awaiting-authorbefore the author completes the required re-review step.The workflow only considers human maintainer reviews attached to the current head SHA. After an author pushes fixes or merges the base branch, an older
CHANGES_REQUESTEDreview no longer affects label selection. If CI passes and CodeRabbit approves the new head, the workflow can incorrectly selectawaiting-maintainereven though the author did not re-request review from the blocking maintainer.This behavior conflicts with the contributor instruction to re-request review from the reviewer after changes are ready.
Example
PR #1119 shows this failure mode.
CHANGES_REQUESTED.awaiting-maintainerwithout an explicit re-request.Relevant evidence:
.github/workflows/label-pr-review-state.yml.CONTRIBUTING.md.Expected behavior
Keep
awaiting-authorafter a human maintainer requests changes until one of these events occurs for that same maintainer:Do not clear the blocker because another maintainer approves. Keep
awaiting-authorwhile any human maintainer blocker remains.Use this label precedence:
has-conflictsawaiting-authorawaiting-coderabbitawaiting-readyawaiting-maintainerProposed design
CHANGES_REQUESTED.review_request_removedas a reconciliation trigger.awaiting-authorwhen reconstruction is incomplete.Acceptance criteria
awaiting-authorremains until all blockers clear.review_request_removedtriggers reconciliation but does not clear a blocker by itself.awaiting-author.Risks
GitHub does not expose a durable field that directly records an author re-request after a specific review. The workflow must correlate timeline events and review history carefully.
Missing pages, delayed events, duplicate delivery, or reordered events can create false transitions. The workflow must use idempotent reconstruction and fail closed when evidence is incomplete.