Skip to content

✨ tracker: show who holds a claimed item on the chevron and hover - #15426

Merged
clubanderson merged 3 commits into
v5from
feat/tracker-claimant
Oct 29, 2026
Merged

clubanderson merged 3 commits into
v5from
feat/tracker-claimant

Conversation

@clubanderson

@clubanderson clubanderson commented Oct 29, 2026 •

Copy link
Copy Markdown
Member

Fixes #15422

What

Activity Monitor rows now say who holds a claimed / in-progress item, on the chevron (one short token) and in the hover (one line).

Claimant Chevron Hover
hive agent (this hive) Claimed · quality Held by: hive agent quality since 3h ago (claim comment)
hive agent (other hive) Claimed · quality@alchemy Held by: hive agent quality@hosted-ibm-alchemy since 3h ago (claim comment)
contributor's clanker Claimed · @bob's clanker Held by: @bob's clanker since 3h ago (assignee)
person Claimed · @alice Held by: @alice since 3h ago (assignee)
kick-history fallback PR in progress · fixer Held by: hive agent fixer since just now (kick history)
covering PR / detour Returned to @bob's hive · @bob's clanker Held by: @bob's clanker … (author)
unknown Claimed (nothing added) unchanged

The existing person / robot / bee icon stays; the login sits next to it. Short hive names strip the hosted-ibm- / hosted- prefix the same way other chips do.

How

  • github.Issue / RepoWorkIssue gain ClaimHive (from the hive= claim marker).
  • New stage_tracker_claimant.go: StageTrackerClaimant{kind, login, agent, hive, since, source} derived in order claim ledger → claim comment/marker → assignees (registered contributor ⇒ clanker, else person) → kick history; PRs derive from author_kind + worker/agent/ label.
  • /api/stage-tracker items and linked_prs[] carry claimant; documented in docs/api-reference/dashboard-misc.md and docs/dashboard-sections.md.
  • SPA: stageTrackerClaimantShort / stageTrackerClaimantLine in tracker-row.js; .ham-holder is normal-weight so the label still reads first. static/index.html regenerated.

Tests

  • TestStageTrackerIssueClaimant, TestStageTrackerPRClaimant, TestStageTrackerClaimantStage (Go tables: fleet fingerprint → hive-agent with hive; registered contributor assignee → clanker; plain assignee → person; kick-history fallback; none → empty).
  • TestStageTrackerClaimantChevronJS (Node harness: suffix on chevron, hover line present, nothing when empty, no slug leakage).
  • go test -race ./pkg/dashboard/ -run 'StageTracker|Claim|IndexHTML', full ./pkg/dashboard/, ./pkg/github/ -run Claim all green locally.

Screenshot

Local fixture, headless Chrome:

Tracker chevrons showing claimant identity for each kind

@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 dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

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

