Repository navigation
π fix(automerge): gate contributor-lane unattended merge on vetted identity - #12051
Conversation
β¦tity Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <scanner@hive.kubestellar.io>
|
[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
|
Signed-off-by: scanner <scanner@hive.kubestellar.io> # Conflicts: # src/pkg/config/automerge_trusted_bot_test.go
|
hive/awaiting-ci: merged origin/v5 to resolve the conflict in automerge_trusted_bot_test.go (kept both new tests). CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner 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 |
|
hive/awaiting-ci: π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
β¦e auto-merge tier (#12167) The contributor lane (#12051) only merged a non-App PR when it closed an issue whose App-authored hive:claim marker named the author with a require_tiers tier and verified=true. The operator's own registry tier had no effect: mrbobbytables is trusted in hive's registry, yet #12045 ("Part of #12002", a reference not a closing keyword) skipped with contributor-lane:no-linked-issue and #11756 (claimed outside the relay) with contributor-lane:no-claim. Add a registry admission path: when the PR author's contributor-registry profile carries a tier in require_tiers, the tier requirement is satisfied without a linked issue or marker (auto_merge.contributor_lane. registry_tiers_sufficient, default true). The sweep logs contributor-lane:registry-trusted and the merge comment names the path. Every other gate (author_association, diff fences, CI, reviewer verdict, soak, labels, human-merge paths) is unchanged, and a non-trusted or absent registry entry falls through to the marker path with its reasons intact. The lookup is injected as automerge.Options.ContributorRegistryTier (dashboard.ContributorTrustTierByLogin in cmd/hive) so tests fake it. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Implements the maintainer-approved direction on #12041 (option A, hardened; default stays on). The
hive:claim kind=contributormarker on its own proves only a lease, so the contributor-lane tier now also requires an operator-vetted, verified identity before it merges unattended.What changed
claims.ClaimMarkerstampstier=<profile tier>andverified=<true|false>on contributor claims.issueclaim.ParseMarkerreads them, and a contributor marker without them parses asnewcomer/unverified, so existing markers are refused.github_verified_at) only when the contributor proves the login through the authenticatedPOST /api/contribute/reissue-tokenflow. Self-asserted registration never sets it.claimIssueForContributorpasses the tier and verified state into the ledger claim, and renewals keep them.verifyContributorClaimaccepts onlytier β auto_merge.contributor_lane.require_tiers(new key, default[trusted, merger], which accepts only operator-granted tierstrusted|merger|advisor;newcomer/contributorfail validation) andverified=true. New skip reasons:contributor-lane:claim-tier-untrustedandcontributor-lane:claim-unverified.author_associationis not OWNER/MEMBER/COLLABORATOR/CONTRIBUTOR (contributor-lane:author-association; covers NONE, first-time and missing)..github/workflows/**or.github/actions/**(contributor-lane:workflow-path).contributor-lane:tests-removed).human_merge_pathsstays enforced by the existing gate.contributor-lane:no-reviewer) instead of passing.require_tiersinput plus a one-line warning under the toggle describing what it grants. The GET/PUT/api/config/auto-mergeAPI validates the tiers.hive-merge.md(gates plus the operator workflow: verify login β granttrustedβ their relay PRs merge unattended; nobody else's do) andoperator-reference.mdrows. Includes a changelog fragment.Tests: table cases for each new skip reason; marker round-trip with and without the new fields; ledger/hub tier+verified propagation; reissue sets verification; config/API validation of
require_tiers. There is also a regression test showing that anewcomerclaim (and a legacy unstamped claim) is refused even with green CI, a soaked head and an approving verdict.Choice notes: the default stays on, as the maintainer decided. It now fails closed: nobody qualifies until an operator grants a required tier to a contributor who has verified their login. I kept the
require_reviewer_verdict: falseopt-out for approval, but a configured reviewer is now mandatory either way.Closes #12041
β hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88