Skip to content

πŸ› Advisory issues: skip empty dedupe checklists, show as advisory in tracker - #15418

Merged
clubanderson merged 1 commit into
v5from
fix/advisory-issue-noise
Oct 29, 2026
Merged

clubanderson merged 1 commit into
v5from
fix/advisory-issue-noise

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #15415

Owner: "why is this sitting open and not actionable for 3h?" β€” about #15381, a dedupe checklist with 0 near-duplicate pairs, 0 missing links, one merge-order reminder already declared in the PR body and one cross-link note. The Activity Monitor showed it as Open Β· since 3h.

Owner's rule, verbatim: "if something is advisory then the chevron should say advisory instead of open."

1. Don't file empty advisories

  • dedupe-issues.md (defaults + src/policies copy): a new checklist needs at least one action-required row (near-duplicate pair, resolved candidate, missing PR↔issue link, consolidation close β€” each a - [ ] task line). Merge-order reminders, cross-links and "checked, not duplicates" are notes β†’ kick output only.
  • Go-side guard in the issue-request relay (pkg/github/issue_request_watcher.go, before the prior-art verdict, inside the existing gate β€” no new direct writer): issue-create is refused for a hive:dedupe-checklist body whose verdict is no, all counts are zero and there are no task lines. Result file explains, audit action agent_issue_empty_advisory_refused, the summary is kept as a knowledge bead.
  • ParseDedupeChecklistFindings unit-tested on triage: duplicate and overlapping open issues/PRs to consolidateΒ #15381's real body (testdata/dedupe_checklist_15381.md): Actionable() == false.

2. Advisory issues look like advisories in the tracker

  • stage_tracker_advisory.go: triage/advisory label, the dedupe marker, or a Decision required: no body line β†’ item.advisory{kind:"advisory", source, empty, chip, caption}.
  • First chevron reads Advisory Β· read & close, or Advisory Β· nothing found Β· safe to close when the body reports zero findings β€” never Open Β· since Nh. No stale tint. Caption "Advisory for maintainers Β· read, then close" / "… nothing found Β· safe to close".
  • Not counted as New, stalled, attention or needs-human (Go accounting + tracker-filter.js).
  • Row menu leads with Close (read) β†’ existing POST /api/repos/{o}/{r}/items/{n}/decision, new verb close-read (closes as completed with an acknowledgement comment; 400 for PRs).
  • Tests: TestStageTrackerAdvisory{For,Row,ChipAndAction} (node harness asserts the chevron starts with Advisory and never says Open Β· since), TestRepoItemDecisionCloseReadClosesAsCompleted, operator-action mapping.
  • Docs: src/docs/dashboard-sections.md "Advisory row"; changelog.d/fixed-advisory-issue-noise.md.

SPA regenerated with go generate ./pkg/dashboard/...; static/index.html committed.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 29, 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 hanthor 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 050-review-pending: required-check-pending:build-and-test

@github-actions

github-actions Bot commented Oct 29, 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
#15426 ✨ tracker: show who holds a claimed item on the chevron and hover same files src/docs/dashboard-sections.md
src/docs/scale-envelope.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
src/pkg/github/client.go
#15424 πŸ› tracker: name the clanker's owner on returned rows; flag superseded contributor PRs same files src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static-src/js/tracker-actions.js
src/pkg/dashboard/static-src/js/tracker-words.js
src/pkg/dashboard/static/index.html
#15429 ✨ governor: merge-hotspot advisor files modularize issues for the ci-maintainer same files src/pkg/dashboard/static/index.html
#15425 ✨ feature: show local claim holders in tracker same files src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15427 ✨ tracker: merge queue position on the chevron, stable wording, stall warning same files src/docs/dashboard-sections.md
src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/static-src/css/tracker.css
src/pkg/dashboard/static-src/js/tracker-filter.js
src/pkg/dashboard/static-src/js/tracker-words.js
src/pkg/dashboard/static/index.html
#15307 πŸ› fix: refuse workflow-changing fork rebase follow-through same files src/pkg/dashboard/api_repo_item_decision_test.go
#15400 πŸ› fix: keep merge queue position visible during sweeps same files src/pkg/dashboard/static-src/js/tracker-words.js
src/pkg/dashboard/static/index.html
#15417 πŸ› fix: refuse empty dedupe advisory filings CONFLICT src/pkg/github/attribution.go
src/pkg/policies/defaults/dedupe-issues.md
src/policies/dedupe-issues.md

