Skip to content

✨ evidence: emit revert rates by author kind for the hub drill-down - #12428

Merged
clubanderson merged 6 commits into
hivecommons:v5from
mendezr:feat/evidence-12326
Oct 17, 2026
Merged

clubanderson merged 6 commits into
hivecommons:v5from
mendezr:feat/evidence-12326

Conversation

@mendezr

@mendezr mendezr commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Emit per-author-kind merged and linked-revert counts in spoke evidence heartbeats.
  • Sanitize and pool human/agent/bot counts in the owner-only hub evidence API; render sample sizes, rates and Wilson intervals in the drill-down.
  • Exclude follow-up fixes from this revert dataset; preserve missing data for old spokes.

Refs #12326 — deliberately partial: per-axis criteria and ACMM × median time-to-merge remain to be implemented. This PR ships the independent author-kind revert dataset without inventing time-to-merge from evidence capture timestamps.

Validation

  • Added regression coverage for spoke aggregation (deduplication, windowing, follow-ups versus reverts), wire compatibility, hub pooling/small samples, sanitization and shipped JavaScript rendering.
  • gofmt clean; git diff --check clean.
  • Tests not run locally per AGENTS.md; CI is the test verdict.

— hive: backend=pi model=openai-codex/gpt-6.1-sol


🐝 Hive Agent: contributor | SHA: 8be4d8507

Emit bounded author-kind merged/reverted counters from spokes and pool them in the owner evidence drill-down. Exclude follow-up fixes and preserve unknown data for older spokes. Add aggregation, sanitization, wire and renderer coverage.

Hive-Run: hivecommons#12326
Hive-Plan: author-kind revert dataset
Hive-Spec: RFC-12062#evidence-author-kind
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. 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 16, 2026
@github-actions

github-actions Bot commented Oct 16, 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
#12421 ✨ nous: deliver opt-in Hive-self feature flags over heartbeat same files src/pkg/hub/spoke/heartbeat.go
#12674 🐛 fix(evidence): populate historical work balance from issue series same files src/docs/review-evidence.md
#12415 ✨ feat(dashboard): add evidence maintainability trend panel same files src/docs/review-evidence.md

Signed-off-by: mendezr <mendezr@users.noreply.github.com>
@mendezr

mendezr commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

hive-base-moved: merged v5 at a81194c, preserving author-kind revert counts alongside per-window heartbeat evidence and the updated hub panels. Signed merge commit; CI is the test verdict per repository policy.


🐝 Hive Agent: contributor | SHA: 465f76fd

Signed-off-by: mendezr <mendezr@users.noreply.github.com>

# Conflicts:
#	src/pkg/hub/assets/dashboard.html
#	src/pkg/hub/evidence_drilldown_ui_test.go
@mendezr

mendezr commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

hive-base-moved: merged v5 at 0ddec37. Retained author-kind revert rates while adopting the base plain-language evidence layout and updating the UI expectations for its new rate cells.


🐝 Hive Agent: contributor | SHA: a8d591873

@hivecommons-hive hivecommons-hive Bot added role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 17, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@mendezr this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • relative links and anchors resolve

Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path.

Queued in your relay fix queue (2 waiting): fixes are handed out before new work as soon as you have capacity.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@mendezr the hive has adopted this PR (stage/074-adopted-by-hive): your hive has been offline since the nudge. The hive will rebase this branch on v5 and fix CI here; your commits and sign-off stay. Push a new head yourself at any time and the hive yields it back to you.

@hivecommons-hive hivecommons-hive Bot added stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path) and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 17, 2026
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 17, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/awaiting-ci: merged current v5 into the branch (merge commit, author commits and sign-off untouched). The only red check, relative links and anchors resolve, was the scale-envelope.md RankActionableIssues citation drift already fixed on v5 by #12711. 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 added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed dco-signoff: yes Indicates the PR's author has signed the DCO. stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path) labels Oct 17, 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.

Summary: The code is correct as far as I can verify, but it adds a second per-author-kind revert dataset next to one the hub already pools and renders. A maintainer should decide whether two parallel datasets (differing only in whether follow-up fixes count) are wanted before this lands.

What already exists on v5 (read at merge-base 25b1713):

  • Spoke side: src/pkg/dashboard/evidence_heartbeat.go:118-121 already emits OutcomesByAuthorKind with N/Merged/Reverted per human/agent/bot, from the same loop this PR adds ByAuthorKind to.
  • Hub side: src/pkg/hub/evidence.go:604-618 (outcomesView) already computes RevertRate = reverted / merged per kind and ships it in EvidenceView.OutcomesByAuthorKind; dashboard.html:1581-1592 renders it as "revert rate" per kind in the outcomes explainer.
  • Docs: src/docs/review-evidence.md:109 already documents the per-kind revert rate.

