Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixed-clear-needs-triage-on-claim.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Stage labels: `needs-triage` is now removed in the same label write that moves an issue to 020-claimed or later (including a direct claim from 015), open issues already claimed and still wearing it are reconciled on the next sweep, and the Hive activity monitor no longer reads a stale `needs-triage` as "Triage needed" on a claimed row β€” it shows the stage and lists the leftover label as `stale_labels` in a muted tooltip line (#14644).
2 changes: 1 addition & 1 deletion src/docs/dashboard-sections.md

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/docs/labels-and-control-signals.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Some hive-authored labels look like provenance but are read as signals, so they
| `hive/<hive-id>` (**retired**, #12539) | Issues, PRs | None | Formerly marked which hive filed or touched an item. Replaced by the `<!-- hive:origin hive=<hive-id> at=… -->` marker `bin/gh-wrapper.sh` appends after the identity footer (`**Instance:** \`<hive-id>\``) on every body it injects; `github.OriginHive` reads the marker and falls back to a leftover label. Fleet reports name the hive in `<!-- hive:selfreport … hive=… -->`, the seen-marker comment and the `Affected hives` block; claim markers carry `hive=`. Never a hold (#9371). | None | Nobody (was: `gh-wrapper.sh`, self-report joiner, hub relay) | β€” | `Client.RetireHiveIDLabels` runs at every boot until clean: strips the label from open items, deletes the definition once nothing open carries it, writes `/data/hive-id-label-retire-<hive-id>.json` and a `.done` marker | Hive id (`src/pkg/github/origin_marker.go`, `src/pkg/github/hive_id_label_retire.go`) |
| `hold` from ACMM level gate | PRs | PR-request watcher, self-authored auto-merge release | Agent PRs at L3-L5 get literal `hold`; `outreach` PRs whose target repo is not one the hive manages (cross-repo outreach) are held at every level, while same-repo outreach PRs follow the level. The watcher, not the policy prompt, applies it from the PR's target repo (`config.AgentOwnsRepo`). | Hard merge gate | Hive App | PR creation, later self-authored auto-merge release | Auto-release only when current policy no longer requires the level hold, latest hold event was by the App, and the release path runs; otherwise a human removes it | Hive-wide ACMM and agent (`src/pkg/github/pr_request_watcher.go:452-524`, `src/pkg/github/pr_level_hold.go:16-124`) |
| `hold` from #5117 self-authorization | PRs | PR-request watcher and self-authorization release | A PR whose only rationale is unacknowledged hive-filed issues gets literal `hold`. Acknowledging the issue later does not remove an existing PR hold by itself. At ACMM L6 (Autonomous), the unset default is off; lower levels default on. | Hard merge gate | Hive App | PR creation; evaluated only when no level hold applies | Acknowledge the issue and remove the PR `hold`; disabled policy release can remove Hive's own hold. At L6, that release path also clears existing Hive-applied #5117 holds when no explicit config keeps the policy on. | `github.self_authorization_hold`, per-repo `project.repo_policies[].self_authorization_hold`, `HIVE_SELF_AUTHORIZATION_HOLD` (`src/pkg/github/pr_self_authorization.go:14-226`, `src/pkg/github/pr_request_watcher.go:452-524`) |
| `triage/accepted` (or `project.issue_filter.reporter_trust.untrusted_require_labels`); `needs-triage` while waiting | Human-filed issues from untrusted reporters | GitHub enumeration | 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. 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. | Hard admission gate (off by default) | Human; Hive App for the visibility comment/label | Enumeration | Add the label, trust the login or association under **Settings β†’ Labels β†’ Reporter trust**, or disable the gate | `project.issue_filter.reporter_trust.{enabled,trusted_associations,trusted_logins,untrusted_require_labels,awaiting_label,comment}` (`src/pkg/config/reporter_trust.go`, `src/pkg/github/client.go` `fetchIssues`) |
| `triage/accepted` (or `project.issue_filter.reporter_trust.untrusted_require_labels`); `needs-triage` while waiting | Human-filed issues from untrusted reporters | GitHub enumeration | 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. 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. | Hard admission gate (off by default) | Human; Hive App for the visibility comment/label | Enumeration | Add the label, trust the login or association under **Settings β†’ Labels β†’ Reporter trust**, or disable the gate | `project.issue_filter.reporter_trust.{enabled,trusted_associations,trusted_logins,untrusted_require_labels,awaiting_label,comment}` (`src/pkg/config/reporter_trust.go`, `src/pkg/github/client.go` `fetchIssues`) |
| `hold` from #9665 reporter trust | PRs | PR-request watcher, level-hold release | A PR whose rationale (closing or referencing links, or the request's declared issues) traces to an issue filed by an untrusted reporter gets literal `hold` at **every** ACMM level, including L6, plus `needs-human` (so it surfaces as waiting on a person, #10773) and a marked notice naming the untrusted reporter and stating the PR itself was authored by the hive. Any one untrusted citation holds. Evaluated even at hold-gated levels, because the notice is what stops promotion to L6 from releasing the label. | Hard merge gate | Hive App | PR creation; re-checked by the level-hold release path | A human removes `hold`. Hive never auto-releases it: the release sweep sees the notice (or re-evaluates and re-posts it) and leaves the label. Holdguard re-holds on a new head SHA. | `github.reporter_trust_hold` (nil follows `reporter_trust.enabled`), per-repo `project.repo_policies[].reporter_trust_hold`, `HIVE_REPORTER_TRUST_HOLD` (`src/pkg/github/pr_reporter_trust.go`, `src/pkg/github/pr_level_hold.go`) |
| `project.repo_policies[].auto_merge: false` | PRs | `hive-merge` relay, App self-authored auto-merge sweep, proxy | Below L6 this resolves off for every repo; at L6, PRs can still be opened, reviewed and held when the per-repo switch is off, but Hive refuses every merge path for that repo. Existing `hold` / `hive-pause/<hive-id>` labels stay put because the disabled repo is skipped before hold release or merge. | Hard merge gate | Operator/dashboard | Merge relay request, self-merge sweep tick, proxy direct merge attempt | Dashboard repo-card switch or config edit sets `auto_merge: true`/removes the override at L6; enabling is rejected below L6 | `project.repo_policies[].auto_merge` (`src/pkg/config/repo_policy.go`, `src/pkg/agent/manager_modes.go`, `src/pkg/github/automerge/automerge_sweep.go`, `src/pkg/proxy/rules.go`) |
| `hold` from holdguard | PRs | Holdguard ledger | If the head SHA changes while held, lifting the hold causes Hive to comment and re-apply literal `hold`; the next human removal is the fresh approval. Exception (#13603): when a human (not a Hive account, not a bot) removed the gate label after the current head arrived on the branch, they reviewed the current head, so the lift clears without a comment or re-hold. The head is accepted only on evidence a contributor cannot forge: the server-stamped `head_ref_force_pushed` timeline event that produced it (dated before the lift), or the hive itself having observed that exact head on the PR while the gate was still on (`observed_held_head_sha` in the holdguard ledger). Commit committer dates and SHA-keyed `check_suite` / `status` times are never used; a push after the lift, or a head the hive never saw while held, still re-holds. | Hard merge gate | Hive | Governor holdguard pass | Human removes the re-applied hold | Built-in `holdguard.ReHoldLabel` (`src/pkg/holdguard/holdguard.go:1-43`) |
Expand Down Expand Up @@ -214,7 +214,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. 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 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/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 β€” <gap>`) 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/020-claimed` | issue | a live claim by anyone β€” a human, a relay contributor or a hive agent's `hive-open-issue claim` / start mark β€” with no PR evidence yet (replaces `claimed`, `hive/in-progress`) | 2h |
| `stage/030-pr-in-progress` | issue | the claimant has a PR under way: its `hive-open-pr --issues` request named the issue or its start marker named a branch / PR (`pr_started=true` on the `hive:claim` marker). A claim or start mark without that evidence β€” the scanner's bare `hive-open-issue claim` included β€” stays at 020 ([#13069](https://github.com/hivecommons/hive/issues/13069)). If the in-progress evidence includes an open Hive-authored PR, the issue-stage lane applies the same PR-link safeguard described for 040: default-branch PRs that fully address the issue get a `Fixes #N` trailer when missing, while partial or non-default-branch PRs get an issue stage-entry comment linking the PR and explaining GitHub's icon limitation. If the claiming PR has already merged, the issue leaves 030: full-fix claims close it with one `<!-- hive:closed-by-merged-pr pr=N -->` comment (checked before posting, so a close that fails after the comment is retried without a duplicate), while `Refs` / `Part of` claims move back to 010 with a partial-landed note. | 90m |
Expand Down Expand Up @@ -263,7 +263,7 @@ stateDiagram-v2
s010 --> s045: needs-human / park label (agent escalates)
s010 --> s015: needs-triage added (reclassification)
s015 --> s010: maintainer triages: triage/accepted, hive/verified-open or approved-direction added, or needs-triage removed (not a regression)
s015 --> s020: scanner / relay claim (015 is not a gate)
s015 --> s020: scanner / relay claim (015 is not a gate; needs-triage removed in the same write)
s015 --> s045: needs-human / park label (agent escalates)
s020 --> s045: claim lapses on a parked issue
s045 --> s010: /hive approve or /hive decision (approved-direction; a person's needs-human keeps it at 045, the hive's own lifts)
Expand Down
29 changes: 20 additions & 9 deletions src/pkg/dashboard/stage_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,17 @@ type StageTrackerItem struct {
// reason; the gate cell reads "Awaiting human: <step>". Unauthorized
// is the pill's tooltip naming the permission and the human action
// (hivecommons/hive#14589).
UnauthorizedStep string `json:"unauthorized_step,omitempty"`
Unauthorized string `json:"unauthorized,omitempty"`
NudgeCount int `json:"nudge_count,omitempty"`
LastNudgeAt *time.Time `json:"last_nudge_at,omitempty"`
AdoptedBy int `json:"adopted_by,omitempty"`
UnauthorizedStep string `json:"unauthorized_step,omitempty"`
Unauthorized string `json:"unauthorized,omitempty"`
// StaleLabels are control labels the row still wears that its stage
// has outrun, so they are not read as modifiers: `needs-triage` on an
// issue at 020 or later (015 is not a gate; the reconciler removes the
// label on its next pass, hivecommons/hive#14586). Rendered as a muted
// operator tooltip, never as the stage word.
StaleLabels []string `json:"stale_labels,omitempty"`
NudgeCount int `json:"nudge_count,omitempty"`
LastNudgeAt *time.Time `json:"last_nudge_at,omitempty"`
AdoptedBy int `json:"adopted_by,omitempty"`
// ClaimantKind is the author kind of whoever holds the live claim on a
// claimed issue (human / clanker / hive), from the worker-claim ledger.
ClaimantKind string `json:"claimant_kind,omitempty"`
Expand Down Expand Up @@ -1167,10 +1173,15 @@ func (s *Server) buildStageTracker(status *StatusPayload, store *stagelabels.Sto
if stage == stagelabels.NeedsDecision || stage == stagelabels.IssueNeedsDecision {
it.Modifiers = slices.DeleteFunc(it.Modifiers, func(m string) bool { return m == modNeedsDecision })
}
// Likewise 015 says "Triage needed" itself; the needs-triage chip
// only adds information on another stage (a claimed or covered
// issue the gate is still holding).
if stage == stagelabels.TriageNeeded {
// Likewise 015 says "Triage needed" itself, and a needs-triage left
// on a claimed / covered issue is stale, not a signal: 015 is not a
// gate, the stage word is the truth, and the reconciler removes the
// label on its next pass (hivecommons/hive#14586). The chip stays
// only before the claim (010 / 017 / 045).
if stage == stagelabels.TriageNeeded || stage.SettlesTriage() {
if stage != stagelabels.TriageNeeded && slices.Contains(it.Modifiers, modNeedsTriage) {
it.StaleLabels = append(it.StaleLabels, modNeedsTriage)
}
it.Modifiers = slices.DeleteFunc(it.Modifiers, func(m string) bool { return m == modNeedsTriage })
}
it.Caption, it.Actor = stageTrackerCaption(stage, it.Reason, it.Author, it.Kind, it.Mirrored, rec, hasRec, it.LinkedPR, it.Head)
Expand Down
2 changes: 2 additions & 0 deletions src/pkg/dashboard/stage_tracker_motion_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,6 +426,7 @@ func TestStageTrackerMotionRowStamp(t *testing.T) {
jsConstLine(t, html, "STAGE_TRACKER_HANDLED_NOTE"),
jsFunc(t, html, "stageTrackerRegressionHandled"),
jsFunc(t, html, "stageTrackerRegressionText"),
jsFunc(t, html, "stageTrackerStaleLabelsText"),
jsFunc(t, html, "stageTrackerTooltip"),
jsFunc(t, html, "stageTrackerChipsHtml"),
jsFunc(t, html, "stageTrackerHeadColsHtml"),
Expand Down Expand Up @@ -535,6 +536,7 @@ func TestStageTrackerMotionPreviewSample(t *testing.T) {
jsConstLine(t, html, "STAGE_TRACKER_HANDLED_NOTE"),
jsFunc(t, html, "stageTrackerRegressionHandled"),
jsFunc(t, html, "stageTrackerRegressionText"),
jsFunc(t, html, "stageTrackerStaleLabelsText"),
jsFunc(t, html, "stageTrackerTooltip"),
jsFunc(t, html, "stageTrackerChipsHtml"),
jsFunc(t, html, "stageTrackerHeadColsHtml"),
Expand Down
1 change: 1 addition & 0 deletions src/pkg/dashboard/stage_tracker_repo_grouping_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ func stageTrackerRepoGroupingHarness(t *testing.T, html string) string {
jsConstLine(t, html, "STAGE_TRACKER_HANDLED_NOTE"),
jsFunc(t, html, "stageTrackerRegressionHandled"),
jsFunc(t, html, "stageTrackerRegressionText"),
jsFunc(t, html, "stageTrackerStaleLabelsText"),
jsFunc(t, html, "stageTrackerTooltip"),
jsFunc(t, html, "stageTrackerChipsHtml"),
jsFunc(t, html, "stageTrackerHeadColsHtml"),
Expand Down
Loading
Loading