…tracker

The dedupe lane filed #15381 with zero actionable findings; the Activity
Monitor rendered it as 'Open Β· since 3h', indistinguishable from stalled
work.

- Prompt: only action-required rows (near-duplicate pair, resolved
  candidate, missing PR<->issue link, consolidation close) justify a new
  checklist; merge-order reminders and cross-links are kick output.
- Relay guard: the issue-request watcher refuses issue-create for a
  dedupe-checklist body whose verdict is 'no' with all-zero counts and
  no task lines; audit agent_issue_empty_advisory_refused, bead keeps
  the summary. Parser unit-tested on #15381's real body.
- Tracker: triage/advisory label, dedupe marker or 'Decision required:
  no' classifies the row as advisory. Chevron says 'Advisory Β· read &
  close' or 'Advisory Β· nothing found Β· safe to close' instead of
  'Open Β· since Nh'; not counted as New/stalled/attention/needs-human;
  row menu leads with 'Close (read)' via the existing items decision
  endpoint (new verb close-read, closes as completed).

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson force-pushed the fix/advisory-issue-noise branch from 1095e7e to 5a6045d Compare October 29, 2026 15:58
@hivecommons-hive

Copy link
Copy Markdown
Contributor
5a6045d

ℹ️ Sentinel notice β€” informational; author is trusted (owner), merge is not blocked

Hive flagged this PR (author @clubanderson, head 5a6045dcff4c) because it matches behaviors that can override security controls, escalate privileges or damage the codebase. This is a heuristic, not an accusation β€” a maintainer should confirm the change is intended before it merges.

  • sensitive_path β€” changes 3 sensitive path(s) (Touches a sensitive path (OWNERS, workflows, policies, hive config, security docs, …))
    • src/pkg/policies/dedupe_policy_test.go
    • src/pkg/policies/defaults/dedupe-issues.md
    • src/policies/dedupe-issues.md

Hive did not add the sentinel-alert label because this author is trusted. The finding remains recorded for audit and the dashboard Security tab; set sentinel.trusted_authors_block: true to require the blocking label for trusted authors too.

@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.

Decision needed: @clubanderson should decide whether #15417 (the earlier partial fix for #15415, Refs #15415) is closed as superseded by this PR, or whether this PR adopts #15417's stricter policy wording that forbids advisory-only checklists entirely (this PR still permits them for in-place edits).

Overlaps and conflicts with #15417 β€” both fix #15415, both labelled conflicts-with-open-pr, and they cannot both merge as-is.

I read both diffs in full. Same semantic change at the same hunk sites in four files:

  • src/pkg/github/attribution.go:48 β€” both add AuditActionAgentIssueEmptyAdvisoryRefused = "agent_issue_empty_advisory_refused" (identical constant, different comment text β†’ textual conflict).
  • src/pkg/github/issue_request_watcher.go:555 β€” both insert the empty-dedupe-checklist refusal immediately before the prior-art verdict, with the same terminal sequence (recordWriteAudit β†’ writeIssueResult β†’ os.Remove β†’ issueClearRetry). #15417 uses emptyDedupeAdvisory(req.Body); this PR uses ParseDedupeChecklistFindings(body).Actionable().
  • src/pkg/policies/defaults/dedupe-issues.md:205-245 and src/policies/dedupe-issues.md β€” same "no action rows β†’ file nothing" rule.
  • src/pkg/policies/dedupe_policy_test.go:58-67 β€” different asserted strings.

Where they differ in a way that matters: #15417 deletes the --label triage/advisory filing path and asserts "Do not create an advisory-only checklist"; this PR keeps that path for a checklist edited in place whose action rows have all closed (dedupe-issues.md:248-250). Those are two different policies, so this is a conflict, not a pure duplicate.

This PR is the broader one: it closes #15415 (the tracker Advisory chevron, close-read decision verb, and attention/needs-human accounting that #15417 explicitly leaves "to be implemented"). I would keep this one and close #15417 as superseded β€” but #15417 is a fork contributor's PR, so that is a maintainer's call. I have not closed anything.

