Skip to content

πŸ› fix(dashboard): hold_reason names only what holds a PR; drafts land in the Draft band - #16824

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/overview-hold-reason-drafts
Nov 5, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/overview-hold-reason-drafts

Conversation

@Danathar

@Danathar Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Executive summary

Two Overview PR-row errors on the projectbluefin hive:

What

Row Before After
held by sentinel alert only "…until the hold label is removed; …usually the ACMM level gate" "On hold: agents will not act on this until what holds it is cleared"
hold from the holdguard "…label hold…; usually the ACMM level gate" "…label hold…" with no ACMM sentence
hold, sources unknown or level_gate ACMM sentence unchanged
open draft in no band; Draft count 0 Draft band (or Gated when it wears a gate label), in /api/overview and overview_bands

How

  • dashboard/bands.go heldReason takes the PR's HoldSources. The repo-card JS copy (static-src/js/repos.js heldReason) applies the same rule from hold_sources.
  • overview_export.go frontendRepoDraftPRs turns the sidelined RepoWorkPR drafts into band entries for overviewPRItems. overview_status.go counts them in overview_bands.prs.

Tests

Test Covers
TestHeldReasonNamesOnlyWhatHoldsIt sentinel-only, holdguard, level gate, unknown sources (Go)
TestRepoCardHeldNoteBehaviour (+5 checks) same cases in the repo-card JS
TestOverviewDraftsLandInDraftBand export rows and counts, status payload count, non-draft sidelined PR excluded
Mutants 8/8 caught
go test dashboard/..., writeback, adminmcp; node --test (332); make dashboard-gen-check pass

Notes

  • Band classification (eligible vs your-turn) is untouched here; that is a separate fix.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

… in the Draft band

hold_reason told sentinel-only PRs (homebrew-tap#60, testsuite#1108) to wait
for a hold label they do not carry and called a holdguard hold the ACMM gate;
it now reads the PR's hold labels and hold_sources (Go and repo-card JS).
Drafts are sidelined by the enumeration, so the Draft band was always 0;
the bands and overview counts now include them.

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

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 kellyaa 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 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. labels Nov 5, 2026

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

Read at head d8ffe1c against v6, with the enumeration in pkg/github/client.go and the band code around the diff. The two fixes do what the body says; one low-severity edge to decide on.

Verified correct

  • bands.go:695-713 heldReason: the ACMM sentence is now gated on len(held) > 0 && (len(sources)==0 || slices.Contains(sources, HoldSourceLevelGate)), and pr.HoldSources is populated for held PRs at client.go:2423. HoldSourceLevelGate is "level_gate" (hold_sources.go:7), matching the JS literal at repos.js:709-710. FrontendPR embeds github.PullRequest (status_builder.go:1824), whose HoldSources carries json:"hold_sources,omitempty" (client.go:1230), so item.hold_sources exists on the card payload. static/index.html carries the same new string as repos.js.
  • Drafts are only ever sidelined β€” client.go:2389-2432 keeps pr.GetDraft() out of heldPRs, and client.go:2443-2445 out of the actionable list β€” so walking NonActionablePrs in frontendRepoDraftPRs (overview_export.go:516-530) adds no double count against OpenPrs/HeldPrs.
  • go build ./pkg/dashboard/ passes at this head.

Low: exempt-labelled drafts land in the Draft band, unlike breakdown.Draft

frontendRepoDraftPRs filters on w.Draft (overview_export.go:520), not on w.Bucket == "draft" as its own comment says. Client.repoWorkPR sets Draft: pr.GetDraft() for every sidelined PR (client.go:5068), including a draft sidelined for an exempt label at client.go:2437-2439 (bucket filtered, which runs before the draft branch and does not bump breakdown.Draft at client.go:2444). So a repo with a draft wearing e.g. do-not-merge/hold-style exempt labels gets a Draft band count one higher than the enumeration's own Draft breakdown. The test's excluded row (overview_draft_band_test.go, number 9) is excluded because Draft is false, not because of its bucket, so this path is uncovered; its bucket string "exempt" also does not match the real constant workBucketPRFiltered = "filtered" (client.go:5056). If the intent is "every open draft on GitHub", keep as is and fix the comment; if it is "what the enumeration bucketed as draft", filter on Bucket. Either way a one-line change.

Not blocking in my view; flagging so a maintainer can pick the intended semantics.

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

@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
#16807 πŸ› fix: route workflow blockers to capable lanes same files src/pkg/dashboard/static/index.html
#16688 🌱 Forward-merge v5 into v6 (2 commits) same files src/pkg/dashboard/static/index.html

@hivecommons-hive
hivecommons-hive Bot merged commit 440f498 into hivecommons:v6 Nov 5, 2026
74 of 77 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Evidence bundle `#16824d8ffe1c` sha256:1a3455d5e2762973b0592f355ff1ede1a49fcf1fbaf4c897d74a6c4e5a107803 β€” download from the dashboard or `hivectl review evidence #16824`.

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