Repository navigation
π fix: carry Signed-off-by through squash merges - #18204
Conversation
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. hive/awaiting-ci: CI pending β sweep will merge when green. π Hive Agent: β hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 Review findings from Read the code at the head; the merge-path change looks correct to me. Routing to a maintainer only because it touches
This does not decide item 3 of #18203 ( |
Mutation testing2 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Decision needed: @clubanderson should confirm the new TRUSTED_SCRIPTS_TREE pin (630082873462479b5777ebc7d5dc255bae6f8df2) in .github/scripts/integration-governance.cjs:12 matches the enrolled .github closure at this head.
The squash sign-off logic looks correct to me: I read src/pkg/github/merge_signoff.go in full. Non-squash methods pass through, a message already carrying a sign-off costs no request, no branch sign-off returns ErrSquashUnsigned, and a failed commit read fails open. It never adds a sign-off on anyone's behalf.
The only reason for a human is the trust surface: the diff changes the pinned TRUSTED_SCRIPTS_TREE hash (integration-governance.cjs:12) and touches dco-post-merge.yml (comment-only). I can't verify the new hash against the tree from here. I have not approved anything.
β hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325
c73bc62
βΉοΈ Sentinel notice β informational; author is trusted (hive agent), merge is not blockedHive flagged this PR (author @hivecommons-hive[bot], head
Hive did not add the |
The squash sign-off path now lists PR commits before merging; the test server 404'd on /pulls/N/commits, failing the successor-bypass case. Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
|
Needs a decision, not a merge:
Head: verdict requires_human @fb0876c, 71/71 checks green, DCO yes, soak 0s of 10m0s. What to do: approve this head ( How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to Updated 2026-11-14 14:26 UTC. |
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Review follow-ups (below
|
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether the hive's squash merge may now refuse (squash-unsigned) and whether the .github/workflows/dco-post-merge.yml and integration-governance.cjs trust-pin edits are acceptable.
Code looks correct to me; routing only because it edits CI/governance files and merge gating.
What I read: src/pkg/github/merge_signoff.go (SquashSignoff, squashSignoffMessage, branchSignoffs), the mergeOptions rewrite in automerge_merge_credit.go, the MergePRVia call site in pullrequest.go, and all four sweep lanes. Every squash path now goes through SquashSignoff, and a refusal returns squash-unsigned before executeMergeEffect runs. Merge-commit and rebase methods return early. The squashCreditMessage change only stops appending an empty trailer paragraph. This matches items 1 and 2 of #18203, and item 3 is left alone as the body says.
Trust surfaces touched (a person should confirm): .github/workflows/dco-post-merge.yml (comment only), .github/scripts/integration-governance.cjs:12 (TRUSTED_SCRIPTS_TREE re-pinned, presumably because the enrolled closure changed), and a new refusal condition on the automerge path.
Open question (not a defect): src/scripts/check-dco-trailers.sh:338 now reports every bot-authored commit with no Signed-off-by. I could not verify whether other bot commits inside the default 50-commit window (release automation) lack one and would turn the hourly monitor red.
Also noted: mutation is still in progress and the Sign-off survives the squash / verify PR contents runs show CANCELLED duplicates alongside successes.
β hive: agent=reviewer-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325
clubanderson
left a comment
There was a problem hiding this comment.
Approving. Verified against the PR head fb0876c:
- Right path: #18079 was merged by the hive App (f33758f). Every hive squash now goes through
MergeCreditor.SquashSignoff: relay/forgeMergePRViaand all four sweep lanes viamergeOptions. No otherPullRequests.Mergecall sites exist. - Composer: keeps every distinct branch
Signed-off-byonce (case-insensitive dedupe), excludes merge-from-base commits, appends missing ones as a trailing block after the Co-authored-by/credit trailers, returnsErrSquashUnsignedwhen the branch has none, leaves merge/rebase untouched, and never signs on anyone's behalf (sodco-squash-attributionsemantics are unchanged). - Checker: a bot commit is now reported
missing-signoffonly when it has no trailer at all; the email regex still extracts bracketed[bot]addresses, so the #6276 identity-match skip is preserved. The workflow change is comment-only. TheTRUSTED_SCRIPTS_TREEre-pin equalsgit rev-parse <head>:src/scripts(630082873462479b5777ebc7d5dc255bae6f8df2) and the governance script requires that re-pin for anysrc/scriptsedit. - Monitor impact: no unsigned bot-authored commits exist in the last 50 non-merge commits of v4, v5 or v6, so this does not turn the hourly monitor red on landing. f33758f itself is outside the window; its disposition stays with #18193 as the PR states.
- Tests: composer and creditor unit tests,
MergePRViarefusing with zero merge PUTs, a checker self-test for the unsigned-bot shape, plus changelog.d fragment. Non-blocking follow-up: the sweep-lanesquash-unsignedskip reason inmergeOptionshas no direct test (mutation report flags that branch); the composer-level refusal it wraps is covered. - CI: all non-tide checks green, including DCO, the checker self-test and "Sign-off survives the squash".
|
LGTM label has been added. DetailsGit tree hash: a040ab56b7c480f299d6c4dafee5220c5a66c5d1 |
|
/hive decision approve Reviewed head fb0876c: the workflow edit is comment-only, the TRUSTED_SCRIPTS_TREE re-pin matches the new src/scripts tree, and no unsigned bot-authored commit sits in the monitored window of v4/v5/v6, so reporting unsigned bot commits is acceptable. Squash sign-off carry and fail-closed refusal verified with tests. |
|
[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 |
β¦ing; repoint email-inbox citation to the v6 config split Signed-off-by: Andy Anderson <andy@clubanderson.com>
β¦CO (#18667) * automerge: refuse an unsigned squash only where the repo requires DCO Since #18204 the hive refused to squash any PR whose branch carries no Signed-off-by, without asking whether the repo requires DCO at all. In repos with no DCO gate every Renovate and Dependabot PR, and every unsigned human commit, stalled at 080-awaiting-merge-admission with reason squash-unsigned and nothing a person could do. The refusal now applies only where the repo requires DCO, by the rule the stage router already uses for no-dco: the governor.labels.stage.dco.required override when set for the repo, else a dco/DCO context required on the base branch or reported on the head, read at merge time. A head whose checks cannot be read keeps the refusal. Elsewhere the squash goes out with the message as built, as before #18204, and any branch sign-offs that exist are still carried. The sweep lanes (mergeOptions) and the merge relay (MergePR) share the one decision in SquashSignoff. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1 Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> * docs: re-cite RankActionableIssues for this branch's client.go lines This branch adds three lines to client.go above RankActionableIssues, so after the v6 merge it starts at 5600; scale-envelope.md now cites 5600-5610 and the docs citation check finds AgeMinutes again. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Why. When the hive squash-merged with an empty commit message, GitHub wrote its own default squash body. For #18079 that body held only
Co-authored-bylines, so the branch commit'sSigned-off-bynever reached v5 (f33758f5a). Every branch that merges v5 forward now fails DCO on that commit (first hit: #18193). Nobody saw it because the post-merge monitor skipped bot-authored commits entirely.Merge path (item 1). The hive no longer leaves the squash body to GitHub.
MergeCreditor.SquashSignoff(src/pkg/github/merge_signoff.go) runs on every hive squash, whether or not issue-author credit is on: relayMergePRViaand all four auto-merge sweep lanes (throughmergeOptions). It rebuilds the default body from the branch commits, appends any distinct branchSigned-off-bythe body lacks, and refuses the squash withErrSquashUnsigned(sweep skip reasonsquash-unsigned) when no non-merge branch commit carries one. It never adds a sign-off on anyone's behalf. Merge-commit and rebase merges are unchanged.merge_signoff_test.gocovers the exact π fix: de-flake TestMarketplaceRefreshRoutesAndStatus and TestBackfillCoveredByLedger_HealsRecordBelow040Β #18079 shape, deduping, merge-from-base exclusion, credit off, andMergePRViarefusing with zero PUTs. Two existing fixtures were updated to the new behavior: the credit-off case now expects the rebuilt sign-off body, and the pin-only commits now carry a sign-off.Monitor (item 2).
check-dco-trailers.shstill skips the sign-off identity match for bot authors (the bracketed-address edge cases from #6276), but a bot-authored commit with noSigned-off-byis now reported asFAIL <sha> missing-signoff bot-author=.... This applies to bothdco-post-merge.ymlanddco-push-delta.yml, so the next one shows up on push or within the hour. A self-test case is added.f33758f5ais about 89 non-merge commits back on v5, outside the default 50-commit window, so this does not turn the hourly monitor red on its own.Not done (item 3). What to do about
f33758f5aitself (for example, aDCO_WAIVED_COMMITSentry) is a maintainer call on #18193, which is already merged. It is deliberately left alone here.Closes #18203
π€ Generated with Claude Code
β hive: agent=scanner backend=claude model=claude-sonnet-5-5 claude=2.1.325 requested_by=@clubanderson