Skip to content

πŸ› Keep agents from pushing their own commits to a person's PR - #19298

Merged
kubestellar-prow[bot] merged 1 commit into
v5from
fix/agent-signoff-human-prs
Nov 19, 2026
Merged

kubestellar-prow[bot] merged 1 commit into
v5from
fix/agent-signoff-human-prs

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Follow-up to #19267 / #19268. #19268 fixed the no-dco repair kick. The audit in #19296 found the other flows behind the bad commits on #19110, #19102 and #19063: the trusted-author rebase kick, the FIX-BEFORE-NEW work list, and the merge-request re-engagement kick. Each sent the scanner lane to a person's PR with "commit -s, push". It pushed its own follow-ups (rebase citation refreshes, test and coverage fixes) and once re-signed a person's commit. A squash lands those under the PR author with the agent's sign-off, which fails "Sign-off survives the squash". That check counts no Co-authored-by, so the compliant behavior is: no agent commits on a person's PR unless it carries merge-method/merge.

Changes

  • stagelabels.PersonPRAgentCommitRule and stagelabels.OwnSignoffRebaseExec (moved from cmd/hive) are the single source for the rule.
  • ci-failing.json rows carry person_authored (not hive-authored, not adopted, not a bot). The FIX-BEFORE-NEW block prints the rule on those rows. The trusted-author rebase text now says to add no commit or Signed-off-by of the agent's own.
  • redPRFixKick states the rule for any author, because the merge-watcher hook that reaches it knows no author (πŸ› Filter em-dashes on every outbound path, agent proxy writes includedΒ #19110).
  • review.BuildFixPrompt names the own-commits-only --exec instead of git rebase --signoff.
  • The sign-off attribution note and its asks say "signed off by a hive agent, not by you" instead of "signed off as the hive App".
  • Docs paragraph in stage-labels.md and a changelog fragment.

The check is unchanged. The deterministic in-pod guard (agents that push outside the broker) is tracked in #19297.

Fixes #19296

πŸ€– Generated with Claude Code

The trusted-author rebase kick, the FIX-BEFORE-NEW work list and the
merge-request re-engagement kick sent the scanner lane to people's PRs
with "commit -s, push" and nothing more. It pushed its own follow-up
commits and once re-signed a person's commit (#19110, #19102, #19063).
The squash lands those under the PR author with the agent's sign-off,
which fails "Sign-off survives the squash". Rows for a person's PR now
carry person_authored and a shared rule: no own commits, no re-signing,
anything beyond the rebase goes in a PR comment. The review-fix prompt
signs off only the agent's own commits instead of git rebase --signoff,
and the sign-off attribution note no longer says the commits are signed
off as the hive App when an agent wrote them.

Fixes #19296

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

github-actions Bot commented Nov 19, 2026 •

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
#19301 πŸ› Close partially-addressed issues the scanner verified complete same files src/docs/labels-and-control-signals/stage-labels.md

@github-actions

Copy link
Copy Markdown
Contributor

Mutation testing

5 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the mutation/acknowledged label to accept this.

File Line Mutation
src/pkg/stagelabels/agent_signoff.go 28 ARITHMETIC_BASE
src/pkg/stagelabels/agent_signoff.go 29 ARITHMETIC_BASE
src/pkg/stagelabels/agent_signoff.go 29 ARITHMETIC_BASE
src/pkg/stagelabels/agent_signoff.go 29 ARITHMETIC_BASE
src/pkg/stagelabels/agent_signoff.go 30 ARITHMETIC_BASE

Verdict: uncovered (#17349).

@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

@kubestellar-prow
kubestellar-prow Bot merged commit d30c434 into v5 Nov 19, 2026
103 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/agent-signoff-human-prs branch November 19, 2026 17:48
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.

πŸ› Agents push their own commits, or re-sign commits, on a person's PR in flows other than the no-dco repair

1 participant