Repository navigation
✨ Scanner PR notes: one edited comment per PR, silent when nothing changed - #18457
Conversation
…anged The comment relay keeps one <!-- hive:scanner-note --> comment per PR for the scanner lane. A note on an unchanged head SHA and failing-check set (red checks, failed DCO, merge conflict) is dropped with a log line; a change edits the note in place; a non-hive PR author who must act and has not been told for this head still gets a new comment. Shared-CI incident references and other marked comments keep their own path. HIVE_SCANNER_NOTE_UPSERT=off turns it off. Scanner policies, notifications.md and the write-site inventory are updated. Fixes #18451 Signed-off-by: Andy 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
|
Mutation testing2 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
ef70746
ℹ️ Sentinel notice — informational; author is trusted (owner), merge is not blockedHive flagged this PR (author @clubanderson, head
Hive did not add the |
|
@clubanderson this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. |
Signed-off-by: Andy Anderson <andy@clubanderson.com>
|
merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 5913ec2. |
Part of #18450 (spam reduction phase 2, item 1).
Where the notes come from
The scanner writes CI-triage and rebase notes itself with
gh pr comment.bin/gh-wrapper.shroutes that tohive-open-issue comment, and the hive's comment relay (handleOneIssueRequestinsrc/pkg/github/issue_request_watcher.go) posts it. The write-surface gate refuses a direct POST from an enforced lane, so the relay sees every agent comment. The fix is there, not only in the prompt.The existing origin-notes upsert (#17067) never matched these notes. The relay appends the
— hive: agent=…attribution trailer after the identity footer, soOriginFooterNote's "footer is terminal" check fails. Some notes also carry ad-hoc markers (<!-- hive-scanner-triage -->). Every pass fell through to a plain new comment: 17 on #18254 for head50eef7e.Change
src/pkg/github/scanner_note.go, scanner lane only, PR comments only:<!-- hive:scanner-note head=<sha> checks=<fp> told=<sha> -->.merge-conflictwhen mergeable state is dirty): nothing is written. The request completesalready_existedand the relay logs a line.<!-- hive-shared-ci-<n> -->), verification and other<!-- hive:… -->markers, PR lookup failure. If the checks can't be read, the note is never dropped.HIVE_SCANNER_NOTE_UPSERT=off|0|false|nodisables it. It is on by default.The scanner policies (all six
scanner*.md) now describe the one-note rule.src/docs/notifications.mdhas a new "Scanner note: one comment per PR" section, and two new write-site inventory entries are added in both the doc andnotification_write_sites.go.Tests
src/pkg/github/scanner_note_test.go: first note posted, repeat on same head dropped, changed head / failing set edits, author-must-act posts once per head and hands over the marker, conflict and DCO in the failing set, unknown checks never drop, pass-through cases, toggle, end-to-end through the relay.Fixes #18451
🤖 Generated with Claude Code