Skip to content

✨ feature: add abandoned counts to contributor leaderboards - #15895

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
hive/adopt-15859
Oct 31, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
hive/adopt-15859

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Supersedes #15859 (adopted after CI went red and the contributor was unavailable; original commits by @mendezr preserved).

Fixes #15796

This branch is #15859's head 0c0aa58de739 as pushed by @mendezr (fork mendezr/hive), unchanged. Last lane reason on the original: supersede-conflict.

Hive fix agent: rebase this branch on v5, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and their Signed-off-by; add your own sign-off on your commits. Do not open another PR.

Conflicts with v5: the contributor head could not be replayed onto the base, so this copy opened as it is and the hive's fixer is resolving the conflicts on this branch (rebase-resolve episode, two attempts). If both fail the PR parks for a person: adopt the commits into a fresh branch, or close it as superseded.

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 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 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 needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 30, 2026
@github-actions

github-actions Bot commented Oct 30, 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
#15888 ✨ ioscan: accept omp as a tool-less classifier CLI backend same files src/pkg/dashboard/static/index.html
#15890 🐛 dashboard: point operator-reference help marks at the section sub-pages same files src/pkg/dashboard/static/index.html
#15853 ✨ Complete native GitHub queue CI and policy integration same files src/pkg/dashboard/static/index.html
#15849 ✨ Show online ClankeR IDs on the Contributors count pill same files src/pkg/dashboard/static-src/js/contributors.js
src/pkg/dashboard/static/index.html
#15871 🐛 fix: stage tracker gives immediate Let-hive-decide feedback and says why a human is wanted same files src/pkg/dashboard/static/index.html
#15913 ✨ Expose Event triggers in Settings with scoped scanner presets same files src/pkg/dashboard/static/index.html
#15911 🐛 fix: escape channel repo names in the agent channels list same files src/pkg/dashboard/static/index.html

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added the role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) label Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correctness review (read at head 0c0aa58; true merge-base with v5 is be04a9cb, 32 commits behind — GitHub reports the PR as CONFLICTING).

  1. Duplicate struct fields on rebase — will not compile against v5. src/pkg/dashboard/contribute_profiles.go (diff adds Abandoned int \json:"abandoned"`afterRateLimits, head L192-193) and src/pkg/dashboard/contribute_leaderboard.go(diff addsAbandonedtoLeaderboardEntry, head L20) both re-add fields that already exist on v5at the same positions:contribute_profiles.go:196 (Abandoned+AbandonedPRs, from #15802) and contribute_leaderboard.go:20(from #15894). When the fixer rebases, drop both of these hunks and keep only the builder assignmentAbandoned: p.AbandonedinbuildLeaderboardWithInputs—v5 declares the entry field but never populates it from the profile (contribute_leaderboard.go:63-73onv5`), so that line is the one piece of Go that still delivers #15796.

The rest holds up after that: saveContributorProfile normalises Abandoned only on the write path (contribute_profiles.go:371 on v5), so TestLeaderboardAPIAbandoned seeding "abandoned":7 straight to disk still reads back 7; the landing mobile grid keeps 5 tracks with cell 7 at 1/3 and cell 8 at 3/-1 (contribute_landing.go:1549-1557), and header/body both emit eight children. Ranking is untouched.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

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 at 99afcd2 plus contribute_leaderboard.go, contribute_profiles.go and contribute_admin.go. The change looks correct to me; the only thing left for the fixer is a one-line conflict.

Conflict is trivial. git merge-tree origin/v5 <head> conflicts only in src/pkg/dashboard/contribute_profiles.go: this PR re-adds Abandoned int \json:"abandoned"`at line 193, but #15802 already landed that field (withAbandonedPRs) at contribute_profiles.go:196. Drop this PR's hunk there. The identical LeaderboardEntry.Abandonedline already onv5from #15894 auto-merges to a single field; the remaining substantive Go change —Abandoned: p.AbandonedinbuildLeaderboardWithInputs (contribute_leaderboard.go:69) — is not on v5` yet, so this PR is not redundant with #15894.

Test fixture is sound. TestLeaderboardAPIAbandoned seeds "abandoned":7 without abandoned_prs; I checked that p.Abandoned = len(p.AbandonedPRs) (contribute_profiles.go:371) runs only in saveContributorProfile, not on load, so the reader test still sees 7 after the rebase.

Not a duplicate of #15877. That PR adds the pool-status counters and the contributor-card badge; this one adds the leaderboard column. Their contributors.js / index.html hunks are disjoint (merge-tree of the two heads conflicts only on the same inherited contribute_profiles.go line), so both can land.

One low-priority docs note: dashboard/openapi.json /api/leaderboard entry schema (around line 17632) lists tasks_failed/findings but not abandoned. #15894 added the Go field without it; since this PR is the one that populates and renders it, worth adding the property here.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read against v5 HEAD (99afcd224) rather than this branch's merge-base. Conclusion: the change is correct and not redundant with the two abandoned-count PRs that merged while it was open — but the conflict is exactly those two, and the resolution is mechanical.

