diff --git a/changelog.d/fixed-18387-needs-triage-relabel-loop.md b/changelog.d/fixed-18387-needs-triage-relabel-loop.md new file mode 100644 index 0000000000..16d06202b7 --- /dev/null +++ b/changelog.d/fixed-18387-needs-triage-relabel-loop.md @@ -0,0 +1 @@ +- **The hive no longer fights a repository's own triage tooling over `needs-triage`.** Once an issue was claimed or covered by a pull request (020, 030, 040) the issue stage sweep took `needs-triage` off on every pass, so in a repository whose own tooling owns that label — Prow's `require-matching-label` action re-adds it to every issue without a `triage/*` label — the two removed and re-added it without end: 312 removals on 16 `projectbluefin/utah` issues in one night, each also starting a GitHub Actions run there. The hive now removes the label at most once per issue; if anything puts it back (another tool or a person), it leaves it on that issue from then on, logs one INFO line naming the repo, issue and label, and remembers the yield in the stage store, so a restart does not restart the loop. Issues whose label never comes back — hive-filed self-reports included — lose a stale `needs-triage` once claimed exactly as before ([#18387](https://github.com/hivecommons/hive/issues/18387)). diff --git a/src/docs/dashboard-sections/activity-monitor.md b/src/docs/dashboard-sections/activity-monitor.md index 82ddea591f..916e0b6435 100644 --- a/src/docs/dashboard-sections/activity-monitor.md +++ b/src/docs/dashboard-sections/activity-monitor.md @@ -142,7 +142,7 @@ A draft PR (GitHub draft bit or `do-not-merge/work-in-progress`) reads **Draft An Open issue waiting on a maintainer's triage reads **Triage needed · since 28m** — the `needs-triage` chip, or a 000-new row the reporter-trust gate holds (`new.next_mover: maintainer`, triage gate *next*) before the awaiting label has landed; the server stamps the `needs-triage` modifier on such a row so the chevron word, the chip and the inline **Accept triage** lead are the same as the label case ([#15437](https://github.com/hivecommons/hive/issues/15437) read *New · since 28m* with the ask only in the caption). The caption is exactly **Triage needed — accept or close** on every held row (015 and 000-new alike — the 015 lane reason `triage needed: carries needs-triage` is not appended, so the row does not say *triage* three times); the chevron hover keeps the next-mover / next-pass narration and the gate list. -At most one health chip sits over the strip's cap, with `+N` for the rest: `stalled`, `regressed`, `hold`, `needs-human`, `needs-decision` (“needs human decision”), `needs-triage` (“triage needed”), `needs-rebase`, `blocked` or `draft`. At 015 the chevron already names triage; before claim, a lingering `needs-triage` can be a chip (010/017/045). At 020+ it is stale and omitted from chip/stage text: `stale_labels` supplies a muted *Stale label* tooltip until the sweep removes it ([#14586](https://github.com/hivecommons/hive/issues/14586)). +At most one health chip sits over the strip's cap, with `+N` for the rest: `stalled`, `regressed`, `hold`, `needs-human`, `needs-decision` (“needs human decision”), `needs-triage` (“triage needed”), `needs-rebase`, `blocked` or `draft`. At 015 the chevron already names triage; before claim, a lingering `needs-triage` can be a chip (010/017/045). At 020+ it is stale and omitted from chip/stage text: `stale_labels` supplies a muted *Stale label* tooltip until the sweep removes it ([#14586](https://github.com/hivecommons/hive/issues/14586)). The sweep removes it once; if anything puts it back, the hive leaves it on that issue and the tooltip stays ([#18387](https://github.com/hivecommons/hive/issues/18387)). A genuine backward hop sets `regressed`; the first forward hop clears it. Lapsed claims 020→010, 030↔020 flicker and 040→010 after a partial merge are not regressions. A regression parked on a person is red. Otherwise it is a muted dashed **stage reset** — **stage reset by push** when a new head caused the fall ([#17335](https://github.com/hivecommons/hive/issues/17335)) — yields to other modifiers and does not enter **Needs attention**: “the hive is handling it — no action needed; clears on the next forward step.” See [The regressed marker](../labels-and-control-signals.md#the-regressed-marker-when-it-is-set-when-it-clears). diff --git a/src/docs/labels-and-control-signals/reference.md b/src/docs/labels-and-control-signals/reference.md index c602e1381c..e9a8073219 100644 --- a/src/docs/labels-and-control-signals/reference.md +++ b/src/docs/labels-and-control-signals/reference.md @@ -882,7 +882,7 @@ On by default (`governor.first_timer_welcome.enabled: false` opts out), hive lea With `reporter_trust.enabled: true`, an issue whose reporter's GitHub `author_association` is outside the trusted set (default `OWNER`, `MEMBER`, `COLLABORATOR`) and whose login is not in `trusted_logins` is not actionable until it carries one of these labels. On the first excluded scan, core `github.Client.fetchIssues` posts one marked explanation comment and applies `needs-triage` (or `awaiting_label`); later scans do not repeat the comment. This is a poller-side write, not an agent prompt, and is capped at 10 new notices per poll. -When the triage label appears, the same poll loop removes `needs-triage` only if the marker records that Hive added it, then the issue enters the backlog. Independently of the marker, the stage sweep removes `needs-triage` once the issue reaches 020 or later (claiming settles triage; see `stage/015-triage-needed` below) — this is what retires the `needs-triage` that `fleetreport` stamps on hive-filed self-reports at filing. Trusted reporters' issues pass untouched. +When the triage label appears, the same poll loop removes `needs-triage` only if the marker records that Hive added it, then the issue enters the backlog. Independently of the marker, the stage sweep removes `needs-triage` once the issue reaches 020 or later (claiming settles triage; see `stage/015-triage-needed` below) — this is what retires the `needs-triage` that `fleetreport` stamps on hive-filed self-reports at filing. It does so at most once per issue: if anything puts the label back afterwards (a repository's own triage tooling, such as Prow's `require-matching-label` action, or a person), the hive leaves it on that issue from then on and logs one line saying so (hivecommons/hive#18387). The label coming back is only judged while the issue sits at 020 or later, so a claim released back to 015 does not count. The yield lives on the issue's stage record: an issue that drops out of staging entirely (closed, or no stage derived) loses that record, and if it re-enters staging the hive may remove the label once more. Trusted reporters' issues pass untouched. Runs after holds/exempts and before `require_labels`, so the ordinary allow-list still applies afterwards. Hive- and bot-filed issues are not judged here (#5117 owns them). Counted as "needs triage" on the repo card, not as a generic filter refusal. diff --git a/src/docs/labels-and-control-signals/stage-labels.md b/src/docs/labels-and-control-signals/stage-labels.md index 1f4d4cb444..2cfbfc4d61 100644 --- a/src/docs/labels-and-control-signals/stage-labels.md +++ b/src/docs/labels-and-control-signals/stage-labels.md @@ -93,7 +93,7 @@ referenced it) a lone `stage/050-review-pending` | Label | Applies to | Meaning | Expected dwell (then `stage/stalled`) | |---|---|---|---| | `stage/010-actionable` | issue | triaged; eligible for the hive to pick up. A human-filed issue without `needs-triage` counts as triaged by its trusted reporter | 24h | -| `stage/015-triage-needed` | issue | actionable, but no maintainer has looked at it yet. Derived instead of 010 only when the reporter-trust gate is holding the issue: it carries the awaiting label `needs-triage` (`reporter_trust.awaiting_label` default) or sits in the #9665 gate's `reporter_triage` bucket. Who filed it is never consulted — issues from hive agents and from trusted humans are triaged by construction and stay 010. A **display and tracking state, not a gate**: the scanner and relay claim a 015 issue exactly as a 010 one (the reporter-trust gate withholds `needs-triage` issues separately, and that is unchanged), and 015 lights the activity monitor's *Actionable* column as "Triage needed". `015 → 010` (a maintainer triages) is never a regression; `010 → 015` is a reclassification. Because 015 is not a gate, a claim settles triage: whenever the sweep (or an out-of-cycle claim fact) writes a stage of 020 or later — 020, 030, 040 or a PR-mirrored stage — it removes `needs-triage` in the same label write, and an open issue already at 020+ still wearing it is reconciled on the next sweep; the label survives at 010, 017, 018 and 045, which the table lets fall back to 015 (hivecommons/hive#14586). The Open column is untouched: an issue with no stage stays "Open" | 24h | +| `stage/015-triage-needed` | issue | actionable, but no maintainer has looked at it yet. Derived instead of 010 only when the reporter-trust gate is holding the issue: it carries the awaiting label `needs-triage` (`reporter_trust.awaiting_label` default) or sits in the #9665 gate's `reporter_triage` bucket. Who filed it is never consulted — issues from hive agents and from trusted humans are triaged by construction and stay 010. A **display and tracking state, not a gate**: the scanner and relay claim a 015 issue exactly as a 010 one (the reporter-trust gate withholds `needs-triage` issues separately, and that is unchanged), and 015 lights the activity monitor's *Actionable* column as "Triage needed". `015 → 010` (a maintainer triages) is never a regression; `010 → 015` is a reclassification. Because 015 is not a gate, a claim settles triage: whenever the sweep (or an out-of-cycle claim fact) writes a stage of 020 or later — 020, 030, 040 or a PR-mirrored stage — it removes `needs-triage` in the same label write, and an open issue already at 020+ still wearing it is reconciled on the next sweep; the label survives at 010, 017, 018 and 045, which the table lets fall back to 015 (hivecommons/hive#14586). The hive removes it at most once per issue: if anything puts it back (a repository's own triage tooling such as Prow's `require-matching-label`, or a person), the hive leaves it on that issue from then on, logs that once, and remembers the yield across restarts (hivecommons/hive#18387). The Open column is untouched: an issue with no stage stays "Open" | 24h | | `stage/017-possible-existing` | issue | **Possibly exists · needs author.** The prior-art gate found something that looks like the request already (knowledge bead, setting, merged PR, closed issue, doc or code) and parked the issue with the findings; the author confirms the gap (`/hive decision proceed — `) or closes it (`/hive decision exists`, label `already-exists`). The label itself is the park signal and an issue-level hard suppress, so no agent claims it; clanker-filed parks auto-close after `runs.triage.prior_art.bot_close_ttl`; hive-filed issues never wear it ([#13575](https://github.com/hivecommons/hive/issues/13575)) | none | | `stage/018-open-for-discussion` | issue | **Open for discussion.** An open issue labelled `proposal`, `kind/design` or `architecture discussion` with no live claim, or an unlabelled one whose title opens with `[RFC]` or `RFC:` (case-insensitive, after any leading emoji): what is left on it is a discussion, not agent work, so it is derived here instead of 010 / 015 and the activity monitor's *Actionable* column reads "Open for discussion", the caption naming the label. The stage reason is `open for discussion: