Repository navigation
π fix(dashboard): let hive decide approves a green, reviewed 090 PR instead of refusing - #15181
Conversation
β¦nstead of refusing Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.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 |
|
hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Read the new decision path against the v5 tree (executors, adoption engine, stage store); it does what the matrix says, with one low-severity ordering nit.
Verified
delegatedHumanMergeDecision(delegated_decision_human_merge.go:160-208) only fires for a 090 PR whose reason isHumanMergeReasonUntrustedAuthor, and returnsok=falsefor hive-authored, sentinel, own-PR, no-merger-role and adoption-off, so those cases still reach the #15078 no-effect answer (api_repo_item_decide_delegated.go:488-491).- The approve branch emits
ActionApproveReview; the existing executor (api_repo_item_decide_delegated.go:712-731on v5) callsQueuePRAutoMergeWithNotewhenmergerRoleβ the same call as Approve β let hive merge β so the "same path" claim in the body holds. admitDelegatedHumanMergeHeadusesadmitPullRequestHead(api_repo_item_decision.go:178on v5), the #15156 trust override.adoptionRefusedByAdmission(automerge_operator_admission.go:62-70) only refuses unrequested adoption, so an admitted head cannot be taken over by the sweep but an explicit adopt still goes through.- All
delegatedecision.Inputfields used (CIGreen,Conflicting,SentinelAlert,HiveAuthored,Author,Labels) exist on v5 (policy.go:150-168). CItest (dashboard β¦)is green atd82e560.
Low: head admitted before the orphan/prior checks can change the decision β api_repo_item_decide_delegated.go:492-494 writes admitted_by: operator-approval:<user> on the stage record before delegatedOrphanedAdoption (:497-501) may replace the approve with a re-adopt, and before delegatedPriorDecisionState (:502) may return "already applied; nothing written". In the orphan case the adoption proceeds (requested), but the record keeps the admission, so the tracker hover (stage_tracker.go:1830) reads "Approved by @user β¦ does not adopt or re-author it" while the hive is adopting it; in the already-applied case a write happens on a path whose note says nothing was written. Both are narrow (an orphaned adoption that has since gone green / a repeat click) and cosmetic. Moving the admission to just before executeDelegatedDecision when d.Rule == delegatedHumanMergeApproveRule would close it; not a blocker.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #15173
Why. Let hive decide on an untrusted author's PR at
stage/090-ready-for-human-mergetook the no-effect path from #15078 and answered only "I can't merge this: author @β¦ is untrusted". The hive never decided, even when the PR had nothing wrong with it (for example #15118 and hivecommons/hotshot#317: mergeable, 0 failing checks). When someone delegates the decision, a good PR should get the same approve-and-admit as Approve β let hive merge (#15136 / #15156), and the merge sweep then merges it under its own number. Adoption is only the fallback.Decision matrix. Applies to 090 PRs whose reason is the untrusted-author family:
review.verdict_labelslabel), CI green, mergeable, delegator has merger roleadmitted_by: operator-approval:<user>), thenQueuePRAutoMergeWithNote(the same calls as Approve β let hive merge), no adoptionhive decided: approve Β· review passed, CI greenhive decided: adopt Β· CI redhive decided: adopt Β· conflicting, needs rebasehive decided: adopt Β· review not passedThese cases keep the existing #15078 no-effect answer: a sentinel alert, the delegator's own PR, a hive-authored PR, a good head with no merger role, adoption turned off, or any other 090 reason.
The decision goes through the normal delegated flow (
/hive decisioncomment with a rule tag, prior-decision dedupe, existing executors, audit). The operator-action ledger detail that the tracker's β hover reads now names the path and its reason.Changes
delegated_decision_human_merge.go:delegatedHumanMergeDecision, the review-passed check, the head admission and the path/reason strings.api_repo_item_decide_delegated.go: runs this decision before the no-effect answer.operator_actions.go: β detail for these rules (sync and async).operator-reference.md. Changelog:changelog.d/fixed-15173.md.I didn't run tests, builds or linters locally, per AGENTS.md. CI decides.
β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson