Repository navigation
π automerge: an outdated change request waits on its reviewer, not the author - #18810
Conversation
β¦e author The contributor lane and the trusted-author lane checked for a standing CHANGES_REQUESTED review with hasOutstandingChangesRequested, which ignored which commit the review was on. A PR whose author had already pushed the fix stayed at 071/072, its clanker author was nudged, and once the adoption grace ran out the Activity monitor asked "@author has been offline ... take the PR over now?" (projectbluefin/chairlift#799, about 2h 45m after the author pushed). The wait was on the reviewer: GitHub keeps a change request blocking until it is re-reviewed or dismissed. hasOutstandingChangesRequested now sorts the standing change requests by whether they bind to the head. One on the head, with no commit, or carried to the head by a merge of the base (the walk an approval uses) keeps today's changes-requested reason. When every standing request is on an older commit with content pushed since, the lanes return re-review-requested:<reviewers>, which routes as a decision cause: red CI, a swarm changes_requested or a conflict on the new head is still the author's, otherwise 085. The 085 note names each review, its commit and the author's push (reusing the hivecommons#633 re-review clause), and the monitor asks the reviewer to re-review or dismiss, with wait kind re-review-requested and who the reviewer. No nudge and no adoption clock at 085. The native queue withdraws such a PR. Refs hivecommons#13041 Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Evidence bundle `#18810d24fc21` sha256:7473934d63c6808d0337fab831abc766ddd7110aefdf9b5dd2799a644a1dcc83 β download from the dashboard or `hivectl review evidence #18810`.merged by Hive trusted-author auto-merge: author |
Summary
When a maintainer's "changes requested" review is on an older commit and the author has already pushed the fix, the hive kept treating the PR as the author's turn:
stage/072-returned-to-contributor(071 for a person's PR);The wait was really on the reviewer. GitHub keeps a change request blocking until the reviewer re-reviews or a maintainer dismisses it.
With this change the PR goes to
stage/085-needs-decision. The 085 note and the monitor name the reviewer and say the author has pushed since. The author is not nudged and no adoption clock runs. A change request on the current head behaves exactly as before.Refs #13041 (the head-scoped rule this extends).
What happened
Seen on projectbluefin/chairlift#799 (all times Eastern, 11-17):
298e8a5849.948192f343with the requested changes. All checks went green.contributor-lane:changes-requested, wait kindreturned-to-contributor-offline, who: the author. It asked "@castrojo has been offline for 2h β¦ take the PR over now?"So for about 2h 45m the PR looked like the author's turn.
Cause
The contributor lane checks for a human change request twice, and the two checks disagree:
latestTrustedHumanChangesRequested(β¨ stage 085: route a maintainer decision / changes_requested on a hive-authored PR back to the author agentΒ #13041) counts only a review on the head.hasOutstandingChangesRequestedcounts any standing CHANGES_REQUESTED, whatever commit it is on, and returnscontributor-lane:changes-requested.The trusted-author lane uses the same helper, so it has the same bug.
What changed
Lanes (
automerge_sweep_trusted.go,automerge_contributor_lane.go)hasOutstandingChangesRequestednow takes the head and sorts the standing change requests.reviewReachesHead), so a base merge doesn't count as the author pushing past it;re-review-requested:<reviewers>instead.Stage (
derive_pr_classify.go)changes_requestedor a conflict on the new head still goes to the author (070/071/072);085 note (
automerge_stage_human.go)changeRequestClause. The merge-refused text is unchanged.Monitor (
stage_tracker_decision_pr.go,stage_tracker_waiting.go,stage_tracker_caption.go)<sha>since. Re-review it, or dismiss the review?"re-review-requested, and who is the reviewer.Native merge queue (
automerge_native_queue.go)Docs and changelog
docs/labels-and-control-signals/stage-labels.md.Not done:
dismiss_stale_reviews_on_pushsetting is left alone.Tests
New:
automerge_rereview_requested_test.go, throughtrySweepContributorLanePR. Cases:re-review-requested:<login>and no merge;changes-requested;derive_pr_rereview_test.go: the reason classifies as 085 (human) on both lanes, aneeds-rebaselabel still goes to 072, and a request on the head stays at 072.stage_tracker_rereview_test.go: the chairlift#799 row, with adoption due and the takeover grace elapsed. It now asks the reviewer, never says "offline", offers no adopt option, disables Approve, and the wait kind and who name the reviewer.prstage/rereview_test.go: the reason's format/parse round trip.Updated: the existing
hasOutstandingChangesRequestedcall sites inautomerge_sweep_test.goandautomerge_sweep_trusted_author_test.gofor the new signature. Their reviews carry no commit, so their expectations are unchanged.Only
gofmt -lwas run locally (AGENTS.md bans localgo test/go build/go vet); this PR's CI is the test run.static/index.htmlwas regenerated fromstatic-src/, and the diff is only the new wait-kind label.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1