Repository navigation
✨ feat(acmm): capability-based merge-queue credit and personal-account gap ticket - #10895
Conversation
…gap ticket acmm:merge-queue now passes on the default branch when GitHub's merge queue is on, or when the repo is hive-serialized with a known, non-empty required-check set, credited through SatisfiedBy so it counts toward the level. Marker-file-only passes keep passing, labelled "file only, not verified". Failing rows offer an owner the serialized merge lane. Personal-account repos get a truthful gap ticket without ai-fix-requested; organization repos keep today's ticket (golden test). Closes #10891 Part of #10884 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 No conflicting open PRs or same-file overlaps were found. |
|
Deferred to shared CI incident #10899: 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Looks correct to me; the two red checks are pre-existing on v6 HEAD.
Read acmm_merge_queue.go and the api_acmm_eval.go hunks against the v6 tree:
applyMergeQueueCreditruns before the waiver branch and only setsPassed=trueon verified capability, so a repo that fails both the file check and the capability still falls through to its waiver exactly as before (api_acmm_eval.go, theif !res.Passedblock is unchanged in meaning). A file-only pass staysPassed=trueand only gainsFileOnly, so no level regresses — matches the body's "no readiness regression" claim.- Aggregate precedence is Hive credit → file-only → waiver → detected, and
aggFileOnlyis only consulted when no repo earned capability credit, which is the right ordering for the fleet row. s.deps.ConfigandghClientare already dereferenced/guarded earlier inevaluateAllRepos(api_acmm_eval.go:501-520), andConfig.RepoMergeStrategyis nil-receiver safe (src/pkg/config/repo_policy.go:291-299), so the newMergeStrategy:field andacmmMergeQueueCreditcannot nil-deref.ReadBranchRules(ctx, client, owner, repo, branch, set, known)(src/pkg/github/branch_rules.go:52) andAutoMergeConfig.RequiredCheckSet()(src/pkg/config/review_config.go:426) match the call sites;MergeQueueKnown && MergeQueueis the correct guard givenMergeQueueKnown=falsewhen the rules endpoint is unreadable (branch_rules.go:40-43).- The dashboard action posts to
POST /api/repos/merge-strategy, which is registered onv6(src/pkg/dashboard/api.go:320) with themerge_strategyJSON field the UI sends. No nativeprompt/alert/confirmdialogs introduced. - In
handleACMMCreateIssue, moving thectxcreation aboveacmmIssueContentis needed for the owner lookup and does not change the timeout semantics for the Linear/GitHub create paths.
Cost note (not a defect): the capability check adds a Repositories.Get plus the branch-rules reads per repo per evaluation, inside the existing acmmPerRepoTimeout. Fine for the current fleet sizes; worth knowing if evaluations ever get slow.
CI on cbdf8bb: test (rest 5/5) failed in runner setup (npm not on PATH, #10518) and relative links and anchors resolve reports api-reference citation drift in pkg/dashboard/api.go, which this PR does not touch; both are failure on current v6 HEAD too. A re-run / base fix, not a change here.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
…citations TestInvalidMergeStrategyFailsValidationAndStopsAutoMerge hit the RequireAgents guard before reaching the merge_strategy check; give the fixture one agent so Validate() reports the invalid strategy. Re-run check-api-reference-citations.sh --fix for line drift in api.go. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <scanner@hive.kubestellar.io>
There was a problem hiding this comment.
Looks correct to me at f6c3ff9; all checks are green now.
The delta since the last hive review (cbdf8bb) is two things, both verified against the v6 tree:
src/pkg/config/repo_merge_strategy_test.go:77— adding one agent to the fixture is the right fix:Validate()returns "no agents configured" atsrc/pkg/config/validate.go:88before it reachesValidateRepoMergeStrategyat:95, so without it the test never exercised the assertion it names.src/docs/api-reference.md— citation line refresh only, no prose change.
One low-severity open question for the author/maintainer, not a blocker:
acmmMergeQueueCapability (src/pkg/dashboard/acmm_merge_queue.go:31) grants "satisfied by Hive serialized merge lane" when rules.Known && len(rules.Required) > 0. ReadBranchRules seeds Required from the hive's auto_merge.required_checks config (src/pkg/github/branch_rules.go:58-62) and sets Known whenever the union is non-empty and both GitHub reads succeeded (:113-118). So a hive-serialized repo with no branch protection or rulesets still earns credit if the operator config lists any required check. The personal-account ticket (acmm_merge_queue.go:131-132) and src/docs/acmm-waivers.md tell the owner to put the check "in a branch ruleset or in branch protection", which is stricter than what is actually credited. This matches how the serialized lane itself gates merges, so it may be intended — if so, the ticket/doc wording could say "in Hive's auto_merge.required_checks, a ruleset, or branch protection"; if not, the lane branch should check for a GitHub-sourced check rather than the union. Either is a one-line follow-up.
I have not approved or changed anything.
— hive: agent=reviewer 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 #10891
Part of #10884
Summary
acmm:merge-queuenow tests the capability on the default branch instead of a file name. The criterion ID stays the same.SatisfiedBy, so it counts toward the level, when GitHub's merge queue is on (amerge_queuerule found byReadBranchRulesfrom ✨ github: lane-only branch-rules reader (ruleset required checks, up-to-date enforcement, native merge-queue detection) #10887): "satisfied by GitHub merge queue". It also passes when the repo'smerge_strategyishive-serialized(✨ config: per-repo merge_strategy (direct | hive-serialized) with validation, asymmetric permission and API #10886) and the branch has a known, non-empty required-check set: "satisfied by Hive serialized merge lane". The dashboard now showssatisfied_byas a chip on the row and in the row's detail.file_onlyflag), and the row is labelled "file only, not verified". Readiness can only go up. The operationalacmm_levelis untouched.POST /api/repos/merge-strategy. If the lane is already on, the row says it still needs required checks.RepoEvaluationnow carriesmerge_strategyfor this.owner.type == "User", the gap ticket for this check explains that GitHub's merge queue is unavailable and that the serialized merge lane plus required checks satisfies the check. It never asks for a file and gets only theacmmlabel (noai-fix-requested). This applies to both the single "Open Issue" and the "Open Issues for L6" batch, because the batch posts to the same endpoint. The response now includeslabels, so the dashboard's "created with … labels" note is accurate.src/docs/acmm-waivers.mdhas a section on Hive-verified credit. Changelog fragment added.The Hive lane is never called a "merge queue". Merge paths are not touched.
Acceptance criteria covered
AC27, AC28, AC29, AC30, AC31 (single and batch), AC32 (golden test), AC33. Tests are in
src/pkg/dashboard/acmm_merge_queue_test.go. They cover the eval paths through a fake GitHub API, the ticket content and labels, and the dashboard row helpers (run with node). Notime.Sleep.— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@Danathar