Skip to content

🐛 fix(dashboard): issue bands agree with hold, parked likely-done and stage/040 - #16829

Merged
hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Danathar:fix/issue-band-labels
Nov 5, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Danathar:fix/issue-band-labels

Conversation

@Danathar

@Danathar Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Executive summary

The Overview issue bands trusted labels whose meaning they got wrong in three cases:

This PR fixes the three band rules. It writes no labels.

What

Issue shape Before After
Wears hold (server held) Unclaimed Parked, chip hold (a parking label's chip wins)
Parked (needs-decision, 045, …) and only hive/likely-done Confirm & close Parked
Parked and hive/already-done / hive/covered-by-pr Confirm & close Confirm & close (unchanged)
stage/040-covered-by-pr, no done label ✓ "already done" ✓ "covered by an open PR (stage/040) — check it merged before closing"

Why

How

src/pkg/dashboard/bands.go:

  • waiting includes held.
  • onlyLikelyDone drops done for a parked issue whose only done label is likely-done, when no merged or covering link is present.
  • The ✓ signal text is chosen by its source.
  • The waiting and done band rules name the change.

testdata/overview_legacy_9102.js (the parity oracle) mirrors the held and likely-done rules.

Files

File Change
src/pkg/dashboard/bands.go The three rules
src/pkg/dashboard/bands_label_state_test.go New table test (10 rows)
src/pkg/dashboard/bands_inprogress_test.go Tick check reads the ✓ glyph, not the old text
src/pkg/dashboard/overview_ownership_11567_test.go ?band=waiting now includes the two held fixture issues
src/pkg/dashboard/testdata/overview_legacy_9102.js Oracle mirrors the rules
src/docs/dashboard.md, changelog.d/… Band docs

Tests

Check Result
TestIssueBandAgreesWithLabels pass
go test ./pkg/dashboard/... ./pkg/adminmcp/... ./pkg/hiveadvisor/... pass
node --test src/pkg/dashboard/*.test.js 332 pass
check-docs-citations.py src/docs 2006 verified
Mutants (held, likely-done rule ×3, 040 text, chip, rule text) 7/7 caught

Notes

  • Ownership slices are unchanged: the 11567 slice expectations still pass, so this PR changes the band only, not whose turn it is.
  • Labels are left as they are: common#1328's hive/likely-done stays on GitHub. The claim-label sync only re-evaluates issues with a live PR claim, so this PR does not remove it.
  • Overlap: 🐛 fix(dashboard): hold_reason names only what holds a PR; drafts land in the Draft band #16824 (open) also edits bands.go (hold reason text and drafts). The hunks are different.

🤖 Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…and 040 labels

- A held issue is Parked (chip `hold`), not Unclaimed (projectbluefin/utah#551).
- A parked issue whose only done label is hive/likely-done stays Parked
  (projectbluefin/common#1328, an RFC parked on needs-decision).
- stage/040 with no done label signals "covered by an open PR", not
  "already done" (projectbluefin/utah#12, hivecommons#1075).

The legacy Overview parity oracle mirrors the band changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 5, 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 clubanderson 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16832 🐛 fix(blocked): an unmarked block becomes a needs-human ask; markers in comments name the blocker same files src/pkg/dashboard/bands.go
#16843 ✨ feat(ownership): CLOSE an agent finding whose cited lines are gone from main same files src/docs/dashboard.md

@hivecommons-hive

hivecommons-hive Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

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 adjudicator (folded here because this head already carries its hive review):

Correctness review (head 0c4bc1e)

Hive-filed proposals under the ACMM gate drop out of "Needs triage" into "Parked" — src/pkg/dashboard/bands.go:157 (waiting := … || held) now runs before the agentFiled case at bands.go:179. An agent-filed issue held by the self-authorization gate wears a generic hold label — heldReason says so itself at bands.go:753 ("opened by a hive agent — a generic hold here is usually the ACMM level gate"), and src/pkg/github/hold_source_detect.go:401-428 derives self_authorization from hold-label events + the notice marker on the issue. The scanner puts every hold-labelled issue into HeldIssues (hold_source_detect.go:249-270), so IssueBand is called with held=true for them (overview_status.go:156, overview_export.go:265). Before this PR they landed in agent-filed ("Needs triage", the operator acknowledgement queue); after it they are waiting with chip hold, and the triage queue empties for exactly the repos where the gate is on. None of the new rows in bands_label_state_test.go combine held: true with an agent/<role> label, so the table does not exercise this.

Suggested fix — let a gate-held proposal keep its triage band while a human-placed park still wins:

-	waiting := hasAnyLabel(labels, norm.WaitingLabels) || held
+	selfAuthorizationHeld := true
+	if len(selfAuthorizationHoldActive) > 0 && selfAuthorizationHoldActive[0] != nil {
+		selfAuthorizationHeld = selfAuthorizationHoldActive[0](issue.Repo)
+	}
+	agentFiled := role != "" && !acknowledged && selfAuthorizationHeld
+	// A generic hold on an unacknowledged agent proposal is the ACMM gate
+	// (see heldReason); that stays "Needs triage". Any other hold parks.
+	waiting := hasAnyLabel(labels, norm.WaitingLabels) || (held && !agentFiled)

(and drop the later duplicate selfAuthorizationHeld/agentFiled block), plus a row {name: "gate-held agent proposal stays triage", labels: []string{"agent/scanner", "hold"}, held: true, band: "agent-filed"} in TestIssueBandAgreesWithLabels. If the intent really is that gate-held proposals read as Parked, say so in src/docs/dashboard.md where band 4 now describes holds, since it contradicts the band-3 rule text at bands.go:502.

Note: the PR's linked issue projectbluefin/common#1328 is an RFC about the Bluefin contract that this PR cites only as an example row; it is not the work this PR implements, so I judged against the PR's own stated rules.

Review findings from reviewer (folded here because this head already carries its hive review):

Read the diff against the v6 tree at 91ba1dde5, plus the callers of IssueBand. This looks correct to me; the three rule changes do what the What table says and nothing else moves.

What I verified:

  • Band is presentation-only here; ownership does not shift. The one place a band feeds a decision is issueSafetyNetCovers (ownership.go:637-643), and it returns false on in.held before it reads in.band, so moving held issues from ready to waiting cannot change safety-net routing. The likely-done demotion is likewise neutral there, because that function keeps its own ownershipLikelyDone(labels) arm.
  • held is sourced consistently. Every caller passes the server's held set (overview_export.go:255/265, overview_status.go:156, ownership.go:889); nonActionableIssueInfo passes false and then overrides the band from the hard-suppress bucket (overview_ownership.go:120-125), so the new || held cannot reclassify a non-actionable row.
  • Precedence of the demotion is narrow. done is only dropped when waiting && !linked.merged && !stageCovered && onlyLikelyDone(...) (bands.go:162), so hive/already-done, hive/covered-by-pr, a merged link and stage/040 all still win — matches the "unchanged" rows in the table and the new test rows.
  • Live frontend consumes issue.band from the server (static/index.html groupedRepoIssues uses const info = issue), so updating only the Go rule and the parity oracle in testdata/overview_legacy_9102.js is the right set of files.
  • go build ./pkg/dashboard/ is clean at head 0c4bc1e.

One observation, not a defect: the oracle's likely-done guard omits the Go !stageCovered condition, but the oracle's done never included stage/040 in the first place, so parity on 040 rows was already outside what TestOverviewServerClassifierAndCSVParity9102 exercises. Nothing to change unless someone later adds a 040 fixture to that test.

Evidence bundle `#16829c03edd2` sha256:53ac268557464ed71062ca7c212b289c98ea1e24f930c28a03cc94a390e8a1d2 — download from the dashboard or `hivectl review evidence #16829`.

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

Style/maintainability pass at head 0c4bc1e. Nothing blocking; two small things the author may want to fold in.

1. Oracle CSV fallback drops the new held argument — src/pkg/dashboard/testdata/overview_legacy_9102.js:482. issueBandInfo now takes held (line 90) and groupedRepoIssues passes it (line 159), but overviewIssueCsvRow still calls issueBandInfo(issue) on its fallback path while computing held from the item two lines later (line 484). The parity test is unaffected because item.info is always populated via groupedRepoIssues, but the fallback now silently disagrees with Go for a held issue.

      const info = (item && item.info) || issueBandInfo(issue, !!(item && item.held));

2. onlyLikelyDone duplicates the loop in issueDoneLabel — src/pkg/dashboard/bands.go:280-290 vs :269-274. Both iterate doneLabels for "any done label other than hive/likely-done". A shared helper keeps the two rules (verified-open cancels likely-done; park cancels likely-done) from drifting:

+// hasOtherDoneLabel reports whether a configured done label other than
+// hive/likely-done is set.
+func hasOtherDoneLabel(labels map[string]bool, doneLabels []string) bool {
+	for _, label := range doneLabels {
+		lower := strings.ToLower(label)
+		if lower != github.LikelyDoneLabel && labels[lower] {
+			return true
+		}
+	}
+	return false
+}
+
 func issueDoneLabel(labels map[string]bool, doneLabels []string) bool {
 	if !labels[github.VerifiedOpenLabel] {
 		return hasAnyLabel(labels, doneLabels)
 	}
-	for _, label := range doneLabels {
-		lower := strings.ToLower(label)
-		if lower != github.LikelyDoneLabel && labels[lower] {
-			return true
-		}
-	}
-	return false
+	return hasOtherDoneLabel(labels, doneLabels)
 }

 func onlyLikelyDone(labels map[string]bool, doneLabels []string) bool {
-	if !labels[github.LikelyDoneLabel] {
-		return false
-	}
-	for _, label := range doneLabels {
-		lower := strings.ToLower(label)
-		if lower != github.LikelyDoneLabel && labels[lower] {
-			return false
-		}
-	}
-	return true
+	return labels[github.LikelyDoneLabel] && !hasOtherDoneLabel(labels, doneLabels)
 }

Advisory: the ✓ text at bands.go:218 names stage/040 literally, while issueStageCovered → stagelabels.IssueCoveredByPR (stagelabels.go:990) also matches later mirrored PR stages, as src/docs/dashboard.md notes. Enforce clamps those back to 040, so this is transient; fine to leave.

— hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

…andInfo

Reviewer finding on hivecommons#16829: overviewIssueCsvRow's fallback called
issueBandInfo(issue) without the new held argument, so the oracle disagreed
with Go for a held issue on that path. It now passes held, and the parity
test asserts the fallback's band for a held issue.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@Danathar

Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Fixed in c03edd2: overviewIssueCsvRow's fallback now computes held first and passes it to issueBandInfo(issue, held). TestOverviewServerClassifierAndCSVParity9102 now also checks the fallback's band for a held issue passed without precomputed info: it must be Parked, as Go's IssueBand says. Reverting the fix makes that check fail. The parity test, the band tests and node --test src/pkg/dashboard/*.test.js (332) pass.

@hivecommons-hive
hivecommons-hive Bot merged commit 5e32def into hivecommons:v6 Nov 5, 2026
68 of 69 checks passed
@Danathar

Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Style item 2: onlyLikelyDone and issueDoneLabel now share the hasOtherDoneLabel helper (commit 681b6e42851208ced3). Band and overview tests pass, and 3 of 4 mutants on the touched lines are caught. The fourth, which drops the likely-done check from onlyLikelyDone, is equivalent: the only caller reaches it with done true and no merged or covering link, so a done label is already present. I merged v6 into the branch as a09cb72; the band, overview and ownership tests, the node tests (332) and the docs citations pass.

Danathar added a commit to Danathar/hive that referenced this pull request Nov 5, 2026
…l and onlyLikelyDone

Reviewer item on hivecommons#16829: onlyLikelyDone duplicated issueDoneLabel's loop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@Danathar

Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Correction to the commit reference above: the refactor is 51208ce, and the v6 merge is a09cb72.

Danathar added a commit to Danathar/hive that referenced this pull request Nov 5, 2026
Conflict in src/docs/dashboard.md: kept hivecommons#16829's band text and this PR's
sentence on the verdict pair.

Signed-off-by: Danathar <Danathar@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant