Skip to content

πŸ› Make agents sign off only the commits they authored on no-dco repairs - #19268

Open
clubanderson wants to merge 1 commit into
v5from
fix-agent-signoff-others
Open

clubanderson wants to merge 1 commit into
v5from
fix-agent-signoff-others

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Summary

The FIX-BEFORE-NEW kick for a red no-dco PR told agents to run git rebase --signoff <base>. That signs every commit in the range, so the agent's bot Signed-off-by landed 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" with git rebase <base> --exec 'case "$(git var GIT_AUTHOR_IDENT)" in *"<$(git log -1 --format=%ae)>"*) git commit --amend --no-edit --signoff;; esac' (named constant redPRFixOwnSignoffExec; git var honours the lane's pinned GIT_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's Signed-off-by when 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.
  • Tests: TestRedPRFixKickSignsOffOnlyOwnCommits; the existing no-dco kick tests now assert the --exec step instead of git rebase --signoff.
  • Docs: DCO section of labels-and-control-signals/stage-labels.md and the push paragraph of sandbox-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

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>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 19, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#19266 πŸ› Sentinel judges the PR's current head and clears its own stale alert same files src/cmd/hive/main_sweeps.go

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 19, 2026
@kubestellar-prow

Copy link
Copy Markdown
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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ› No-dco repair kick makes agents sign off commits someone else wrote

1 participant