Repository navigation
π Never adopt a person's PR: owner/human-authored PRs return to their author instead of the contributor-offline lane - #15240
Conversation
|
[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 |
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
@clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
β¦ their author An owner's PR with a requires_human verdict on a conflicting head was staged 085, and "Let hive decide" adopted it through the contributor-lane "contributor offline" rule, which only makes sense for clanker PRs. - The contributor-offline rule and every adopt-supersede verdict are gated on the author not being a person (author/human label or a dashboard.authorized_users owner); the engine's adoption/supersede label path, the delegate executor and the 090 ready-for-human-merge decider refuse a person's PR with a logged, tracker-visible reason. - requires_human / changes-requested on a human-authored PR routes to 071 Needs author with the reviewer's question (or "needs rebase"), and the author is told once per head whatever their role. - Let hive decide on a person's PR can only approve-admit, return to author (new return-to-author rule) or hold. - Folded from #15191: a DCO-less clanker head at 090 adopts. Closes #15202 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
β¦ind (import ratchet) Signed-off-by: Andrew Anderson <andy@clubanderson.com>
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether this PR or #15219 is the fix for #15202 that lands; they make the same change and conflict in 13 files, so only one can merge.
This PR and #15219 both fix #15202 with the same semantic change, and they conflict. A maintainer has to pick one; I have not closed anything.
What I verified by reading both diffs in full:
- Both add
StageLabelPolicy.OwnerAuthor func(login string) bool(src/pkg/github/automerge/automerge_stage_labels.go). - Both refuse adoption of an
author/humanor owner-authored PR insideadoptContributorPRand record a newAdoptBlocked*reason so theadoption/supersederequest is consumed rather than re-asked every sweep (hereAdoptBlockedAuthorPerson,automerge_contributor_adopt.go:617; in #15219AdoptBlockedHumanAuthor/AdoptBlockedOwnerAuthor,store.go). - Both route a
requires_humanverdict on a human-authored PR to 071 withreviewer question: β¦/reviewer summary: β¦reasons instagelabels.RouteHuman, and both teachnudgeDiagnosis/nudgeDiagnosisRoutedthose prefixes. - Both widen the
noteTrustedHuman071condition so a non-trusted human author is still told. git merge-tree --write-tree pr15219 pr15240conflicts in 13 files, includingautomerge_stage_labels.go,delegatedecision/policy.go,stage_tracker_adoption.go,merge_eligibility.goand both stage goldens.
The one substantive difference I found: #15219 puts its guard inside supersedeAdoptedPR itself, so it also covers the re-home paths that run on records adopted before the fix β settleAdoption (automerge_contributor_adopt.go:1193, DCO re-home), escapeStalledAdoption (:1855) and recoverOrphanedAdoption (automerge_adoption_orphan.go:205). This PR guards only the entry point. For a PR such as #15157 that was already adopted when this lands, that is the difference between the existing adoption continuing to be superseded or not. This PR's upside is the broader surface (glossary, tracker hover, LaneReasonReviewerQuestion, merge-eligibility) and the clear requires_human β author routing rule in HumanAuthorOwesAnswer.
Open question for whichever survives: should the person-author guard also sit in supersedeAdoptedPR so pre-existing adoptions are released?
Also: this head conflicts with v5 in delegatedecision/policy.go and automerge_contributor_adopt.go (needs-rebase label is accurate).
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
7173352 to
2ee56f3
Compare
There was a problem hiding this comment.
Read the engine and routing half of this change against v5 at the merge-base, then the body. What I read matches what the body claims, and I found no defect in it.
Verified:
- Adoption refusal is in front of every bypass.
adoptContributorPRcheckspersonAuthored(obs, policy)(src/pkg/github/automerge/automerge_contributor_adopt.go:644-652) before theforcedbranch and beforeadoptionRefusedByAdmission, so an operator-forced adoption of a person's PR is refused too β the code comment says that is deliberate.personAuthored(:1401-1406) answers true forauthorkind.Humanorpolicy.OwnerAuthor(login), andOwnerAuthoris nil-safe. - The request label is consumed, not retried.
delegatedAdoptionAttempted(:769-773) treatsAdoptBlockedBy == AdoptBlockedAuthorPersonas terminal; its caller atautomerge_stage_labels.go:1203then removesadoption/supersede. Note this is not head-gated (unlikeAdoptionRequestConsumed(obs.HeadSHA)beside it) β fine here, since person-authorship does not change between heads. HumanAuthorOwesAnswercan actually fire.humanEvidencepopulatesEvidence.AuthorKindandSelfAuthored(automerge_stage_human.go:111-112), andRouteHuman(src/pkg/stagelabels/human.go:281-296) places the new branch after thefixlist and before the fresh-head wait, so changes-requested / red CI / conflict still win and route to 071 with their own reasons. Hold, sentinel, fork-guard, trusted approval and a lane-ruleCauseReasonall return false and keep 085.- Conflict on a human PR still counts when the decision verdict took the stage reason.
humanConflict(automerge_stage_human.go:92-95) readsobs.LaneReason, whichautomerge_stage_labels.go:867seeds fromobs.Reasonbefore the route overrides it β matching the #14607 carve-out described in the body. go buildofpkg/github/automerge,pkg/stagelabels,pkg/delegatedecision,pkg/dashboard,cmd/hiveat2ee56f3passes. The only non-green checks are threeCANCELLED"Sign-off survives the squash" runs (superseded re-runs), which is what makes the merge stateUNSTABLE.
Not read: pkg/delegatedecision/policy.go (Rails.PersonAuthored / RefusalAdoptPersonAuthored), api_repo_item_decide_delegated.go, and delegated_decision_human_merge.go. I make no claim about those paths.
Looks correct to me on the parts I read. Not approving (human signature).
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 095-pre-merge-soak β 060-reviewed: required-check-pending:Sign-off survives the squash |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #15202
What happened
#15157 β pushed by @clubanderson, an owner of this hive (
dashboard.authorized_users, labelauthor/human) β got a reviewer verdict ofrequires_humanon a CONFLICTING head. The engine staged it085-needs-decision(contributor-lane:decision-requested); the owner clicked Let hive decide; the delegate appliedadoption/supersede; the engine's label-adoption path ranadoptContributorPRregardless of author kind,adoptionDueanswered "contributor offline (registered=false online=false)", and the owner's own PR was adopted into #15192 /074-adopted-by-hivewith a toast about "the author's hive".Fixes
author/humanPR are never subject to the contributor-offline rule.delegatedecisiongates the stalled-adoption path on!in.PersonAuthored()(newHumanAuthor/OwnerAuthorinputs, filled by the dashboard from the author-kind label anddashboard.authorized_users) andRails.PersonAuthoredrefuses anyadopt-supersedeverdict (RefusalAdoptPersonAuthored), including LLM verdicts. The engine'sadoption/supersedelabel path (adoptContributorPR) now refuses a person's PR βpersonAuthored(obs, policy)viaauthorkindplus the newStageLabelPolicy.OwnerAuthorhook wired fromcmd/hiveβ recordsAdoptBlockedAuthorPersonon the tracker row, logs the reason, and consumes the request label so it is not retried. The dashboard executor refusesActionAdoptSupersedefor person-authored input too.requires_human/ changes-requested on a human-authored PR routes to 071 Needs author, never 085.stagelabels.RouteHuman: the fix list (changes requested, red CI, DCO, conflict) comes first β 071; thenHumanAuthorOwesAnswerβ 071 withreviewer-verdict:requires_humanand the reviewer's question/summary as route reasons. Hive-authored, clanker, self-authored, held, sentinel and lane-rule cases keep 085. The 071 note (TrustedHuman071Comment) now tells the author "the reviewer asked you: β¦" and, when conflicting, "the branch conflicts with the base and needs a rebase" β and is posted for any human author on this route, not just trusted ones, since the 085 entry comment they used to get is gone. ForAuthorKind=Humanthe lane's originalconflictingreason counts as conflict even when the decision-requested verdict took the stage reason (hive/clanker behaviour from π stage labels: requires_human + decision_requested masked byconflictingβ PR shown as 070-fixing with no fixer kickΒ #14607 unchanged).RuleReturnToAuthor/VerdictDirectiondecision (glossary + index.html entryreturn-to-author) tells @author what to fix (rebase / DCO / CI) and/or the reviewer's question. π fix(dashboard): let hive decide approves a green, reviewed 090 PR instead of refusingΒ #15181's 090delegatedHumanMergeDecision(delegated_decision_human_merge.go) now returns a person's conflicting/red/unsigned PR to its author instead of adopting; a clean head still approve-admits (π Activity Monitor: an owner's Approve admits the untrusted-author PR head β no adoption, merge as-is; DCO warned before actingΒ #15156 path). Stage tracker rows show "@author pushed this PR themselves β not adopted: the hive asks them, not adopts" with no Adopt offer; the β hover reads "hive decided: return to author Β· why".Composes with #15181, #15127 and #15156 (all merged); #15192 is untouched.
#15191 vs #15181
#15191 (
fix/delegate-human-merge-approves) duplicates merged #15181 in substance (approve-admit on good review + green CI; adopt on red CI / conflicting / review not passed; β hover path). The only functional extra was a DCO-missing β adopt branch at 090 for clanker PRs; it is folded in here ashuman-merge-adopt-dco("adopt Β· DCO sign-off missing"), which for a person's PR becomes return-to-author ("add the DCO sign-off"). Itspkg/delegatedecision/human_merge.go, extra glossary/docs and JS test are superseded by #15181's and this PR's implementation. #15191 can be closed.Tests
delegatedecision:person_author_test.go(contributor-offline gating, rails refusal, return-to-author text), glossary.stagelabels:TestRouteHumanAuthorOwesAnswertable (human/owner/hive/clanker/self/hold/sentinel/lane-rule Γ question/summary/conflict).stageenginegoldens: two π Owner/human-authored PR was adopt-superseded by hive after Let hive decide (contributor-offline rule)Β #15202 regressions (conflicting β 071 conflicting; green β 071 with the question).automerge:TestDelegatedSupersedeRefusesPersonAuthoredPR,TestRequiresHumanOnPersonPRRoutesToAuthor(contributor + owner get the 071 note once per head; hive-authored keeps 085). Existing 085 entry-comment tests now use clanker PRs (attribution trailer) since a person's requires_human no longer lands there.dashboard:TestStageTrackerAdoptionPersonAuthoredSaysNotAdopted,TestDelegatedHumanMergeDecisionPersonAuthoredNeverAdopts(owner/human Γ conflicting/red/DCO β return-to-author; clean β approve; clanker DCO β adopt).go build ./...,go vet, full suites for the touched packages, webstatic style ratchet andcheck-api-reference-citations.shpass.