From e77c1a297742d220170745929f042724800eb2d3 Mon Sep 17 00:00:00 2001 From: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Date: Sat, 7 Nov 2026 14:38:46 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(automerge):=20upsert=20contr?= =?UTF-8?q?ibutor-nudge=20comments=20once=20per=20PR=20+=20reason=20instea?= =?UTF-8?q?d=20of=20reposting=20per=20head?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refs #17067 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com> Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com> --- ...anged-upsert-signoff-unauthorized-nudge.md | 1 + src/cmd/hive/merge_eligibility.go | 1 + src/docs/hive-merge.md | 8 +- .../stage-labels.md | 17 +- src/docs/operator-reference/README.md | 1 + .../sweeps-and-operations.md | 9 +- src/pkg/config/config.go | 20 +++ .../dashboard/settings_parity_allowlist.txt | 1 + .../automerge/automerge_contributor_nudge.go | 163 +++++++++++++++++- .../automerge_contributor_nudge_test.go | 138 +++++++++++++++ .../automerge/automerge_stage_labels.go | 2 + 11 files changed, 341 insertions(+), 20 deletions(-) create mode 100644 changelog.d/changed-upsert-signoff-unauthorized-nudge.md diff --git a/changelog.d/changed-upsert-signoff-unauthorized-nudge.md b/changelog.d/changed-upsert-signoff-unauthorized-nudge.md new file mode 100644 index 0000000000..a6077abb8b --- /dev/null +++ b/changelog.d/changed-upsert-signoff-unauthorized-nudge.md @@ -0,0 +1 @@ +- Hive no longer posts a new stage-072 contributor nudge on every push to a red contributor-agent PR ([#17067](https://github.com/hivecommons/hive/issues/17067)). On 2026-11-05 the nudge reached 34 comments a day. Each PR now keeps one `hive:contributor-nudge` comment, and its marker carries `reason=`. A new head that is red for the same reason, or a change of reason, edits that comment in place, which notifies nobody. If the same reason lasts longer than the new `auto_merge.nudge_repeat_after` setting (default `72h`), the hive posts one fresh re-nudge, then goes back to editing. Existing per-head nudge comments are adopted and rewritten in place. The relay `fix-pr` dispatch and the adoption grace are unchanged. diff --git a/src/cmd/hive/merge_eligibility.go b/src/cmd/hive/merge_eligibility.go index a3512f8f8c..3673c297b1 100644 --- a/src/cmd/hive/merge_eligibility.go +++ b/src/cmd/hive/merge_eligibility.go @@ -115,6 +115,7 @@ func stageLabelPolicyFunc(cfg *config.Config) func() automerge.StageLabelPolicy StalledRequireQuiet: stage.Stalled.IsRequireQuiet(), ContributorNudge: stage.ContributorNudge.IsEnabled(), RenudgeInterval: stage.ContributorNudge.EffectiveRenudgeInterval(), + NudgeRepeatAfter: cfg.AutoMerge.EffectiveNudgeRepeatAfter(), Adoption: stage.Adoption.IsEnabled(), GraceOnline: stage.EffectiveContributorGraceOnline(), GraceOffline: stage.EffectiveContributorGraceOffline(), diff --git a/src/docs/hive-merge.md b/src/docs/hive-merge.md index d56f26b65d..4c42690afd 100644 --- a/src/docs/hive-merge.md +++ b/src/docs/hive-merge.md @@ -1236,9 +1236,11 @@ when the copy is closed without merging (`adopted_by_state` closed / closed-twice / copy-failed). A clanker PR entering `stage/072-returned-to-contributor` also triggers the -contributor nudge: the sweep posts one `` comment per head naming the failing checks / review asks (re-nudged -once at the stall threshold, cap 2) and hands the diagnosis to the contribute +contributor nudge: the sweep keeps one `` comment per PR naming the failing checks / review asks +(due once per head and once more at the stall threshold, cap 2; a due nudge +edits that comment in place, and a fresh one is posted only once, after the +same reason persisted for `auto_merge.nudge_repeat_after`) and hands the diagnosis to the contribute hub, which — when the author's relay heartbeat is fresh — pushes a `fix-pr` interrupt task into their relay session (parallel sub-session or preempt, per the relay's declared capability) under a per-contributor fix budget; diff --git a/src/docs/labels-and-control-signals/stage-labels.md b/src/docs/labels-and-control-signals/stage-labels.md index 92c16796a0..ff3af9223c 100644 --- a/src/docs/labels-and-control-signals/stage-labels.md +++ b/src/docs/labels-and-control-signals/stage-labels.md @@ -753,12 +753,17 @@ When a contributor-agent PR goes red the hive does not just relabel it (a human- [hive-merge.md](../hive-merge.md#stage-labels)): 1. `stage/072-returned-to-contributor` and ONE `` comment - @-mentioning the author with the failing checks / review asks and "reply - here or push a new head". Re-posted only for a new head; re-nudged once - more after `governor.labels.stage.contributor_nudge.renudge_interval` - (default = the stage's 24h dwell, i.e. at `stage/stalled`), then no more - — **cap: 2 nudges per head**. `mode=` records how the relay side was + reason= head= n=<1|2> mode= + since=