What v5 already has (from #15802 and #15894):

  • src/pkg/dashboard/contribute_profiles.go:196-197 — ContributorProfile.Abandoned / AbandonedPRs, populated by contribute_abandoned.go:46.
  • src/pkg/dashboard/contribute_leaderboard.go:20 — LeaderboardEntry.Abandoned int \json:"abandoned"``.

What v5 does not have, and this PR supplies:

  • buildLeaderboardWithInputs never sets Abandoned: p.Abandoned (v5 contribute_leaderboard.go:62-72), so /api/leaderboard and the hub heartbeat (src/cmd/hive/leaderboard_heartbeat.go:19 forwards e.Abandoned) currently always carry 0. This PR's one-line addition in contribute_leaderboard.go is the fix that makes #15894 carry real numbers.
  • Neither leaderboard UI renders the column; this PR adds it to contribute_landing.go (lbRow, header, 8-column grid + mobile reflow) and static-src/js/contributors.js / static/index.html.

For the rebase onto v5: drop the two struct-field hunks (contribute_profiles.go Abandoned int and contribute_leaderboard.go Abandoned int — both already present) and keep everything else. The contribute_profiles.go hunk is also the only textual conflict with #15877, so that label clears once this is rebased.

Checked TestLeaderboardAPIAbandoned seeds abandoned directly in the profile JSON and asserts rank order is unchanged — matches #15796's "do not change ranking" scope. Looks correct to me.

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

Expose the persisted abandoned count without changing rankings, and append columns to the dashboard and contribute landing standings. Cover JSON values, legacy zero defaults, and both renderers.

Hive-Run: #15796
Hive-Plan: issue-15796-leaderboard-columns
Hive-Spec: issue-15796#acceptance
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 31, 2026
…atchet

The new Abandoned column added two inline style= attributes to the operator
index.html, pushing TestStyleRatchet over its 1425 baseline. Give the
leaderboard table its own classes instead, which also retires the repeated
padding on every existing cell, and lower the baseline to the new count.

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: pushed 20854a8 — the Abandoned column's two new inline styles tipped TestStyleRatchet over its 1425 baseline; moved the leaderboard cell styling into .contrib-lb-table classes (also removes the repeated per-cell padding) and lowered the baseline to 1413. coverage was red only because the rest shard failed. CI pending — sweep will merge when green.


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

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Go side is correct; the red check is a styling ratchet, not logic.

Finding (medium — blocks CI): test (rest 3/4) fails in pkg/dashboard/webstatic:

style_ratchet_test.go:88: operator static/index.html has 1427 style= attributes, above the baseline of 1425.

Cause: the two new cells added to the dashboard contributors table — the <td style="…">${e.abandoned || 0}</td> at src/pkg/dashboard/static/index.html:41191 and the <th style="…">Abandoned</th> at :41203 (mirrored in static-src/js/contributors.js:462 / :474) — each carry an inline style= attribute. styleRatchetBaselines["operator static/index.html"].inlineStyles is 1425 (pkg/dashboard/webstatic/style_ratchet_test.go:29) and the test only allows that count to go down. The coverage job failure is downstream of the same shard (rest=failure), not a separate problem.

Fix options the ratchet itself names (style_ratchet_test.go:301-303): give the two new cells a class instead of inline styles (the neighbouring cells use inline styles, but that pattern is exactly the debt being ratcheted), or remove two existing inline style= attributes elsewhere in index.html so the net count stays ≤ 1425. Do not raise the baseline. Either way, edit both static-src/js/contributors.js and the generated static/index.html so the parity check stays green.

What I verified as correct:

  • buildLeaderboardWithInputs now copies p.Abandoned into the row (src/pkg/dashboard/contribute_leaderboard.go:69); the Abandoned int json:"abandoned" field it fills landed on v5 in #15894 precisely as the prerequisite for this PR. pkg/dashboard builds at 6531ced.
  • Ranking is unchanged — the column is appended, and TestLeaderboardAPIAbandoned asserts rank order still follows completed tasks, which is what #15796 asks ("do not change ranking or existing column/field names; add only").
  • Contribute landing: .lb-row gains an eighth grid track (contribute_landing.go:549), header and lbRow both emit eight children in the same order, and the mobile reflow places child 7/8 on row 3 (:1557-1558), so the header stays aligned with its column.

Scope matches the issue; no unrelated changes beyond the adoption of #15859's commits described in the body.

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

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 31, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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

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

Read the tree at 20854a8. Looks correct to me, and the rebase resolved the conflict the review on #15859 predicted the right way: this head no longer adds Abandoned to ContributorProfile — it reuses the field #15802 landed (src/pkg/dashboard/contribute_profiles.go:196, kept at len(AbandonedPRs) by :371), and LeaderboardEntry.Abandoned already existed at contribute_leaderboard.go:20, so the only Go production change is the one-line copy at :69. No ranking input changes.

  • Landing: lbRow and the header in renderLeaderboard both emit eight children in the same order (contribute_landing.go:3357 stat after lb-spark, :3404 header after Trend), so the mobile nth-child(7)/(8) placement at :1557-1558 keeps the header over its column; the narrow grid at :1550 has five tracks, so 3/-1 on row 3 is valid.
  • Dashboard: static/index.html and static-src/js/contributors.js / sparklines-indicators.css carry the same edits, and the style-ratchet baseline drop (1425→1413) matches the twelve inline style= attributes moved into .contrib-lb-table classes.
  • The new test seeds profiles directly and asserts both an explicit 0 for a profile without the field and unchanged rank order, which is what [scanner] Add an abandoned column to the dashboard and contribute-landing leaderboards #15796 asks for.

Checks had not reported at the time of reading; nothing in the diff looks likely to turn them red.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#1589520854a8` sha256:e18b44a1503d3263ee5a506037f8bf359d1876ff2c85780f29677b98dcc07bb0 — download from the dashboard or `hivectl review evidence #15895`.

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/050-review-pending Review swarm requested; awaiting a verdict for the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[scanner] Add an abandoned column to the dashboard and contribute-landing leaderboards

1 participant