Skip to content

πŸ› fix: keep in-place adoption when a maintainer pushes the new head - #16846

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
fix/maintainer-push-takeover
Nov 5, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
fix/maintainer-push-takeover

Conversation

@hanthor

@hanthor hanthor commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

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 -l clean. Tests were not run locally, per AGENTS.md; CI is the verdict.

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 5, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16845 πŸ› fix: park fork-guard-only heads instead of nudging and adopting them same files src/docs/labels-and-control-signals/stage-labels.md
src/pkg/github/automerge/automerge_contributor_adopt.go

@hivecommons-hive
hivecommons-hive Bot merged commit fcc0c5c into v5 Nov 5, 2026
77 of 78 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/maintainer-push-takeover branch November 5, 2026 23:50
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#168463fbef2c` sha256:635d282ed44768cb4f801df98421f1c508675085156cf7f59ebe35a6b70186d3 β€” download from the dashboard or `hivectl review evidence #16846`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @hanthor holds role owner and GitHub permission maintain on repo; CI green at 3fbef2c.

@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant