Skip to content

πŸ› fix(automerge): upsert contributor-nudge comments once per PR + reason instead of reposting per head - #17088

Closed
hivecommons-hive[bot] wants to merge 1 commit into
v5from
scanner/fix-17066
Closed

hivecommons-hive[bot] wants to merge 1 commit into
v5from
scanner/fix-17066

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Why

Automerge marker comments were keyed per head SHA, so every push to a PR added another copy. On #16524 that produced 8Γ— hive:signoff-attribution and 5Γ— hive:unauthorized, and the stage-072 contributor nudge rebounded to 34 comments a day.

#17066 (signoff-attribution and unauthorized upsert) already landed on v5 in #17071 (d6c63af). That PR added the shared automerge_marker_upsert.go helpers (findOwnMarkerComment / editMarkerComment). This PR reuses those helpers for the remaining emitter: the contributor nudge, section 1 of #17067.

What changed

  • hive:contributor-nudge once per PR + reason.
    • The marker is now <!-- hive:contributor-nudge reason=<slug> head=… n=… mode=… since=… repeat=… -->.
    • When a nudge is due (a new red head, or a stall re-nudge), the sweep edits the hive's existing nudge comment in place, both when the reason is unchanged and when it changes.
    • Legacy per-head nudge comments, which have no reason=, are adopted and rewritten in place.
  • Escalation.
    • New key auto_merge.nudge_repeat_after (duration, default 72h).
    • If the same reason persists past it, the hive posts exactly one fresh re-nudge (repeat=1), then only edits from then on.
    • Existing config keys are unchanged.
  • Unchanged:
    • the relay fix-pr dispatch
    • MarkNudged
    • the adoption-grace ledger
  • Config wiring and docs:
    • config.go (field, default, and EffectiveNudgeRepeatAfter), StageLabelPolicy.NudgeRepeatAfter, merge_eligibility.go wiring.
    • Settings-parity allowlist entry.
    • Docs: operator-reference README table, sweeps-and-operations, hive-merge.md, stage-labels.md.
  • Tests in automerge_contributor_nudge_test.go (each fails without this change):
    • one comment per PR across new heads and a reason change, with edits recorded instead of new posts
    • exactly one repeat after nudge_repeat_after
    • legacy comment adoption
    • slug and marker round-trip
  • Changelog: changelog.d/changed-upsert-signoff-unauthorized-nudge.md.

The raw CreateComment count in automerge_contributor_nudge.go stays at the write-back baseline of 1, because edits go through the gated editMarkerComment.

Follow-ups (not converted here; per-head emitters still worth auditing)

  • hive:human-071-note (normal mode)
  • merge-commit note
  • merge-forward-conflict
  • contributor-held-runs-approved
  • workflow-approval

References

#17066 is already closed: it was fixed by #17071.

Refs #17067 (partial: Β§1 nudge-once-per-PR+reason lands here; Β§2 origin-notes folding β†’ #17084, Β§3 marker ratchet β†’ #17085 filed as sub-issues)

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 requested_by=@clubanderson

…son instead of reposting per head

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>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 7, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign clubanderson for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 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
#17086 ✨ agents: drain CLI memory into draft knowledge entries before clearing same files src/docs/operator-reference/README.md
src/pkg/config/config.go
src/pkg/dashboard/settings_parity_allowlist.txt
#17040 ✨ agents: disable CLI auto-memory by default and add cli_memory.clear_on_kick same files src/docs/operator-reference/README.md
src/pkg/config/config.go
src/pkg/dashboard/settings_parity_allowlist.txt
#17073 🌱 contributor-nudge once per PR+reason; fold origin notes into status; marker ratchet CONFLICT src/cmd/hive/merge_eligibility.go
src/docs/hive-merge.md
src/docs/labels-and-control-signals/stage-labels.md
src/docs/operator-reference/README.md
src/docs/operator-reference/sweeps-and-operations.md
src/pkg/config/config.go
src/pkg/github/automerge/automerge_contributor_nudge.go
#17072 ✨ review backlog: min_severity floor, per-PR lifetime cap, collapse same-family findings same files src/docs/operator-reference/README.md

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 7, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Superseded by #17071 (merged) and #17073 β€” closing as duplicate.

@hivecommons-hive hivecommons-hive Bot closed this Nov 7, 2026
@hivecommons-hive
hivecommons-hive Bot deleted the scanner/fix-17066 branch November 7, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR copilot 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants