Skip to content

🐛 Review and CI chevrons state what the head waits on, never "activity unknown" - #16662

Merged
hivecommons-hive[bot] merged 2 commits into
v5from
fix/review-track-never-unknown
Nov 4, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
v5from
fix/review-track-never-unknown

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Supersedes #16634, Fixes #16617 and Fixes #16661

Operator: an icon-only Review chevron whose tooltip said "Review activity unknown" — "not helpful to anyone."

What changes

  • Go — stage_tracker_review_fallback.go (new): stageTrackerReviewFallbackState turns a Review track that is still unknown after the verdict / dispatch / review-pending derivations into a statement, in order: merged/closed → Review · n/a (closed); draft → Review · draft, not requested; CI on the head running/queued/not all reported (or a partial ring) → Review · waiting for CI; CI done → Review · not started · hive reviewer next (· needs reviewer when no hive reviewer lane is configured); nothing fetched for the head → Review · no data for head <sha7> yet · refreshing (the only no-data wording, and it names the next step). CI's own no-data caption becomes CI · no checks observed for head <sha7> yet · refreshing.
  • Settled verdicts explain themselves (Activity Monitor: red Review chevron says "Review activity unknown · last observed changes_requested" #16617 / 🐛 fix(dashboard): preserve settled review verdicts and explain findings #16634 intent): review_activity.perspectives[] (name, verdict, first finding; a blocking verdict outranks another backend's approval on the same perspective) and a detail sentence ("Changes requested by the hive reviewer: 1 perspective posted findings …"). An aggregate approval the verified bundle does not back is state unverified ("Review · aggregate approves · evidence not verified"), not unknown.
  • JS — tracker-row-strip.js: the "<Track> activity unknown · last observed <state>" prefix is gone; settled states stay known past the freshness window (staleness is dated: stale · <ts> (12m ago)), a settled verdict's age and perspective lines ride in the tooltip, derived states carry their caption as words when the column is the stage's own, legacy Review unknown · reason captions from an older spoke are rewritten, and the code-lane detour's "activity unknown" no longer leaks into the Review tooltip.
  • Tests: Go table per evidence source (TestStageTrackerReviewFallbackStateDerivesAConcreteStatement), inputs reader, perspectives dissent/detail; node fixture #16661 (waiting_ci / not_started / draft / closed / unverified / none / legacy / settled-with-perspectives); prelude invariant over all row fixtures: no CI/Review tooltip contains activity unknown, CI unknown or Review unknown.
  • Docs: rule 5 in Chevron activation — the canonical rules.

#16634

Its two intents — settled review/CI verdicts persist as observations age, and the tooltip lists each perspective's verdict + finding — are included here (same perspectives shape). It was red on an unrelated api_repo_item_decision_test.go expectation; this PR supersedes it.

…, never "activity unknown"

A Review track with no verdict and no reviewer in flight now derives a
concrete statement from the PR's lifecycle and its CI track
(stage_tracker_review_fallback.go): closed/merged, draft, waiting for CI,
not started (+ who is next), or — only when nothing was fetched for the
head — "no data for head <sha7> yet · refreshing". The UI drops the
"activity unknown · last observed …" prefix: settled verdicts stay known
as observations age (dated in the tooltip), and a settled review explains
itself — who decided, how long ago, each perspective's verdict with its
first finding (perspectives field, dissent preserved). An aggregate
approval the verified bundle does not back reads "evidence not verified"
instead of unknown. Fixture invariant: no CI/Review tooltip contains
"activity unknown" / "CI unknown" / "Review unknown".

Supersedes #16634.
Fixes #16617
Fixes #16661

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 4, 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 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
#16634 🐛 fix(dashboard): preserve settled review verdicts and explain findings CONFLICT src/pkg/dashboard/stage_tracker_activity.go
src/pkg/dashboard/static-src/js/tracker-row-strip.js
src/pkg/dashboard/static/index.html
#16615 ✨ feat(ci): approve gated workflows for trusted PR heads same files src/pkg/dashboard/stage_tracker_activity.go
#16659 🐛 Activity Monitor: celebrate externally merged PRs with bee + toast naming the merger same files src/pkg/dashboard/static/index.html
#16637 🐛 Stage tracker: say CI running (not activity unknown) when checks are still pending CONFLICT src/pkg/dashboard/static-src/js/tracker-row-strip.js
src/pkg/dashboard/static/index.html
#16660 🐛 fix: label narrow dashboard navigation same files src/pkg/dashboard/static/index.html

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

Intent alignment vs #16617 / #16661 (read at head 2a89b93)

The fallback ladder, perspectives[], the settled-stays-known UI change and the fixture invariant all land as described. One in-scope gap:

1. · needs reviewer (#16661 rule 4) is unreachable — ReviewerLane is always true.
stage_tracker_build.go:478 and :555 pass len(expectedPerspectives) > 0 as the "repo has a hive reviewer lane" signal, but stageTrackerExpectedPerspectives (stage_tracker_activity.go:356-366) falls back to review.DefaultPerspectives (pkg/review/review.go:38) whenever config names none, so it is never empty. The needs reviewer branch in stage_tracker_review_fallback.go:82-88 is covered only by the unit table that sets the flag directly; in production every CI-done head reads hive reviewer next, including hives with no reviewer configured — the PR body's "· needs reviewer when no hive reviewer lane is configured" is not implemented. The configured lane is cfg.Review.ReviewerAgents (pkg/config/config.go:7857), which is in scope at the same call site (cfg is used at stage_tracker_build.go:58):

--- a/src/pkg/dashboard/stage_tracker_build.go
+++ b/src/pkg/dashboard/stage_tracker_build.go
@@ -58 +58,2 @@
 	expectedPerspectives := stageTrackerExpectedPerspectives(cfg)
+	reviewerLane := cfg != nil && len(cfg.Review.ReviewerAgents) > 0
@@ -478 +479 @@
-		stageTrackerReviewFallbackState(it.ReviewActivity, stageTrackerReviewFallbackInputsFor(&it, pr, len(expectedPerspectives) > 0))
+		stageTrackerReviewFallbackState(it.ReviewActivity, stageTrackerReviewFallbackInputsFor(&it, pr, reviewerLane))
@@ -555 +556 @@
-			stageTrackerReviewFallbackState(it.ReviewActivity, stageTrackerReviewFallbackInputsFor(it, currentPR, len(expectedPerspectives) > 0))
+			stageTrackerReviewFallbackState(it.ReviewActivity, stageTrackerReviewFallbackInputsFor(it, currentPR, reviewerLane))

(Still hive-wide rather than per-repo as #16661 words it; if a per-repo signal exists, prefer it. Either way a build-level test asserting needs reviewer with empty ReviewerAgents would keep the branch live.)

2. (advisory, low) #16617 fix item 2 asks that the caption name the first failing perspective (correctness ✗: <summary>). Here the caption stays Review findings · awaiting author (stage_tracker_activity.go:613) and the perspective lines ride only in the tooltip (tracker-row-strip.js:330). The tooltip does answer "which perspective and why", so this is acceptable, but the PR body/changelog should not imply the chevron words do.

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

@hivecommons-hive

hivecommons-hive Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

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

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

docs-currency — read at head 2a89b93. Two places where operator-facing text lags the behaviour this PR adds; both are one-line fixes.

  1. src/docs/api-reference/dashboard-misc.md:8 does not list the new review_activity.perspectives[] field. StageTrackerActivity.Perspectives (src/pkg/dashboard/stage_tracker_activity.go:51) now ships perspectives: [{name, verdict, summary?}] on the public /api/stage-tracker payload, but the only shape doc still reads {head, state, caption, actor?, source, observed_at?, since?, blocker?, url?, active?}.

    `{head, state, caption, detail?, actor?, source, observed_at?, since?, blocker?, url?, active?}`; `review_activity` additionally carries `perspectives?: [{name, verdict, summary?}]` — one entry per perspective's latest verdict on the head, with its first finding ([#16617](https://github.com/hivecommons/hive/issues/16617)).
    
  2. Rule 5 in src/docs/dashboard-sections/activity-monitor.md:442 names captions that differ from what the code emits.

    • It says merged or closed render Review · n/a (closed), but a merged PR renders Review · n/a (merged) (stage_tracker_review_fallback.go:63).
    • It calls CI · no checks observed for head … yet · refreshing "the one no-data wording", but that is only the Go caption (stage_tracker_review_fallback.go:190); when the row has no ci_activity for the head at all the UI composes CI · no data for head <sha7> yet · refreshing itself (static-src/js/tracker-row-strip.js:275, :575), so operators will see both.
    • The unverified state (Review · aggregate approves · evidence not verified, stage_tracker_activity.go:577) is described in the PR body but absent from the rule.
      Suggested rewording of the affected clauses:
    -the PR is merged or closed (*Review · n/a (closed)*), it is a draft
    +the PR is merged or closed (*Review · n/a (merged)* / *Review · n/a (closed)*), it is a draft
    ...
    -The one no-data wording, *Review · no data for head f269349 yet · refreshing* (CI: *CI · no checks observed for head … yet · refreshing*), appears only when the spoke has fetched nothing for the head, and names the next step.
    +An aggregate approval the verified bundle does not back reads *Review · aggregate approves · evidence not verified*. No-data wording — *Review · no data for head f269349 yet · refreshing*; for CI, *CI · no checks observed for head … yet · refreshing* from the spoke, or *CI · no data for head … yet · refreshing* when the page has no CI observation for the head at all — appears only when nothing has been fetched for the head, and names the next step.

    (Or, simpler: make the JS fallback at tracker-row-strip.js:275/:575 use the same no checks observed phrase for CI so the doc's "one wording" claim holds.)

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

Correctness review (head 2a89b93) — no blocker; the fallback ordering (verdict → dispatch → review-pending → fallback, stage_tracker_build.go:478 / :555) and the deferred unverified state (stage_tracker_activity.go:575-580) hold up; stageTrackerReviewPendingState and stageTrackerLeadApproveForSignOff are unaffected by the new states. Two low edges:

  1. stage_tracker_review_fallback.go:131,138-146 — the "N perspectives posted findings" count disagrees with the perspectives[] list. reviewFindingCount counts trackerLatestBundleVerdicts entries, which are keyed per (perspective, backend, model) (stage_tracker_activity.go:486), while trackerReviewPerspectives folds to one per perspective. Two backends both posting changes_requested on security yields "2 perspectives posted findings · security ✗: …". And when the aggregate says changes_requested with no blocking bundle verdict at head (stage_tracker_activity.go:613), the detail reads "0 perspectives posted findings". Count over the folded list instead:

    	case "changes_requested":
    		n := 0
    		for _, p := range trackerReviewPerspectives(bundle) {
    			if p.Verdict != "approve" {
    				n++
    			}
    		}
    		if n == 0 {
    			return fmt.Sprintf("Changes requested by %s on this head; the fix is owed before a re-review.", by)
    		}
    		return fmt.Sprintf("Changes requested by %s: %s posted findings on this head; the fix is owed before a re-review.", by, plural(n, "perspective"))
    

    (reviewFindingCount then becomes unused and can go.)

  2. stage_tracker_review_fallback.go:60-90 — derived states ship with no observed_at. trackerUnknownActivity (stage_tracker_activity.go:64) sets no time and the fallback does not add one, so the real tooltip for waiting_ci / not_started / … ends · derived-from-pr-state · observation time unknown (tracker-row-strip.js:318, and :583 in the stage summary). The #16661 node fixture always passes observed_at, so it never renders that path. Carrying the CI track's time over keeps the payload stable across polls:

    	out.Source = reviewSourceDerived
    	if ci := in.CI; ci != nil && strings.EqualFold(ci.Head, in.Head) && ci.ObservedAt != nil {
    		at := *ci.ObservedAt
    		out.ObservedAt = &at
    	}
    

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

Why:

  • the review swarm requested changes

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.

Evidence bundle `#166625790865` sha256:144d2c8748dd8d73391121e3fa89207175308978c5c2be2604dbb712a933aacd — download from the dashboard or `hivectl review evidence #16662`.

@hivecommons-hive
hivecommons-hive Bot merged commit 8ff1652 into v5 Nov 4, 2026
83 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/review-track-never-unknown branch November 4, 2026 21:14
@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 5790865.

@github-actions

github-actions Bot commented Nov 4, 2026

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

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

Intent-alignment re-review at head 5790865 (delta vs 2a89b93 is only the v5 merge — the PR's own diff is byte-identical apart from hunk offsets, so the two prior intent findings stand unchanged).

1. Still present — ReviewerLane is always true, so · needs reviewer is dead (src/pkg/dashboard/stage_tracker_build.go:481, stage_tracker_review_fallback.go:78-81)
The flag is passed as len(expectedPerspectives) > 0, but stageTrackerExpectedPerspectives (stage_tracker_activity.go:368-377) always falls back to review.DefaultPerspectives, so the length is never 0 and the PR body's "· needs reviewer when no hive reviewer lane is configured" cannot occur. Wire it to the actual reviewer configuration:

		stageTrackerReviewFallbackState(it.ReviewActivity, stageTrackerReviewFallbackInputsFor(&it, pr, cfg != nil && len(cfg.Review.ReviewerAgents) > 0))

(or, if the hive can dispatch review without reviewer_agents, drop the branch and the · needs reviewer wording from the body/docs so the text matches what can ship).

2. Still present — the caption does not name the failing perspective (src/pkg/dashboard/stage_tracker_activity.go:613,624)
#16617 fix item 2: "the caption names the first failing perspective (correctness ✗: <summary>)". Both changes_requested branches still emit the fixed "Review findings · awaiting author"; the perspective only appears in perspectives[]/detail, so the chevron's own caption still can't say which perspective failed. out.Perspectives is already populated at :587 before this point, so:

 			case "changes_requested", "reject":
 				out.State, out.Caption = "changes_requested", "Review findings · awaiting author"
+				for _, p := range out.Perspectives {
+					if p.Verdict == "changes_requested" || p.Verdict == "reject" {
+						out.Caption = "Review findings · " + p.Name + " ✗ · awaiting author"
+						break
+					}
+				}
 				out.Blocker = stageTrackerFixerExhaustedSummary(agg)

and the same loop in the bundle-fallback branch at :624. Update the Review findings · awaiting author expectations in stage_tracker_review_fallback_test.go / the #16661 node fixture accordingly.

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

hivecommons-hive Bot added a commit that referenced this pull request Nov 4, 2026
v5 (#16662) landed its own StageTrackerPerspective, trackerReviewPerspectives
and the settled-state/ago-word tooltip for #16617. Keep the
v5 shapes and wording (single-line ' · ' perspectives, 'stale · <iso> (Nm ago)',
never 'activity unknown', waiting_ci is settled) and carry over what this
branch still adds on top: the dissent-first tie-break in
trackerLatestBundleVerdicts, the first finding appended to the
changes_requested/human_decision caption on both sides, the blocker dedupe,
and gating tooltip perspectives on a known display state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: quality <280983584+hivecommons-hive[bot]@users.noreply.github.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

1 participant