Skip to content

πŸ› fix(dashboard): let hive decide approves a green, reviewed 090 PR instead of refusing - #15181

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
scanner/fix-15173
Oct 29, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
scanner/fix-15173

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closes #15173

Why. Let hive decide on an untrusted author's PR at stage/090-ready-for-human-merge took 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:

PR head Decision βœ“ hover detail
review passed (no reviewing / changes-requested / requires-human review.verdict_labels label), CI green, mergeable, delegator has merger role approve: admits the head (admitted_by: operator-approval:<user>), then QueuePRAutoMergeWithNote (the same calls as Approve β€” let hive merge), no adoption hive decided: approve Β· review passed, CI green
CI red adopt in supersede mode hive decided: adopt Β· CI red
conflicting adopt in supersede mode (rebase) hive decided: adopt Β· conflicting, needs rebase
review not passed adopt in supersede mode hive decided: adopt Β· review not passed

These 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 decision comment 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).
  • Tests: a new per-branch test (approve-admit with no adoption; red CI, conflicting and review-not-passed each adopt). The existing Activity Monitor: 'Ready for human merge' row offers no way to merge; needs-human states without a matching actionΒ #15078 test now uses a conflicting head with adoption off, so it still covers the no-effect answer.
  • Docs: 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

…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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 29, 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 clubanderson 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 Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@github-actions

github-actions Bot commented Oct 29, 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
#15157 ✨ Conflict-aware merge train in the automerge lanes same files src/docs/operator-reference.md
#15085 ✨ Activity Monitor: Adopt now and Reroute to another clanker for PRs waiting on a contributor's clanker same files src/docs/operator-reference.md
src/pkg/dashboard/api_repo_item_decide_delegated.go
src/pkg/dashboard/operator_actions.go
#15122 πŸ› Write-back containment: per-kind gate for every unsolicited GitHub write, with backfill guard same files src/docs/operator-reference.md
#15186 πŸ› Activity Monitor: one coherent post-decision state for Let hive decide rows; 060 reviewed in CI / Review same files src/docs/operator-reference.md
src/pkg/dashboard/api_repo_item_decide_delegated.go
src/pkg/dashboard/api_repo_item_decide_delegated_test.go
src/pkg/dashboard/operator_actions.go
#15191 πŸ› Let hive decide on a ready-for-human-merge PR approves and lets the sweep merge it same files src/docs/operator-reference.md
src/pkg/dashboard/api_repo_item_decide_delegated.go
src/pkg/dashboard/api_repo_item_decide_delegated_test.go
src/pkg/dashboard/delegated_decision_human_merge.go
src/pkg/dashboard/operator_actions.go
#15134 πŸ› Delegated decision on a capability gap: model the blocker, stop the un-park/re-park loop, name the missing App permission same files src/docs/operator-reference.md
src/pkg/dashboard/api_repo_item_decide_delegated.go
#15104 πŸ› Activity Monitor: Rebase, then merge as maintainer; fixer owns parked conflicting PRs; dismiss self-inflicted changes_requested same files src/docs/operator-reference.md

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 29, 2026
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026
@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 29, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 is HumanMergeReasonUntrustedAuthor, and returns ok=false for 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-731 on v5) calls QueuePRAutoMergeWithNote when mergerRole β€” the same call as Approve β€” let hive merge β€” so the "same path" claim in the body holds.
  • admitDelegatedHumanMergeHead uses admitPullRequestHead (api_repo_item_decision.go:178 on 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.Input fields used (CIGreen, Conflicting, SentinelAlert, HiveAuthored, Author, Labels) exist on v5 (policy.go:150-168). CI test (dashboard …) is green at d82e560.

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

@hivecommons-hive
hivecommons-hive Bot merged commit da049ce into v5 Oct 29, 2026
80 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the scanner/fix-15173 branch October 29, 2026 00:27
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#15181d82e560` sha256:4115cda0d7a7d5d3c08a1a9bc20c0b2169078e66370022db4293fda4db9d06eb β€” download from the dashboard or `hivectl review evidence #15181`.

@github-actions

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 removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off 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.

Let hive decide on a ready-for-human-merge PR should approve and let the sweep merge it, not answer "I can't merge this" or adopt

0 participants