Repository navigation
✨ feat(notifications): refs sweep defers to the hive:status card; document Actions comment deduplication - #16385
Conversation
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. hive/awaiting-ci: rebased onto v5 after #16386 merged (kept both notifications.md sections, re-pinned TRUSTED_SCRIPTS_TREE). CI pending — sweep will merge when green. 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 Review findings from docs-currency (read at head ef19510) Docs and changelog describe the Issue Closed Hint deduplication as live, but this PR does not ship it.
Only the refs-sweep half is real here ( Requested change: in the table, mark the Issue Closed Hint row as pending (e.g. "planned — workflow change tracked in #16363, not yet landed") or drop it until the workflow lands; narrow Review findings from Style/maintainability review (head
Advisory (no change required): the script already holds Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. Review findings from Intent-alignment delta re-review (head The delta is a
Requested change: replace Review findings from Correctness review (read at head ef19510; ran
Non-blocking: the helper re-fetches Review findings from Read the diff against the What I verified:
Body vs diff: the body's claims (shared Review findings from Code reads correct to me; the only thing a person needs to settle is the trust-anchor re-pin. What I verified at head
The PR body matches the diff: non-workflow parts only, with the I have not approved or changed anything; this is a comment only. |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Security perspective — approve (advisory). Read at head ef19510.
- Low,
.github/scripts/hive-status-card.sh:38-44—upsertpicks the first comment whose body merely contains MARKER and PATCHes it under the workflow'sissues: writetoken (refs-sweep.yml:32-34). No author filter: a human who quotes<!-- issue-closed-reopen-hint -->in a code block, or anyone who plants the marker, gets their comment overwritten by the bot. Bounded (edit history survives, no privilege gain) and nothing callsupsertin this PR, but the #16363 workflow diff will. Suggest matching only comments from the workflow identity (user.login == github-actions[bot]/performed_via_github_app), else create.
The has skip (src/scripts/comment-merged-refs.sh:180-186) fails open to the old behaviour and uses the same any-commenter body-match the script already relies on for its own marker (~l.160-170), so no new trust regression there.
— hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
docs-currency — delta re-review at 1d8d59d (previous head ef19510)
Delta is a v5 merge plus the TRUSTED_SCRIPTS_TREE re-pin (.github/scripts/integration-governance.cjs, now 6307b555…, matching the head src/scripts tree) — that earlier correctness note is fixed. The docs-currency finding is still present: src/docs/notifications.md was not touched in the delta.
Still present (in-scope): src/docs/notifications.md:598 documents an Issue Closed Hint dedupe that this PR does not ship. The new table row says the workflow "Skips when the card carries issue-close … otherwise edits its earlier comment (<!-- issue-closed-reopen-hint -->)". At this head .github/workflows/issue-closed-reopen-hint.yml:55 still runs gh issue comment … --body-file /tmp/closed-hint.md unconditionally, with no hive-status-card.sh call and no edit path. Only the refs-sweep row is backed by code (src/scripts/comment-merged-refs.sh:180-187). The PR body itself says the workflow edits are posted on #16363 for a maintainer to land, so the docs describe behaviour that will be false on v5 after merge until that follow-up lands.
Requested change: either drop the Issue Closed Hint row (and the "edited in place … stops re-mentioning the reporter" sentence at :600-602) and add it in the maintainer PR that lands the workflow, or mark the row as pending that workflow change with a link to #16363.
— hive: agent=adjudicator-5 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Decision needed: @clubanderson should confirm the TRUSTED_SCRIPTS_TREE re-pin in .github/scripts/integration-governance.cjs (1e72143 → 6307b55) is acceptable; it is the mechanically required pin for this PR's src/scripts edit and I verified it matches git rev-parse 50f23bc:src/scripts.
The change is correct as far as I can verify; it touches the governance verifier, so a maintainer should sign off on the pin bump rather than me.
Trust-surface facts (.github/scripts/integration-governance.cjs:12): TRUSTED_SCRIPTS_TREE moves from 1e72143f… to 6307b555…. 1e72143f… is origin/v5:src/scripts; 6307b555… is 50f23bc:src/scripts — i.e. the new literal is exactly the tree produced by this PR's nine-line edit to src/scripts/comment-merged-refs.sh, which the verifier's own error text (:103) requires. No other line of the verifier changes. Author is the hive App bot (role/trusted).
What I verified on 50f23bc:
- The section key the skip looks for,
<!-- hive:status:section=issue-partial:<pr>, is what the runtime emits:src/pkg/prstatus/prstatus.go:27(sectionOpenPrefix) andsrc/pkg/prstatus/issue.go:23,40(KeyIssuePartialPrefix + pr). src/scripts/comment-merged-refs.sh:180-187: the helper is invoked with the existingGH_BIN(:8) and only when executable; any helper failure (set -euo pipefailin the helper,2>/dev/nullat the call site) evaluates as "not present" and falls through to the pre-existing comment path — so the worst case is today's behaviour, never a dropped note..github/scripts/hive-status-card.sh:17-22relies ongh api --paginate --slurp, which.github/scripts/pr-auto-update.shalready uses, so no newghversion floor.- The
upsertsubcommand is unused by this PR (it is for the workflow edits parked on #16363) — fine as shared groundwork, just noting it has no caller yet.
Body cites Part of #16363 (needs-human: …) and the checks on this head show cancelled/queued rather than red, so nothing in CI to triage.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
…flow change The issue-closed-reopen-hint.yml edit cannot be pushed by the App token and only exists as a diff on #16363, so the table now says the row is pending rather than live. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
…atus-card.sh `has` used to test for `<!-- hive:status:section=<arg>` with no terminator, so `issue-partial:163` matched a card that only carried `issue-partial:1638` and the refs sweep silently skipped its one-per-issue nudge for the wrong PR. Parse the rendered keys (`<!-- hive:status:section=KEY -->`) and require an exact match; an argument ending in `:` keeps prefix semantics (`issue-partial:`). Add positive and negative test cases to test-comment-merged-refs.sh and re-pin TRUSTED_SCRIPTS_TREE for the src/scripts change. Hive-Fix-Attempt: 2/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
…fetched comments - `has` only trusts a hive:status card authored by a Bot account, so a human quoting the card's markers cannot suppress the refs-sweep nudge. - `upsert` only edits a comment by HIVE_COMMENT_AUTHOR (default github-actions[bot]), never a third party's comment containing the marker. - comment-merged-refs.sh passes its already-fetched comments via HIVE_COMMENTS_FILE, removing the second paginated GET per candidate issue. - Tests cover the shared fetch, a human-quoted card, and upsert PATCH/POST with the author filter and HIVE_COMMENT_AUTHOR override. - Narrow the changelog fragment to the refs-sweep behaviour this PR ships; document the author filters and HIVE_COMMENTS_FILE in notifications.md. - Re-pin TRUSTED_SCRIPTS_TREE for the src/scripts change. Hive-Fix-Attempt: 3/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
5060a8c to
8a0a84b
Compare
There was a problem hiding this comment.
Style review (read at head 8a0a84b; the queued head 5060a8c has been rebased since). Section-key format verified against src/pkg/prstatus/prstatus.go:27-29 / issue.go:23; TRUSTED_SCRIPTS_TREE matches HEAD:src/scripts; src/scripts/test-comment-merged-refs.sh passes locally (14 new assertions ok). No blocker — two advisory notes:
-
Helper tests are not run by CI. The
upsert/hascoverage for.github/scripts/hive-status-card.shlives insrc/scripts/test-comment-merged-refs.sh:496-588, and no workflow invokes that file (onlysrc/scripts/test-check-*,test-release-lines-guard.sh,test-check-dco-trailers.share wired). Sibling.github/scripts/*helpers keep a co-locatedtest-*.shrun from.github/workflows/v2-ci.yml:211-227. Since the workflow edit must be landed by a maintainer anyway (#16363), consider folding abash .github/scripts/test-hive-status-card.sh(or the existing sweep test) step into that same diff. -
Silent fail-open.
src/scripts/comment-merged-refs.sh:184-195skips the card check without any log line when the helper is missing/non-executable, and2>/dev/nullon thehascall hides a python/JSON failure as "no card". Fail-open is the right default, but anecho "card check unavailable…"on theelsepath would make a mis-wired checkout visible in the run log. Minor:comments()in the helper (hive-status-card.sh:32-41) re-implements the--slurppage flattening the sweep already has asflatten_json_pages.
— hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Needs a decision, not a merge:
Head: verdict requires_human @8a0a84b, 68/69 checks green, 1 pending, DCO yes, soak 0s of 10m0s. What to do: approve this head ( How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
clubanderson
left a comment
There was a problem hiding this comment.
Owner decision for reviewed head 8a0a84b: approve the intended helper and exact scripts-tree repin. Independently fetched this Git object: 8a0a84b:src/scripts resolves to 9ba1ee4cedf0c05df6d68b5ef905fed8a2924af5, exactly matching TRUSTED_SCRIPTS_TREE. The verifier still checks both prepared source closure and HEAD scripts tree; there is no wildcard or dynamic trust-anchor relaxation. The helper uses exact section matches, reuses fetched comments, and only edits the configured posting identity own comment. Bot-wide card recognition affects notification suppression only, not merge authority. Recheck/repin after any subsequent scripts-tree change. The workflow edits and wiring these helper tests into CI remain explicit follow-through under #16363; this approval does not grant new token permissions or claim that deferred workflow work is deployed.
|
/hive decision approve Approve the helper and exact TRUSTED_SCRIPTS_TREE=9ba1ee4cedf0c05df6d68b5ef905fed8a2924af5 for reviewed head 8a0a84b. Verified against that Git object, not just the displayed literal. Recheck if the scripts tree changes; deferred workflow work remains under #16363. Preserve all normal gates. /lgtm |
|
LGTM label has been added. DetailsGit tree hash: 86fdbec3a82af90de40e008f44cd05f9a71898be |
1 similar comment
|
LGTM label has been added. DetailsGit tree hash: 86fdbec3a82af90de40e008f44cd05f9a71898be |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: clubanderson The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Hive-maintained Actions workflows post comments that repeat what the runtime already says on the
hive:statuscard (the refs sweep note and the author-mentioning/reopenhint seen on #15966 and #15862). Each is changed to skip, or edit its own comment in place, when the card carries the condition, so watchers are not notified twice.This PR ships the non-workflow parts: a shared helper
.github/scripts/hive-status-card.sh(has/upsert), the refs-sweep script skip (src/scripts/comment-merged-refs.sh), a changelog fragment, and a new notifications.md section listing the workflows and documenting that external bots (Prow, tide, kubestellar-prow) are outside Hive's control. The section is appended, so it does not conflict with #16351.Part of #16363 (needs-human: the .github/workflows/* edits cannot be pushed by the App token; the ready-to-apply diff is posted on the issue for a maintainer to land)
Part of #16270
— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88