Repository navigation
π fix: keep in-place adoption when a maintainer pushes the new head - #16846
Conversation
settleInPlaceAdoption yielded on any new head without App push evidence, so a maintainer rebasing or fixing an offline contributor's adopted PR handed it back to the absent author, who was then nudged, re-adopted and stalled again (projectbluefin/utah#919, Danathar's 2026-10-27 push; projectbluefin/utah-packages#804, #812, #822, hanthor's 2026-10-31 pushes). Before yielding, classify the GitHub-linked pusher (committer, or the author when the committer is web-flow or unlinked): the PR author, an unlinked identity, or a read-only third party still yields; an App bot or a person with write/maintain/admin (authorRepoPermission) is a takeover and the adoption follows the new head with no yield note and no nudge. An unreadable permission keeps the adoption for the sweep. Signed-off-by: James Reilly <jreilly1821@gmail.com>
|
[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
|
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
There was a problem hiding this comment.
Read settleInPlaceAdoption and the new helpers at the head. The takeover check (src/pkg/github/automerge/automerge_contributor_adopt.go:1835) runs after the existing "no repo evidence yet" guard, so first-deploy behaviour is unchanged. commitPusher (:1886) takes the linked committer and falls back to the author when the committer is web-flow or unlinked β an author's own web edit therefore still compares equal to obs.Author and yields as before. Allowed from authorRepoPermission is admin/maintain/write (automerge_sweep_trusted.go:796), matching the body. A permission read failure returns deferred and skips MarkYielded, so the adoption is re-read next sweep rather than dropped. Builds. Looks correct to me.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
settleInPlaceAdoption yielded on any new head without App push
evidence, so a maintainer rebasing or fixing an offline contributor's
adopted PR handed it back to the absent author, who was then nudged,
re-adopted and stalled again (projectbluefin/utah#919, Danathar's
2026-10-27 push; projectbluefin/utah-packages#804, #812, #822,
hanthor's 2026-10-31 pushes).
Before yielding, classify the GitHub-linked pusher (committer, or the
author when the committer is web-flow or unlinked): the PR author, an
unlinked identity, or a read-only third party still yields; an App bot
or a person with write/maintain/admin (authorRepoPermission) is a
takeover and the adoption follows the new head with no yield note and
no nudge. An unreadable permission keeps the adoption for the sweep.
Found by auditing why hive stalls on projectbluefin/utah and projectbluefin/utah-packages. One concern per PR; sibling PRs from the same audit cover the other root causes.
Verification:
gofmt -lclean. Tests were not run locally, per AGENTS.md; CI is the verdict.