Repository navigation
π Make agents sign off only the commits they authored on no-dco repairs - #19268
Open
clubanderson wants to merge 1 commit into
Open
clubanderson wants to merge 1 commit into
clubanderson wants to merge 1 commit into
Conversation
The FIX-BEFORE-NEW kick told agents to run git rebase --signoff over a no-dco PR, which appended the agent's bot Signed-off-by to commits a person wrote and broke the squash sign-off check. The kick now names a git rebase --exec that amends with --signoff only the agent's own commits and tells the agent to leave others' commits to their author. The push broker's refusal of a lane sign-off on another author's commit now explains the fix, with tests for the refusal and for own commits. Fixes #19267 Signed-off-by: Andy Anderson <andy@clubanderson.com>
Contributor
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
Contributor
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
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
The FIX-BEFORE-NEW kick for a red
no-dcoPR told agents to rungit rebase --signoff <base>. That signs every commit in the range, so the agent's botSigned-off-bylanded under a person's own trailer on their commit and the "Sign-off survives the squash" check failed (#19102, commit e7fc580).Changes
cmd/hive/main_sweeps.go: the no-dco step now reads "Sign off ONLY the commits you authored" withgit rebase <base> --exec 'case "$(git var GIT_AUTHOR_IDENT)" in *"<$(git log -1 --format=%ae)>"*) git commit --amend --no-edit --signoff;; esac'(named constantredPRFixOwnSignoffExec;git varhonours the lane's pinnedGIT_AUTHOR_*), plus a line telling the agent never to add its sign-off to someone else's commit and to ask the author on the PR instead.crux/pushbroker: the broker already refused an outgoing commit carrying the lane'sSigned-off-bywhen another identity authored or committed it (rejectForgedLaneSignoffs). The refusal now says why and what to do (foreignSignoffAdvice). New leased-push tests: the exact π Let the agent that opened a PR reply on its review threadsΒ #19102 shape (person author, lane committer, both trailers) is refused with that message and nothing is pushed; the lane's own signed commit still pushes beside an untouched author's commit.TestRedPRFixKickSignsOffOnlyOwnCommits; the existing no-dco kick tests now assert the--execstep instead ofgit rebase --signoff.labels-and-control-signals/stage-labels.mdand the push paragraph ofsandbox-isolation.md; changelog fragment. Citation checkers run with--fix(no drift).Note: the broker is only the sandbox-kick push path. The #19102 rewrite was a force-push the broker would not have allowed at all (lease plus descend-from-lease), so it went out another way. The advice change is what covers that path.
Fixes #19267