Repository navigation
🐛 fix: fold remaining hive comments into the status comment in quiet mode - #15919
Conversation
…mode In quiet notification mode the evidence pointer, the unblocked note, the review backlog summary, the contribute-hub claim marker and relayed agent status notes (awaiting-ci, parking, already fixed) become sections of the single edited <!-- hive:status --> comment. The unblocked note is idempotent per cause in either mode and skipped when the same merge closes the issue; close-on-merge and the issue-stage lane post one closing comment, not both. The client logs created/edited/suppressed counts hourly. Closes #15918 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 No conflicting open PRs or same-file overlaps were found. |
There was a problem hiding this comment.
Read at 2c3a105 against v5 and followed the folded markers to their readers. No defects found; looks correct to me.
What I verified:
- Claim fold is safe for readers.
issueclaim.Latest(src/pkg/issueclaim/issueclaim.go:295-336) parses each body withParseMarker, which is astrings.Indexscan — so the<!-- hive:claim … -->marker inside theclaimsection of the status comment is found exactly as a standalone comment was. One thing I checked because it would have broken this:Latesttreats any body containing<!-- hive:releaseas release-only (continueat:307). Nothing in this PR folds a release marker into the status comment (onlypkg/claimsemits it, as its own comment), so the status comment never carries both and the claim stays visible. - Closing-comment dedupe is symmetric and does not lose idempotency.
closeOnMergeMarkersnow also reportsstageNoted(close_on_merge.go:932), and the stage lane checksCloseOnMergeMarkerviaissueCommentsContainAny(issue_stage_labels.go).hasCloseOnMergeMarkerhas no non-test callers, so suppressing close-on-merge's own marker when the stage lane already noted the close has no downstream consumer that would misread the issue as not-hive-closed. - Relay fold only catches status-shaped notes.
relayStatusNoteKey(issue_request_status_notes.go) keys on the first-line prefix and returns""otherwise, so findings/verdict comments still post. The decision-question markers are read by the review relay path (review_request_watcher.go,review_verdict_relay.go), not the issue-comment relay, so folding a "Parking on …" issue note cannot hide a decision question from the router. notificationTallyuses atomics for the counters and a mutex only aroundlastLog; theeditedcounter is bumped on bothEditCommentsites.
One behavioural note, not a defect: the agent-note:parking section is keyed per item, so a second parking note on the same issue replaces the first's text rather than appending. That matches the "one-line state report" framing in the file comment; flagging only so it is a conscious choice.
Body matches the diff throughout.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Read the fold/dedupe paths against the v5 tree at Verified correct
Low — historic close marker suppresses unblock notes on reopened issues ( The skip fires on any comment containing Open question, not a finding: in quiet mode the single Also: Review findings from Correctness pass at 2c3a105 — the fold is sound (section bodies are trimmed by Suppression keys on any close marker, not the same merge — (and in |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Closes #15918
Phase 2 of the notification-spam work (#15875 / #15876). In the first 80 minutes after quiet mode went live the hive still created ~65 new comments; this folds the remaining kinds into the single edited
<!-- hive:status -->comment and fixes two duplication bugs that bite in either mode.In quiet mode (
github.notifications.mode: quiet, default)<!-- hive-review-evidence -->(13 / 80 min)evidencesection of the status comment (review_evidence_merge.go)<!-- hive:unblocked -->(9, incl. duplicates)unblockedsection; see idempotency below (issue_blocked.go)<!-- hive:review-backlog-summary -->review-backlogsection (review_backlog.go)<!-- hive:claim … -->claimsection viaClient.PostClaimNote— readers scan every hive comment body withstrings.Index, so the marker inside a section is found exactly as before (contribute_claims.go)hive/awaiting-ci: …,Parking on stage/045…,Already fixed …agent-note:<kind>sections; any other relayed comment (findings, evidence, questions) is still posted (issue_request_watcher.go,issue_request_status_notes.go)In either mode
hive:unblockedis idempotent per cause: a comment already carrying the same note means nothing is posted (Review backlog (intent-alignment): Landing condition from #15510 not yet met #15536 ×2 within a minute, Review backlog (security): destructiveCmdRe still misses equivalent root-removal spellings (//, /., quoted /, split flags, ${HOME}) #15740 ×2). An issue being closed by the same merge (close-on-merge or issue-stage closing marker present) gets no unblocked note.<!-- hive:closed-by-merged-pr pr=N -->, and the stage lane skips its note when<!-- hive-close-on-merge -->is present ([scanner] toolapprove destructiveCmdRe misses 'rm -rf /' (trailing \b after non-word char) #15727 vs [selfreport] unclassified_error_repeated: inference provider error detected, backing off kicks instead of sending action … #15843 pattern). Both still close.github notifications created=N edited=M suppressed=KINFO once an hour (cumulative; the first bump after start logs the baseline). No goroutine, no timer — logged lazily on increment.normalrestores the previous behaviour.Before / after (80-min tally from #15918)
~65 new comments → the 10 status comments (edited in place; created once per PR/issue) plus the content-bearing relayed comments. Of the 55 non-status comments: 13 evidence, 9 unblocked, 2 awaiting-ci, 2 claim, 2 parking, 2 already-fixed, 2 backlog summary and ≥1 duplicate closing comment (33+) are folded or deduped; the remaining ~20 were agent findings/verdicts and single closing comments that stay.
Tests
TestRecordReviewEvidenceMergeQuietFoldsIntoStatusComment,…QuietCreatesStatusCommentOnce,TestPostUnblockedNoteIdempotentPerCause(normal / quiet / closed-by-merge),TestRelayStatusNoteKey,TestPostNoteOrFoldQuietEditsNormalCreates,TestNotificationTallyLogsHourly,TestCloseOnMergeSkipsSecondClosingComment. Direct-write ratchet tightened (review_backlog.gowrap 1→0). Notime.Sleep.Docs:
operator-reference/sweeps-and-operations.mdNotification mode section; changelog fragmentchangelog.d/fixed-notification-spam-fold-remaining-comments.md.