PR Title Relation Files
#15429 ✨ governor: merge-hotspot advisor files modularize issues for the ci-maintainer same files src/docs/api-reference/dashboard-misc.md
src/pkg/dashboard/static/index.html
#15427 ✨ tracker: merge queue position on the chevron, stable wording, stall warning CONFLICT src/docs/api-reference/dashboard-misc.md
#15425 ✨ feature: show local claim holders in tracker CONFLICT src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/stage_tracker_claimant_test.go
src/pkg/dashboard/static-src/js/tracker-row.js
src/pkg/dashboard/static/index.html
#15424 🐛 tracker: name the clanker's owner on returned rows; flag superseded contributor PRs same files src/pkg/dashboard/stage_tracker.go
src/pkg/dashboard/stage_tracker_ui_test.go
src/pkg/dashboard/static/index.html
#15400 🐛 fix: keep merge queue position visible during sweeps same files src/pkg/dashboard/static/index.html

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission → 050-review-pending: required-check-pending:golangci-lint

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Why:

  • the branch conflicts with the base and needs a rebase

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 29, 2026
The activity monitor's lit chevron and its hover said what kind of actor
held a claimed or in-progress row (the stage_actor icon) but never who.
/api/stage-tracker rows and nested linked_prs[] now carry
claimant {kind: hive-agent|clanker|person, login, agent, hive, since,
source}, derived from the worker-claim ledger, the hive:claim marker
(with its hive fingerprint, now plumbed through Issue.ClaimHive), an
assignee, or the busy agent in the status payload; PR rows name their
author or adopting agent. The SPA appends one short token to the chevron
word (quality, quality@alchemy, @bob's clanker, @alice) and one
'Held by: … since … (source)' line to the hover; nothing when unknown.

Fixes #15422

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@hivecommons-hive
hivecommons-hive Bot force-pushed the feat/tracker-claimant branch from eebb796 to b384f81 Compare October 29, 2026 16:24
@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/awaiting-ci: rebased onto v5 (resolved conflicts in src/docs/api-reference/dashboard-misc.md, src/pkg/dashboard/stage_tracker.go, src/pkg/dashboard/static-src/js/tracker-row.js, src/pkg/dashboard/static/index.html, src/docs/scale-envelope.md); CI pending — sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: b384f815e

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

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@clubanderson this PR is back in your court (stage/071-needs-author). Its commits are signed off as the hive App rather than as you, so a squash merge would misattribute them and the sign-off attribution check stays red. No hive agent can rewrite a contributor's commits — the fix is yours:

  • 3 commits are signed off as the hive App instead of you, so a squash merge would misattribute them — set git config user.email to your own address, then run git rebase --exec 'git commit --amend --no-edit --reset-author -s' HEAD~3 && git push --force-with-lease

Once the new head lands, CI and the review swarm re-run automatically and the PR returns to the normal path.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 080-awaiting-merge-admission → 071-needs-author: hive-signoff-attribution

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

Decision needed: @clubanderson should decide whether #15425 (partial slice of #15422, CI red) is closed in favour of this PR, since both define StageTrackerClaimant / Claimant and cannot merge together.

Code reads correct to me; the blocker is the overlap with #15425.

What I verified against the tree at b384f81:

  • Every helper the new file leans on exists with the signature used: stageTrackerWorkerOn (stage_tracker_actor.go:75), timePtr (stage_tracker.go:1853), findContributor (contribute_profiles.go:429), claims.KindExternal/KindHuman (claims/claims.go:42-50), issueclaim.Claim.Hive (issueclaim.go:94).
  • Ledger kind mapping in stage_tracker_claimant.go:72-80 agrees with the existing stageTrackerClaimantKind (stage_tracker.go:2514-2521): contributor+external → clanker, agent → hive, else person.
  • holderHtml is folded into word, which is only rendered on the active segment (tracker-row.js:360,369), so the suffix does not appear on done/pending chevrons.
  • The one RepoWorkIssue → github.Issue construction site now carries ClaimHive (stage_tracker.go:2322); I found no other.

Conflict, not duplicate: #15425 (90bd989, Refs #15422) adds the same Claimant *StageTrackerClaimant field on StageTrackerItem, a second type StageTrackerClaimant in stage_tracker_actor.go, and its own stage_tracker_claimant_test.go — whichever lands second fails to compile. #15425's body lists as remaining exactly what this PR delivers (claim-comment / assignee / kick-history fallbacks, foreign hive names, PR and covering-PR identity), and its test (dashboard 4/4) and coverage checks are red at head. I have not closed anything; a maintainer should pick one, and this one is the complete fix.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@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 the diff against v5@e0f8bd9 plus the callers; this looks correct to me, and it is the one of the two open #15422 PRs that matches the issue's spec.

Correctness (verified in the tree, head b384f81):

  • stage_tracker_claimant.go:66-108 derivation order ledger → hive:claim marker → assignee → kick-history matches the "Where the data is" section of #15422. KindExternal → clanker follows the existing precedent in stageTrackerClaimantKind (stage_tracker.go:2519), so the chevron and the actor icon agree.
  • stage_tracker.go:2193-2201 / 2296-2302 gate on stageTrackerClaimantStage (issues at 20/30, PRs at 50–79) so the merge-gate word (stageTrackerMergeGateWordHtml) is never doubled with a holder suffix; stage_tracker.go:3077 mirrors Claimant onto linked_prs[] and tracker-row.js:884,1197 carry it through both sub-row paths.
  • tracker-row.js:306 escapes the login before it lands in .ham-holder; stageTrackerIsClankerOwner memoises findContributor per build so assignee lookups don't hit disk once per row.
  • go build ./pkg/dashboard/ ./pkg/github/ at this head is clean; CI test (v2 Tests) is green on this head.

Conflicts with #15425 (same issue, cannot both merge): #15425 declares the same exported StageTrackerClaimant type in stage_tracker_actor.go:43-50 and the same Claimant field/JSON key on StageTrackerItem, and adds a file with the same name stage_tracker_claimant_test.go — whichever lands second fails to compile until rebased. They are not duplicates: #15425 reads only the local claims ledger (stage_tracker_actor.go:53-77), only on stage-20 issue rows (stage_tracker.go:2169), labels the source (claim ledger), and has no marker/assignee/kick-history fallback, no PR rows and no linked_prs[] mirror. Per #15422's "Proposal" (sources claim-comment|assignee|kick-history|author, PRs and covering-PR sub-rows included) this PR is the one that implements the issue; #15425 is a strict subset of it.

Flagging for a maintainer: if you agree, #15425 could be closed in favour of this one once it merges. I have not closed anything.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Quality note on the pkg/github plumbing (non-blocking, @b384f81):

Issue.ClaimHive is populated in annotateIssueClaims (issue.ClaimHive = claim.Hive) and copied in repoWorkIssueFromIssue, but neither copy is asserted by a test. The new stage_tracker_claimant_test.go constructs Issue{ClaimHive: …} directly, so deleting either of those two lines leaves the whole suite green while the chevron silently loses its owner on real data.

Two cheap assertions would make the change fail without the fix:

  1. src/pkg/github/issue_claims_test.go — TestAnnotateIssueClaims_LiveMarkerClaims already feeds a marker through claimServer; use a raw marker with hive= (same shape as contributor_claim_guard_test.go:18, e.g. <!-- hive:claim who=alice kind=agent hive=hive-bold-fox at=… until=… -->) and add got.ClaimHive == "hive-bold-fox" plus "claim_hive":"hive-bold-fox" to the envelope key loop.
  2. src/pkg/github/issue_stage_labels_test.go (≈562, the appendRepoWorkIssueDetail cases) — set ClaimHive on the input Issue and assert it on the resulting RepoWorkIssue.

Both live in the same package as the change, so no new fixtures are needed.


🐝 Hive Agent: quality | Instance: hosted-available-oke-11-placeholder-r05x | SHA: unknown

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

@clubanderson
clubanderson merged commit eae092f into v5 Oct 29, 2026
77 of 78 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the feat/tracker-claimant branch October 29, 2026 16:38
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

clubanderson added a commit that referenced this pull request Oct 29, 2026
…PR (#15480)

A PR row whose linked issue is already closed drew a bare `closed` chip
when the hive's merged ledger did not know the closer (a PR the owner
merged by hand; a merge lost across a roll), which read as the issue
having been closed before its fix merged — hive's #15422 under follow-up
#15425 and #15058 under #15431. The issues were in fact closed by GitHub
the second #15426 / #15068 merged.

The soft-link enrichment now asks GitHub which MERGED pull request closed
the issue (closedByPullRequestsReferences; an open PR with Fixes #N is
listed there too and is never named) and carries state_reason and
closed_by on the link, so the chip reads `closed by #N`. When no merged
closer is known it reads `closed · this PR unmerged` with a hover saying
a person or another merged PR closed it. Docs state the rule: the hive
closes an issue only after its PR has merged.

Fixes #15479

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conflicts-with-open-pr Open PR has a merge conflict with another open PR dco-signoff: yes Indicates the PR's author has signed the DCO. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracker: chevron and hover never say who holds a claimed item

1 participant