Correctness read (tree at eb61710): ParseDedupeChecklistFindings reuses the existing parseDedupeChecklist/htmlCommentPattern from dedupe_advisory_close.go:36,55; NeedsHuman/NeedsAttention are computed in the post-pass (stage_tracker.go:2365, :2414) after applyStageTrackerAdvisory runs, so the it.Advisory != nil short-circuits take effect. The count regexes match the policy's own Summary template (dedupe-issues.md:124-125) and the #15381 testdata body. Nothing defective found; the build (linux/arm64) check shows no conclusion yet and tide is pending.

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

@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.

Decision needed: @clubanderson should decide whether #15418 supersedes #15417 (close #15417) or #15417 lands first and #15418 rebases onto it β€” they conflict in src/pkg/github/attribution.go and issue_request_watcher.go and disagree on whether advisory-only checklists may exist at all.

Conclusion: the relay half of this PR overlaps #15417 (@Karibhou) byte-for-byte in intent and position, and the two cannot both merge as-is. The code here builds and the parser logic checks out; the open question is which PR survives.

Verified overlap (read both diffs in full):

  • Both add the constant AuditActionAgentIssueEmptyAdvisoryRefused = "agent_issue_empty_advisory_refused" at the same spot in src/pkg/github/attribution.go (after AuditActionAgentIssuePriorArtRefused, ~line 47). Whichever lands second gets a textual conflict there, and a hand-resolved union would be a duplicate const.
  • Both insert a terminal "empty dedupe advisory" refusal at the top of the kind == "issue" branch in handleOneIssueRequest (src/pkg/github/issue_request_watcher.go:~555), writing the same IssueResponse{OK:false} / os.Remove / issueClearRetry sequence. #15417 does it via emptyDedupeAdvisory(req.Body) (regex counts); this PR via ParseDedupeChecklistFindings(body).Actionable(), which reuses the existing parseDedupeChecklist marker/verdict parse in dedupe_advisory_close.go:55 β€” the better anchor, since the marker check is already the hive's definition of "is a checklist".
  • Both rewrite the same two paragraphs of src/pkg/policies/defaults/dedupe-issues.md (and the src/policies/ mirror).

Where they are not duplicates β€” this is the decision:

  • #15417 deletes the "advisory-only checklist β†’ file with triage/advisory" section and the gh issue create --label triage/advisory snippet outright ("Do not create an advisory-only checklist").
  • This PR keeps advisory-only as a legitimate state ("only ever the result of editing an existing checklist in place whose action rows have all since closed") and adds the dashboard side: RepoWorkIssue.Advisory (client.go:~4636), IssueAdvisoryFromBody, stage_tracker_advisory.go, and the exported DedupeAdvisoryLabelName (standing_issues.go:~23) so the tracker chevron reads Advisory instead of Open. #15417 has none of that.

So #15418 is a superset on the relay + UI, but the two PRs state opposite policy on whether triage/advisory issues exist. If this one is the intended direction, #15417 should close rather than be rebased; if #15417's "never file advisory-only" is the rule, this PR's advisory chevron is drawing a state the policy says must not occur.

Correctness notes on this PR (read against the v5 tree):

  • withParentMarker (decomposed_parents.go:90) appends the parent marker, so the dedupe marker stays on line one and parseDedupeChecklist's HasPrefix check still fires on the post-marker body. Good.
  • Actionable() treats Decision required: yes as actionable even with zero counts, and the delta phrasing the policy recommends ("+2 near-duplicates") still matches \b(\d+)\s+near-duplicate β€” errors land on the "file it" side, which is the right default.
  • go build ./pkg/github/ ./pkg/dashboard/ ./pkg/policies/ at 5a6045d succeeds; CI test/coverage/Dashboard Lint are green.

I have not closed or changed anything; flagging for the maintainer to pick a survivor.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission β†’ 050-review-pending: review-gate:no-review-bundle

@clubanderson
clubanderson merged commit e0f8bd9 into v5 Oct 29, 2026
77 of 78 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/advisory-issue-noise branch October 29, 2026 16:15
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

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 dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dedupe advisory with zero findings is filed as an issue and shows as stalled work in the tracker

1 participant