Repository navigation
π± automerge: upsert signoff-attribution and unauthorized comments instead of reposting per head - #17071
Conversation
β¦tead of reposting per head hive:signoff-attribution becomes one comment per PR under a stable marker, rewritten in place on a new head with an 'updated β¦' history capped at five lines. hive:unauthorized becomes one comment per PR and blocked step; a new head hitting the same block edits it with an attempt count and the heads it covers. Legacy per-head comments are adopted and upgraded in place. workflowFenceReleased reads head coverage from the upserted note. Fixes #17066 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
|
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
β¦line line to the signoff file The sign-off attribution CreateComment moved files unchanged (2β1 in the nudge file, 1 in automerge_signoff_attribution.go); the test heads used %040d, whose 12-char short SHA was identical for every head. Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #17066
Spam reducer #3b. On #16524 the hive left 8 Γ
hive:signoff-attribution+ 5 Γhive:unauthorizedcomments in one day β one per push, each the same ask to the same person. Both markers were keyed on the head SHA. This PR gives them the shape #16434 gave the claim ledger / needs-decision / sentinel: one comment per PR carrying a stable marker, found and edited in place (an edit notifies nobody).Changes
hive:signoff-attributionβ one comment per PR (<!-- hive:signoff-attribution -->). A new head rewrites it, names the current head, and appendsupdated <date>: head β¦, N commits signed off as the hive App; history capped at 5 lines. Same head / same asks β no write. The emitter moved fromautomerge_contributor_nudge.gointo its ownautomerge_signoff_attribution.go(pure block move out of the nudge file, nothing else in it touched).hive:unauthorizedβ one comment per PR per blocked step (<!-- hive:unauthorized step=β¦ -->). A new head hitting the same block edits the existing note:Attempt N: the same block hit heads β¦plus a hidden<!-- hive:unauthorized-attempts n=N heads=β¦ -->record (heads capped at 5, count unbounded). The "actor" that varies here is the blocked step β the App is always the one refused β so the per-actor key is the step.workflowFenceReleasednow reads head coverage from that record instead of a per-head marker.automerge_marker_upsert.go:findOwnMarkerComment(own App login only; stranger's marker is never edited),editMarkerComment, capped history render/parse.stage-labels.md,labels-and-control-signals/reference.md.Emitter audit (item 3)
Per-head marker emitters in
pkg/github/automergeand what was done:hive:signoff-attributionhive:unauthorizedhive:merge-commitmerge-commitlabel is then "the note" so later heads skip; effectively one-shothive:merge-forward-conflicthive:contributor-held-runs-approved,hive:workflow-approvalhive:adopted,hive:carried-fence,hive:trust-promotedhive:contributor-nudge,hive:human-071-noteautomerge_contributor_nudge.go); 071-note already folds intohive:statussince #15876Tests
Table-driven, no
time.Sleep:TestSignoffAttributionRewriteβ same head no-op, new head appends one line, legacy adoption, cap at 5, idempotent second pass.TestApplyStageLabelsSignoffAttributionUpsertsAcrossHeadsβ the π± chore: v5 β v6 top-up (2026-11-03)Β #16524 shape throughApplyStageLabels: 4 heads β 1 post + 3 edits, repeat sweep writes nothing.TestParseUnauthorizedAttempts,TestUnauthorizedAttemptsNextCapsHeads,TestCommentUnauthorizedUpsertsPerStepβ same head once, 3 heads β 1 post + 2 edits, legacy adoption, stranger's marker not edited, different step gets its own note.TestMarkerHistoryRoundTrip.PATCH /issues/comments/{id}.Verification on #16524 is by these tests only β no live comments were edited or deleted.