Repository navigation
π adoption: operator Adopt now takes over any PR, owners included - #16483
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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
An operator's Adopt now on a PR whose author is one of this hive's owners recorded a forced adoption the stage engine refused on every sweep as person-authored (#15202) without ever consuming it, so the row sat at "adoptingβ¦ (queued)" with the action spent. The hive still never adopts a person's own PR on its own initiative, and an adoption/supersede request is still refused for one; an explicit forced Adopt now now bypasses that refusal and proceeds. The attempt record (MarkAdopted) consumes the forced mark as for any other author, so the row reads queued β adopting β adopted. The dashboard audit entry names the author and whether they are a hive owner. Fixes #16482 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
6898db6 to
25ec3e3
Compare
There was a problem hiding this comment.
Correctness review (head 6898db6) β no blockers; the fix matches #16482's expected behaviour.
Verified: handleRepoItemAdoptNow refuses before NoteAdoptionForced (api_repo_item_decision_reroute.go:96-101), the engine clears the forced record on the person-authored refusal (automerge_contributor_adopt.go:653-658), and the dashboard's isAuthorizedUserLogin (delegated_pr_context.go:209-221) matches the engine's OwnerAuthor = dashboardOwnerLogin (src/cmd/hive/merge_eligibility.go:146-158) β both match any authorized_users entry, so the two guards cannot disagree.
Advisory (non-blocking): issue root cause 3 says the tracker "offers adopt_now: true on owner-authored rows". The new ownerAuthored case (stage_tracker_takeover.go:120) keys off it.Adoption.BlockedBy, which stageTrackerAdoption only sets after the engine has recorded a refusal at the current head (stage_tracker_adoption.go:118). So an owner's row that has not yet been swept (or just got a new push) still offers Adopt now; the press now returns 409 with the owner reason, so nothing sticks β just a button that cannot succeed.
Out of scope / pre-existing: on the live #16469 the adopt-supersede label the handler added stays on the PR, so after the forced record is consumed requested remains true and the refusal log line keeps firing each sweep (automerge_contributor_adopt.go:609,659), now with forced=false. Same as any requested refusal today.
β hive: agent=adjudicator backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. Review findings from Read
Nothing to change from my side. Review findings from Read
One observation, not a defect: CI was still running at the time of this read. @clubanderson this PR is held at Failing checks:
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. Evidence bundle `#1648325ec3e3` sha256:dfd762e5ae6a3c93ec9a802f478007e439c8ac3816196081db89202c7d54eea6 β download from the dashboard or `hivectl review evidence #16483`. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 25ec3e3. |
Fixes #16482
An operator's Adopt now on a PR whose author is one of this hive's owners (
dashboard.authorized_users: β¦:owner) recorded a forced adoption thatadoptContributorPRrefused on every sweep as person-authored (#15202) without ever consuming it. The row sat atadoptingβ¦ (queued)with the action spent and no way out.Live evidence on #16469 (every ~60s):
Decision
Operator ruling: a person may take over anyone's PR β owner, maintainer, contributor, bot. The #15202 rule stays for the hive's own initiative (automatic adoption) and for an
adoption/supersederequest; only an explicit, forced Adopt now by an authorized dashboard user bypasses it.Changes
adoptContributorPR: the person-authored refusal applies only when!forced. A forced adoption over a person-authored PR logsoperator-forced adoption over a person-authored PRwithby=<actor>,author,author_kind, then proceeds through the normal forced path (maintainer policy, admission and presence already bypassed).MarkAdoptedat the attempt consumes the forced mark as for any other author, so the row reads queued β adopting β adopted (orcopy-failed/ workflow-path refusal with its note) β never a permanent "queued".handleRepoItemAdoptNow: the audit entry namesauthor=<login>andauthor_owner=<bool>so an owner takeover stays attributable.takeover.forced_byβadopted_by/adopted_by_state; the adopted copy's lineage keeps the original author (Lineage.FromAuthor,adopted_from.author).TestAdoptNowTakesOverOwnerAuthoredPR(request label refused, forced adoption schedules the copy and consumes the mark),TestRepoItemAdoptNowOnOwnerAuthoredPR(200 + audit attribution).TestDelegatedSupersedeRefusesPersonAuthoredPRstill passes (non-forced rule intact).After deploy, the next stage-labels sweep adopts #16469 (forced mark is still pending on its record) and the fixer lane picks up the hive's copy.