Repository navigation
🐛 fix(automerge): never supersede a hive-authored PR for a missing sign-off - #16648
Conversation
…-off The squash-attribution rule in stageDCO counted an App-signed commit on a PR by hive's own ai_author as squash-unsafe, so signoff-rehome closed the approved, green PR and re-authored it as a new one. Hive-authored PRs are now self-squash, signoff-rehome amends them in place (or leaves them) and never rehomes an operator-approved head. The App's signed re-author commit always carries a Signed-off-by trailer and the push relay refuses a hive-identity commit without one. Fixes #16647 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[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 |
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. |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
…epair (#16698) #16648 let a hive-authored PR on a pushable base-repo head be amended in place whatever its unsigned commits were linked to, because commits the hive's agents push as project.ai_author counted as "other" (only App-bot linkage made a commit the hive's). As a result a collaborator with push access who added an unsigned commit to a hive branch got a Signed-off-by asserted for them by the App. The hive/other split now also counts commits GitHub links (by author login) to one of the hive's identities (StageLabelPolicy.HiveAuthor), so #16648's case still amends in place, and in-place repair again requires every unsigned commit to be the hive's. A hive-authored PR carrying anyone else's unsigned commit waits for a person; it is still never superseded. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Fixes #16647
Hive closed its own approved, green PR (#16619, author =
project.ai_author) and re-authored it as #16634 undersignoff-rehome, losing the approval and CI history.Root cause: no commit lacked a sign-off.
dcoCommitStatsDetailedForAuthorcounted the App-signed commit59809967(signed as the App, not the PR author) assquashUnsafeHivebecause the PR author was not[bot]-suffixed — but the author is the hive.inPlaceRehomeReason→AdoptReasonSignoffRehome→escapeStalledAdoption→supersedeAdoptedPRnever checked for a hive author or an existing operator approval.Changes
StageLabelPolicy.HiveAuthor(wired tohiveIdentity(cfg).Matches); hive-authored PRs are self-squash instageDCO, sosquashUnsafeHiveis zero for them.signoff-rehomenever supersedes a hive-authored PR: in-place amend when the branch is pushable, otherwise stays put. A head with an operator approval is never rehomed.signBranchalways emits aSigned-off-bytrailer on the App's re-author commit (ensureSignedOffBy).unsignedHiveCommits).Tests: (a) hive-authored PR with squash-unsafe commit stays in place, (b) external fork PR still supersedes, (c) approved head is not superseded; plus
ensureSignedOffBy,unsignedHiveCommits, and the push-relay refusal.go test ./pkg/github/automerge/ ./pkg/github/ ./cmd/hive/passes.