Skip to content

✨ hub evidence: plain-language findings first, consistent buckets, no issue numbers in copy - #12467

Merged
hivecommons-hive[bot] merged 1 commit into
v5from
feat/hub-evidence-plain-language
Oct 16, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
v5from
feat/hub-evidence-plain-language

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Closes #12456. Part of RFC #12062. cc @mrbobbytables

Hub-admin feedback on the Fleet-evidence modal after #12424: "i dont understand what any of this means". This PR makes the view findings-first, in plain words, and adds a downloadable report of the same view.

What changed

Findings first. A What this says block (3–6 generated sentences) sits above every table, and each section carries a one-line plain finding under its title. Generated in Go (evidence_findings.go, shipped as findings[] on /api/hub/evidence) with a byte-identical JS mirror used when a hive / level filter is active (TestEvidenceFindingsParity). Every sentence has an explicit "not enough data" fallback; no invented numbers.

Plain labels. "Selection"/"Fleet" → All selected hives (a single-hive selection shows (same hive as above) instead of a duplicate row); "95% CI" → margin (95%) with the gloss "the true value is very likely inside this range"; "Coverage n" → Merged PRs; "Bucket" → Reviewer confidence; false approve / false block glossed on first use.

Consistent confidence buckets. The heartbeat's six integer buckets are folded into the spoke card's four ranges on the hub side and labelled with both ("Very confident (0.83–1.0)"). Pooled buckets now carry bad so the regroup needs no rounded-rate reverse engineering. Mapping (and the 0.67/0.83 ≈ 0.7/0.9 caveat) documented in review-evidence.md.

No issue numbers or internal names in UI copy. Absent panels are listed once under Waiting on hives at the bottom in user-facing words ("hives report this once upgraded to the Oct 16 build or later" / "shadow mode is off on every selected hive"); the technical pointer lives only in the ⓘ explainer. TestEvidenceModalNoIssueNumbers greps the rendered modal (fleet, small, single-hive and empty selections) for #\d{4,} and internal wording.

Sections ordered by signal. Tables with data first; absent ones collapse into the waiting list. #12424's sticky headers, windows, ⓘ explainers and 🔬 button are kept; explainer wording updated to the new labels.

Layout fix (user screenshot). Modal widens to min(96vw, 1600px); the per-hive table scrolls horizontally inside a wrapper with the HIVE column position: sticky; left: 0 on an opaque background; every rate cell folds its N in ("10.0% of 40") with the margin as a muted second line, so Per-hive is HIVE · AUTONOMY · FAMILY MIX · FALSE APPROVE · FALSE BLOCK · MERGED · REVERTED. Same N-in-cell pattern on every table. CSS via classes only (TestEvidenceLayoutClasses; TestStyleRatchet green).

Downloadable plain-language report (in addition to the modal content, nothing on screen removed). 📄 Report (HTML, new tab) and ⬇ Markdown (download) links in the window row carry the current window + hive/level filter. Backend GET /api/hub/evidence/report?hive=&level=&hours=|from=&to=&format=md|html&download=1, requireAdmin like /api/hub/evidence, rendered in Go from the same EvidenceView so it reconciles exactly. Markdown canonical; HTML is a standalone page with inline CSS, no scripts/external assets, hive names escaped. Sections: Summary · What we measured and why · The numbers · How to read these · What is not reported yet and why · Grade per section (thresholds spelled out) · footer link to review-evidence.md. Content-Disposition: attachment; filename="hive-evidence-<hive|fleet>-<from>-<to>.md|html" for download=1, inline otherwise.

Guardrail

Evidence is record/read-only. Nothing here is consulted by any merge decision or touches merge eligibility.

Tests

  • Go: golden markdown (testdata/evidence_report_{fleet,hive}.golden), HTML escaping, endpoint (403 non-admin, md/html, inline/attachment, 400s), hive=/level= filters, confidence-range folding, findings fallbacks.
  • UI (node harness): findings block + per-section findings, no issue numbers, Go↔JS findings parity (fleet, hive-filtered, level-filtered), report links href, single-hive same-row, layout classes, plus all existing modal tests updated to the new markup.
  • go test ./pkg/hub/... -count=1 -run 'Evidence|StyleRatchet' green locally.

Docs

review-evidence.md hub section rewritten (findings-first, plain-labels table, confidence-range mapping, Downloadable report subsection); api-reference.md new /api/hub/evidence/report row + hive=/level=/findings[]/bad on /api/hub/evidence (citations re-verified); changelog.d/added-12456-hub-evidence-plain-language.md.

… issue numbers in copy

Hub Fleet-evidence modal now leads with a generated 'What this says' block
and a one-line finding under every table (Go generator in
evidence_findings.go, byte-identical JS mirror for filtered selections,
explicit not-enough-data fallbacks). Jargon labels replaced; the six
heartbeat calibration buckets fold into the spoke card's four
reviewer-confidence ranges; absent sections collapse into one 'Waiting on
hives' list with no issue numbers in visible copy (guarded by test).

Layout: modal widens to min(96vw, 1600px); per-hive table is horizontally
scrollable with a sticky hive column; every rate cell folds its N in
('X% of N') with the margin (95%) as a muted second line.

New admin-only GET /api/hub/evidence/report (format=md|html, download=1,
same window and hive/level filters) renders the same EvidenceView as a
standalone plain-language report; linked from the modal's window row.

Read-only; nothing touches merge eligibility.

Closes #12456

Signed-off-by: Andy Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 16, 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 the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 16, 2026
@github-actions

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
#12428 ✨ evidence: emit revert rates by author kind for the hub drill-down CONFLICT src/pkg/hub/assets/dashboard.html
src/pkg/hub/evidence_drilldown_ui_test.go
#12421 ✨ nous: deliver opt-in Hive-self feature flags over heartbeat same files src/docs/api-reference.md
src/pkg/hub/server.go

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 16, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 0ddec37 into v5 Oct 16, 2026
69 of 70 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

merged by Hive trusted-author auto-merge: author @clubanderson holds role owner and GitHub permission admin on repo; CI green at 333e032.

@kubestellar-prow
kubestellar-prow Bot deleted the feat/hub-evidence-plain-language branch October 16, 2026 16:31
@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

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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ hub evidence: lead with plain-language findings, not tables

1 participant