Skip to content

✨ feature: carry abandoned counts through the hub leaderboard - #15894

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
hive/adopt-15865
Oct 30, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
hive/adopt-15865

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Fixes #15799

This branch is #15865's head 315d07a1a344 as pushed by @mendezr (fork mendezr/hive), unchanged. Last lane reason on the original: fork-not-editable.

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.

Share heartbeat and task-status row conversion, merge abandoned counts across public spokes, and document the additive wire field. Include the prerequisite dashboard row field shared with #15859; profile population remains in that PR.

Hive-Run: #15799
Hive-Plan: 15799-heartbeat-and-hub-leaderboard
Hive-Spec: issue-15799#acceptance
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@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 nicholasjackson 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 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
#15859 ✨ feature: add abandoned counts to contributor leaderboards same files src/pkg/dashboard/contribute_leaderboard.go

@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 role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels 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.

Read the diff against the tree at 315d07a (src/pkg/hub/server.go, src/pkg/hub/spoke/heartbeat.go, src/cmd/hive/main.go, src/pkg/dashboard/contribute_leaderboard.go). Looks correct to me.

What I verified

  • mergeLeaderboards (src/pkg/hub/server.go:4442-4475): the existing !h.IsPublic / empty-username / TrustTier == "agent" filters at :4445 and :4449 run before the new existing.Abandoned += lb.Abandoned at :4455, so the new test's expectation that private, agent and nameless rows contribute nothing holds. Older spokes omit the field, decode to 0, and the sum is unaffected. The relaxed drop rule at :4469 keeps a contributor whose only signal is abandoned PRs — matches #15799's scope.
  • leaderboardForSpoke (src/cmd/hive/leaderboard_heartbeat.go:10) is a faithful extraction of the two identical copy loops it replaces in main.go (:979 heartbeat, :5606 task-status push), plus the new field — both payload paths now carry abandoned, which is what the issue's acceptance asks for.
  • LeaderboardForHub (src/pkg/dashboard/contribute_leaderboard.go:104) returns []dashboard.LeaderboardEntry, so the extraction type-checks.

Not a duplicate of #15859 — sibling, and they compose cleanly. #15859 (Fixes #15796) and this PR (Fixes #15799) are the two sub-issues of #15782 split along the dashboard/hub seam. The only shared hunk is the Abandoned int \json:"abandoned"`struct line incontribute_leaderboard.go:20`, and it is byte-identical in both diffs, so either merge order is clean.

Sequencing note (not a defect): on this head nothing assigns dashboard.LeaderboardEntry.Abandoned — buildLeaderboardWithInputs (contribute_leaderboard.go:65) does not set it, and ContributorProfile on v5 has no Abandoned field yet. So until #15859 lands (it adds Abandoned: p.Abandoned at :69 plus the profile field) every spoke will send "abandoned": 0 and the hub will faithfully sum zeros. That is exactly what #15799 describes ("builds on the leaderboard abandoned field from #15796"), so this is fine to land first; just don't expect non-zero hub numbers until #15859 and the core writer in #15802 are in.

Minor: the new "Merged contributor leaderboard" section in src/docs/api-reference/hub-server.md was inserted above the "Part of the Dashboard REST API reference" preamble rather than below it like the other sections. Cosmetic only.

CI at this head: all test/coverage/changelog checks green; build (linux/arm64) still running at time of writing. Branch is 29 commits behind v5.

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

@hivecommons-hive
hivecommons-hive Bot merged commit 99afcd2 into v5 Oct 30, 2026
149 of 155 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the hive/adopt-15865 branch October 30, 2026 23:10
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#15894315d07a` sha256:1f5b7dd47907d31347ff1d3f7ee708ce9ab2d5e9a12e304f3dd7055804e3a4c2 — download from the dashboard or `hivectl review evidence #15894`.

@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] Carry abandoned counts in the spoke heartbeat leaderboard and the hub's merged /api/hub/leaderboard

1 participant