diff --git a/changelog.d/fixed-advisory-checklist-autoclose.md b/changelog.d/fixed-advisory-checklist-autoclose.md new file mode 100644 index 0000000000..1b59437c0d --- /dev/null +++ b/changelog.d/fixed-advisory-checklist-autoclose.md @@ -0,0 +1 @@ +- Hive advisory checklists (the dedupe agent's `` issues) are now worked by the hive itself: the close-on-merge sweep ticks each `- [ ] #N …` item as #N closes or merges and closes the advisory as completed once every item is resolved (`dedupe.advisory_autoclose`, default on); the Activity Monitor never parks an advisory at 045 (chip *Advisory · hive is working the items (k/N resolved)*, optional **Close now** lead); and the delegated-decision plan for issues says *Approve the direction of #N and let the hive pick it up* (or, for an advisory, *Close the advisory* / *Keep open; hive is working k/N items*) instead of the PR merge-queue wording (#15754) diff --git a/src/cmd/hive/close_on_merge_sweep.go b/src/cmd/hive/close_on_merge_sweep.go index 0ddeded022..e00393f2f3 100644 --- a/src/cmd/hive/close_on_merge_sweep.go +++ b/src/cmd/hive/close_on_merge_sweep.go @@ -106,10 +106,11 @@ func closeOnMergeOptionsFor(cfg *config.Config, logger *slog.Logger, now func() decision := trustedAuthorFunc(cfg)(login, cfg.AutoMerge.TrustedAuthors.EffectiveRequireRole()) return decision.Allowed }, - RecheckAfter: cfg.Issues.EffectiveCloseOnMergeRecheck(), - Now: now, - LabelDriven: cfg.RepoLabelDriven, - RepoOnGitHub: cfg.RepoOnGitHub, + RecheckAfter: cfg.Issues.EffectiveCloseOnMergeRecheck(), + Now: now, + LabelDriven: cfg.RepoLabelDriven, + RepoOnGitHub: cfg.RepoOnGitHub, + AdvisoryAutocloseOff: !cfg.Dedupe.AdvisoryAutocloseEnabled(), } } diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index c82943212d..398c45bfa3 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -318,7 +318,9 @@ A row that already wears a hold, `blocked`, a draft marker or any stage record i #### Advisory row (`triage/advisory`, dedupe checklists) -An issue that is a note for maintainers rather than work — one wearing `triage/advisory`, a dedupe-agent checklist (body opens with ``) or any body whose verdict line reads `Decision required: no` — is an **advisory** ([#15381](https://github.com/hivecommons/hive/issues/15381) sat for hours as a plain *Open · since 3h*, indistinguishable from stalled work). Its row keeps `kind: issue` and carries `advisory{kind: "advisory", source (label|dedupe-checklist|decision-no), empty, chip, caption}`; the Open chevron reads the chip — **Advisory · read & close**, or **Advisory · nothing found · safe to close** when the checklist's own counts are all zero — muted (`ham-open-advisory`, ⓘ), with no *· since Nh* suffix and never the stale tint. The caption is *Advisory for maintainers · read, then close* (or *… · nothing found · safe to close*), the actor is a human with nothing waiting on them, the row is never *New*, never *stalled* or *sent back*, and it is excluded from **Needs human** and **Needs attention**. The row menu leads with **Close (read)**, which posts the existing `POST /api/repos/{owner}/{repo}/items/{number}/decision` with `decision: close-read`: a "Closed as read (advisory acknowledged) by @you from the Hive dashboard" comment, then the issue closes as *completed* (operator action `close-read` in the row's history). +An issue that is a note for maintainers rather than work — one wearing `triage/advisory`, a dedupe-agent checklist (body opens with ``) or any body whose verdict line reads `Decision required: no` — is an **advisory** ([#15381](https://github.com/hivecommons/hive/issues/15381) sat for hours as a plain *Open · since 3h*, indistinguishable from stalled work). Its row keeps `kind: issue` and carries `advisory{kind: "advisory", source (label|dedupe-checklist|decision-no), empty, resolved, total, chip, caption}`; the Open chevron reads the chip — **Advisory · read & close**, **Advisory · nothing found · safe to close** when the checklist's own counts are all zero, **Advisory · hive is working the items (k/N resolved)** when the body has `- [ ]` task lines and some are still open, or **Advisory · all items resolved · closing** once every line is ticked — muted (`ham-open-advisory`, ⓘ), with no *· since Nh* suffix and never the stale tint. The caption matches the chip, the actor is a human with nothing waiting on them, the row is never *New*, never *stalled* or *sent back*, and it is excluded from **Needs human** and **Needs attention**. + +An advisory is **never parked on a person** ([#15754](https://github.com/hivecommons/hive/issues/15754): #15734 sat at 045 *Needs human decision* while the hive itself had already resolved most of its checklist). Whatever its verdict line or labels say, the tracker drops the 045 stage, the `needs-human` / `needs-decision` pills, the decision block and the blocker from an advisory row. The checklist is the hive's own work: the close-on-merge backfill ticks each `- [ ] #N …` line as #N closes or merges (one body edit per sweep, idempotent), and once every line is ticked it comments *All N items resolved (#a closed, #b merged …) — closing this advisory.* and closes the issue as *completed*. A checklist still carrying open items expires after seven days. `dedupe.advisory_autoclose: false` turns the sweep off. The row menu leads with the optional **Close now**, which posts the existing `POST /api/repos/{owner}/{repo}/items/{number}/decision` with `decision: close-read`: a "Closed as read (advisory acknowledged) by @you from the Hive dashboard" comment, then the issue closes as *completed* (operator action `close-read` in the row's history); on a checklist the hive is still working its hint reads *optional · hive is working k/N items; close anyway*. **Let hive decide** on an advisory plans `would: close` (rule `advisory-resolved`, closes as completed) once its items are resolved, or a no-write *Keep open; hive is working k/N items* (rule `advisory-in-progress`) while they are not — and on an ordinary parked issue the default-approve plan reads *Approve the direction of #N and let the hive pick it up*, not the PR's merge-queue wording. The enumeration computes the body-derived part (`RepoWorkIssue.advisory`) because sidelined `hive_advisory` rows do not carry the body. Upstream, the issue-request relay refuses an agent's `issue-create` whose body is a dedupe checklist with no actionable finding (verdict `no`, zero near-duplicate pairs, zero resolved candidates, zero missing PR↔issue links, no `- [ ]` task lines): the agent's result file says why, the write audit records `agent_issue_empty_advisory_refused`, and a knowledge bead keeps the summary in the hive's own log — merge-order reminders and cross-links are notes, not issues. @@ -358,7 +360,7 @@ Plain words throughout — working / waiting on X / set back by Y / merged — n #### The row's lead action, inline -A row whose next move is yours does not hide its answer behind three dots. Beside the chips on the right of the header (and on a nested PR sub-row's own header), the row renders its **lead action** as a real `