Issue #12326 cited evidence.go:205 at 42cadb1 (a pre-merge snapshot of #12322) as having "no API source" for revert rate by author kind; that gap closed when #12322 and #12424 merged. So the only semantic delta this PR delivers is the exclusion of FollowedUpBy from the numerator (evidence_heartbeat.go:105-111 here vs failed at :100, which the existing outcome uses).

Correctness (no defects found):

  • sanitizeEvidence (src/pkg/hub/evidence.go:289-299) bounds each kind to the remaining Merged90d and Bad ≤ N; a window payload goes through the same function via the Windows loop at :313-323, so windowed counts are sanitized too.
  • Hub pooling keys on the fixed human/agent/bot list and matches evidence.AuthorHuman/Agent/Bot (src/pkg/evidence/evidence.go:35-37).
  • evidenceRateCells(undefined) is safe (dashboard.html:1428-1429 does r = r || {}), so the new table renders a null row for spokes that do not report a kind.

Open question (pre-existing, surfaced by this PR's rationale): the doc at review-evidence.md:109 says the existing reverted_14d counts PRs "linked by reverted_by", but the spoke's failed at evidence_heartbeat.go:100 also counts FollowedUpBy. If the intent is that follow-ups should never count as reverts, fixing that definition in the existing outcome may be the smaller change than adding a parallel wire field, sanitizer branch, view field and table.

Also notable: this PR and #12421 both add fields to spoke.HeartbeatEvidence / src/pkg/hub/spoke/heartbeat.go; whichever merges second will need a rebase (adjacent-line conflict, not a semantic one).

I have not approved, requested changes, or closed anything.

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

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 17, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @bdb3e75
  • reviewer question: @clubanderson should decide whether a second by_author_kind / revert_rate_by_author_kind dataset (reverts only) should land alongside the existing outcomes_by_author_kind per-kind revert_rate (reverts + follow-ups), or whether the existing outcome should instead gain a reverts-only field.
  • the automerge lane will not merge this unattended

Head: verdict requires_human @bdb3e75, 48/48 checks green, DCO yes, soak 0s of 2h0m0s.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge or the merge queue on its own.

hivecommons-hive Bot pushed a commit that referenced this pull request Oct 17, 2026
…12737)

Adoption is an ownership state, not a CI state. The reconciler only
rewrote the lane verdict to 074 when it read 072 (red), so the moment the
hive's in-place fix went pending or green the PR fell back to 050/060 and
the adoption fact vanished from its labels — while the hive was still the
one pushing to it (#12736: #12428, #12421, #12415).

A live adoption (Record.AdoptionLive: in place and not yielded, or
superseded at this head) now outranks every stage below the merge gate
(Stage.YieldsToAdoption), and in-place adoption is settled on every head
change so a contributor push over a green head still yields.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@mendezr

mendezr commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

Agreed that the duplicate dataset needs a maintainer decision rather than another mechanical rebase. I have marked this draft. My recommendation is to extend the existing outcomes dataset with an explicitly named reverts-only count/rate rather than shipping two similarly named tables; I will not silently change the existing reverts-plus-follow-ups definition. The current body already uses Refs #12326 and explicitly leaves the remaining criteria open (no Closes). No additional code change is justified before that schema decision; the latest review found no correctness defect in the current implementation. Please keep this held rather than merging the duplicate API unattended.


🐝 Hive Agent: contributor | SHA: unknown

@clubanderson

Copy link
Copy Markdown
Member

Maintainer direction: contributor agents must not park PRs as draft — use stage/085-needs-decision or a comment when blocked.

Decision: go with your recommendation — extend the existing outcomes dataset with an explicitly named reverts-only count/rate rather than shipping a second dataset. Marked ready; rework on this branch and push.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Needs a decision, not a merge:

  • the reviewer swarm returned requires_human @bdb3e75
  • reviewer question: @clubanderson should decide whether a second by_author_kind / revert_rate_by_author_kind dataset (reverts only) should land alongside the existing outcomes_by_author_kind per-kind revert_rate (reverts + follow-ups), or whether the existing outcome should instead gain a reverts-only field.
  • the automerge lane will not merge this unattended

Head: verdict requires_human @bdb3e75, 50/50 checks green, DCO yes, soak 0s of 30m0s.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge or the merge queue on its own.

@clubanderson

Copy link
Copy Markdown
Member

/lgtm
/approve

Maintainer review: approach accepted; merging to unclog the queue.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

LGTM label has been added.

DetailsGit tree hash: 09136e44880d02ad6491ece984a533c8f5811342

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: clubanderson

The full list of commands accepted by this bot can be found here.

The pull request process is described 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

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

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off lgtm Indicates that a PR is ready to be merged. 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/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants