Skip to content

✨ Fold the auto-merge note into the PR hive:status card (quiet mode) - #18455

Merged
kubestellar-prow[bot] merged 3 commits into
v5from
feat/spam-automerge-note
Nov 17, 2026
Merged

kubestellar-prow[bot] merged 3 commits into
v5from
feat/spam-automerge-note

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Part of #18450 (spam reduction phase 2, row 3: ~32 auto-merge comments/day).

What

  • commentTrustedAuthorMerge now goes through postAutoMergeNote: with github.notifications.mode: quiet (default) the "merged by Hive trusted-author auto-merge ..." / "merged by Hive on behalf of ..." note is written as the new auto-merge section (prstatus.KeyAutoMerge) of the PR's hive:status card through the single status writer (prstatus.Write, per-item lock, compare-and-retry, mentions neutralised). An edit notifies nobody; the card is created only if the PR has none.
  • mode: normal keeps today's standalone comment byte for byte.
  • Merges that wait on a person are untouched: the 085 needs-decision / 090 ready-for-human-merge entry comments still post as their own comment.
  • A failed card write still only warns; the merge result is unaffected.

Tests

src/pkg/github/automerge/automerge_merge_note_status_test.go:

  • quiet creates the card with the auto-merge section and no live mention
  • quiet edits an existing card in place (no new comment, other sections kept)
  • quiet operator-approved note folds without live mentions
  • normal mode keeps the standalone comment
  • quiet write failure does not fail the merge
  • needs-human 085 entry still posts its own comment in quiet mode

The trusted-sweep fixture gained GET/PATCH issue-comment routes.

Docs

src/docs/notifications.md, src/docs/operator-reference/sweeps-and-operations.md; changelog fragment changelog.d/changed-18452-automerge-note-status-card.md.

Fixes #18452

🤖 Generated with Claude Code

In github.notifications.mode: quiet (the default) the trusted-author and
operator-approved auto-merge note becomes the auto-merge section of the
PR's hive:status card, edited in place with mentions neutralised, instead
of a fresh comment on every merged PR. Mode normal keeps the standalone
comment; 085/090 entry comments that need a person are unchanged.

Fixes #18452

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added 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. labels Nov 16, 2026
@github-actions

github-actions Bot commented Nov 16, 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
#18586 ✨ Sandboxed agents open issues and keep topic claims through the request spool same files src/docs/notifications.md

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • overlayfs-exec-guard

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.

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs-currency review at 6dd0fb1: one stale doc line, otherwise the docs/changelog match the diff.

1. src/docs/hive-merge.md:763 still says the trusted-author merge "leaves an audit comment" (in-scope, low). The PR changes this note so that in the default quiet mode it is the auto-merge section of the hive:status card (automerge_sweep_trusted.go postAutoMergeNote). This is the canonical Trusted-author auto-merge page, and it is not updated. Suggested fix:

`trusted-author` and records an audit note naming the author role, GitHub
permission, and green head SHA: an `auto-merge` section of the PR's `hive:status`
card in `quiet` notification mode (the default), a standalone comment in `normal`.

Verified OK: the notifications.md and sweeps-and-operations.md edits and the changelog fragment agree with the code. The contributor-lane comment at hive-merge.md:1025 is a different path that this PR does not touch.

— hive: agent=adjudicator-2 backend=claude model=claude-sonnet-5-5 claude=2.1.325

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Review follow-ups (below review.backlog.min_severity: P2)

Non-blocking findings below the backlog filing line are listed here instead of as issues, one comment per PR, updated in place. Tick them off as they are fixed; set review.backlog.min_severity: P3 to file every finding.

  • P3 info style — postAutoMergeNote re-implements the quiet/normal split instead of reusing postStageNoteWith (src/pkg/github/automerge/automerge_sweep_trusted.go:1032): automerge_stage_labels.go:1562 already has postStageNoteWith with the same quiet-vs-comment branch; the new helper hand-rolls it with raw Issues.CreateComment on the normal path. Deliberate (it keeps…

… in quiet mode (#18452)

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson

Copy link
Copy Markdown
Member Author

Owner decision: yes. In quiet mode the trusted-author / on-behalf-of merge note becomes the auto-merge section of the existing hive:status card, so the same audit text (author role, permission, green head SHA) stays on the PR without a new notifying comment; normal mode is unchanged and human-gated 085/090 entries still post. Pushed 3ff4f7d fixing the stale hive-merge.md line the docs review flagged, plus a signed v5 base sync (7aa5f5d). The earlier red was overlayfs-exec-guard cancelled at the 10m limit during the image build (runner timeout, not this change). Merges when green.

@clubanderson clubanderson added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 17, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has signed the DCO. lgtm Indicates that a PR is ready to be merged. 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.

📉 Spam phase 2: fold the auto-merge note into the PR status card

1 participant