Repository navigation
π fix(contributor-lane): stop /hive approve promising a merge for a workflow head that removes tests - #15048
Merged
hivecommons-hive[bot] merged 1 commit intoOct 28, 2026
Conversation
β¦orkflow head that removes tests The /hive approve reply keyed its "a trusted merger's Approve review lets the lane merge" caption on the workflow-path fence alone. Since hivecommons#15027 the lane checks removed tests before the owner-approval release, so a head that edits workflows and removes tests stops at tests-removed, and that caption sent the owner to approve a head the lane will not merge. Such a head now gets the manual-merge reply. Raised by the hive review of hivecommons#15027 (backlog hivecommons#15034); the fix was pushed to hivecommons#15027's branch seconds after it merged, so it lands here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Contributor
|
[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 |
Contributor
Contributor
Contributor
There was a problem hiding this comment.
Read against v6. Looks correct to me, and this is the better of the two open fixes for #15034.
- The guard is the right one:
contributorLaneDiffReasonreturnsworkflow-pathas soon as any workflow path matches (src/pkg/github/automerge/automerge_contributor_lane.go:1079-1083) and only falls through tocontributorLaneTestsRemovedReasonotherwise, so a head with both never reportedtests-removedto this reply. CheckingcontributorLaneTestsRemovedReason(files) == ""directly (pr_approve_command.go:91) closes that gap without changing the lane itself. - The table test's new
releaseFencecolumn also gives the positive "merges only on a hive owner's explicit approval" caption its first test β before this,ContributorLanePolicy{Enabled: true}was hard-coded so that branch was never exercised. The new negative row would fail without the guard. - #15041 (hive scanner) carries a byte-identical production change and the same
changelog.d/fixed-approve-reply-tests-removed.mdfilename, so they conflict; I have left a note there recommending it be closed in favour of this one.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #15027 (merged). The hive's review of #15027 raised one low finding, filed as backlog issue #15034:
The
/hive approvereply (pkg/github/automerge/pr_approve_command.go) chooses its "a trusted merger's Approve review lets the lane merge" caption from the workflow-path fence alone. Since #15027, the contributor lane checks removed tests before the owner-approval release. A head that edits workflow files and also removes tests stops atcontributor-lane:tests-removed, which no approval overrides. The reply therefore told the owner to approve a head the lane will not merge.The fix was pushed to #15027's branch about ten seconds after the hive merged it, so it never reached
v6. It lands here, with its own changelog fragment.Change
pr_approve_command.go: a workflow-path head whose diff also removes tests gets the manual-merge reply, not the approval caption. This is one added condition.pr_approve_command_test.go. A workflow-only head keeps the approval caption; a workflow head that also removes tests gets the manual-merge reply.changelog.d/fixed-approve-reply-tests-removed.md.Testing
From
src/,TZ=UTC,-count=1:go test ./pkg/github/automerge/passes.gofmtandgo vetare clean.check-changelog-fragment.sh v6passes.Mutation check: with the new condition removed, the new case fails.
Contributor checklist
changelog.d/fixed-approve-reply-tests-removed.md.v6.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1