Repository navigation
π Admit operator-trusted registry contributors in the contributor-lane auto-merge tier - #12167
Conversation
β¦e auto-merge tier 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>
|
[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
|
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 50368c6. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
|
Shared-CI triage: π Hive Agent: β hive: agent=scanner backend=copilot model=claude-fable-5.1 |
Fixes #12166
What
The contributor-lane auto-merge tier (#12051) read the contributor's tier only from the
hive:claimmarker on a closed issue. The operator's own trust tier in the contributor registry had no effect:mrbobbytablesistrustedon hive's hive, yet #12045 (Part of #12002, a reference not a closing keyword) skipped withcontributor-lane:no-linked-issueand #11756 (claimed outside the relay) withcontributor-lane:no-claim.This adds a second admission path. When the PR author's contributor-registry profile carries a tier in
require_tiers(defaulttrusted,merger), the tier requirement is satisfied without a linked issue or marker. The sweep logscontributor-lane admitted reason=contributor-lane:registry-trusted registry_tier=<tier>, the merge log carriesadmitted_by=contributor-lane:registry-trusted, and the audit comment names the path (@author holds the trusted tier in this hive's contributor registry). A non-trusted (newcomer/contributor/revoked) or absent registry entry falls through to the marker path with its skip reasons unchanged.Every other gate is untouched: author_association, workflow/test diff fences, CI green, reviewer verdict, soak, exclude labels, sentinel, reporter-trust hold, changes-requested, human-merge paths, head re-check.
Config
auto_merge.contributor_lane.registry_tiers_sufficient(*bool, defaulttrue).falserequires the claim marker for everyone.GET/PUT /api/config/auto-mergeand as a toggle under Settings β Features β Auto Merge β Contributor-lane auto-merge.Wiring
automerge.Options.ContributorRegistryTier(ContributorRegistryTierFunc) injects the lookup so tests fake it;cmd/hivepassesdashboard.ContributorTrustTierByLogin(new exported, case-insensitive read over the registry on the PVC).ContributorLanePolicy.RegistryTiersSufficientcarries the config flag.Tests
TestTrySweepContributorLanePRRegistryAdmission: registry trusted/merger admits with no linked issue / no marker; case-insensitive login; fences and author_association still apply;newcomer/contributor/revoked/absent entry fall through tono-linked-issue/no-claim; tier outsiderequire_tiersfalls through; nil lookup andregistry_tiers_sufficient: falsekeep the marker path; valid claim without registry still merges via marker.ContributorTrustTierByLogin; config default; dashboard API default + PUT.Docs
src/docs/hive-merge.md,src/docs/operator-reference.md,src/hive.yaml.example,changelog.d/fixed-contributor-lane-registry-trusted.md.