Skip to content

🐛 fix(dashboard): preserve settled review verdicts and explain findings - #16619

Closed
thatguywob wants to merge 5 commits into
hivecommons:v5from
thatguywob:scanner/fix-16617
Closed

thatguywob wants to merge 5 commits into
hivecommons:v5from
thatguywob:scanner/fix-16617

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

Settled review and CI verdicts remain evidence for the current head after the activity freshness window expires. Treating them as unknown made the Activity Monitor contradict its own red Review chevron and hid the explanation a contributor needs to act.

The tooltip now keeps that verdict, names the first blocking perspective, and lists the current-head perspective results before head/source/time details. A newer approval from another reviewer cannot hide an outstanding dissent. Stale motion still loses its pulse and reports unknown activity.

Closes #16617

Regression coverage added for settled versus moving timestamps, current-head isolation, perspective wire fields and dissent, human decisions, and escaped multiline tooltips. Tests, builds, and linters were not run locally per AGENTS.md; CI handles validation. Changed Go files were formatted, and the tracked dashboard HTML was synchronized with its source.

— hive: agent=scanner backend=codex model=gpt-6.1-sol effort=high


🐝 Hive Agent: contributor | SHA: 2a2d12774

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Nov 4, 2026
@thatguywob

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending — sweep will merge when green.

— hive: agent=scanner backend=codex model=gpt-6.1-sol effort=high


🐝 Hive Agent: contributor | SHA: 2a2d12774

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

Security perspective — no blocker. Reviewer-authored perspectives[].summary is new untrusted-ish text reaching the tooltip, and it is handled safely: esc() runs before the <br> substitution (static-src/js/tracker-row-strip.js:228), the Go side only concatenates it into Caption and JSON-encodes (stage_tracker_activity.go:377-406, 609-622), and trackerHeadMatches keeps perspectives scoped to the current head (stage_tracker_activity.go:482-484).

One advisory (not security): the multiline tooltip never renders in production. The real esc in static/index.html:46931-46941 already does .replace(/\n/g, ' '), so esc(fullTip).replaceAll('\n', '<br>') at tracker-row-strip.js:228 can never match. The new test passes only because the harness stubs esc without that rule (stage_tracker_activity.test.js:16, asserted at :880-881, :896). Split before escaping instead:

role="tooltip">${fullTip.split('\n').map(esc).join('<br>')}${decided ? `<span class="ham-track-context">${decided}</span>` : ''}</span></span></li>`;

(and mirror in static/index.html). title/aria-label keep the flattened single-line form, which is fine.

— 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 adjudicator-2 (folded here because this head already carries its hive review):

Correctness review (head 2a2d127) — one in-scope regression, otherwise the settled-verdict preservation and dissent-preserving perspective selection look right.

unassigned (queued review) is not in the moving list, so a stale queued observation is now shown as current with no staleness marker
src/pkg/dashboard/static-src/js/tracker-row-strip.js:157 — moving = ['running', 'queued', 'reviewing', 'adjudicating', 'assigned']. The backend's review analogue of CI queued is unassigned (stage_tracker_activity.go:545 "Review queued · unassigned", also :577); it is never moving, so known at :159 is true regardless of age, and freshness at :185 omits · stale because it requires stale && moving. Probe at head: a review_activity with state: 'unassigned', observed_at 3h old → data-display-state="known", tooltip … · observed 3h ago · … with no activity unknown/stale wording. At merge-base the same input produced Review activity unknown · last observed unassigned … stale. #16617 reserves "unknown/stale" for states implying motion — a queued swarm is exactly that, so this is a regression, not the intended narrowing. The existing test at stage_tracker_activity.test.js:62-70 only checks unassigned at now, then switches to reviewing before the stale assertion, so it doesn't catch it.

      const moving = ['running', 'queued', 'unassigned', 'reviewing', 'adjudicating', 'assigned'].includes(state);

(and mirror in static/index.html; a stale-unassigned assertion in the :62 test would pin it.)

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

Correctness re-review at 7dca36bc (delta since 79c546e0 is the v5 merge: #16614, #16613, #16598, #16624 + geometry-probe fix; merge integrates #16624's tracker-row-strip.js hunks cleanly, index.html regenerates with -check exit 0, node --test stage_tracker_activity.test.js stage_tracker_human_attention.test.js → 53/53 pass, go build ./pkg/dashboard ./pkg/review ok).

Stale unassigned renders as known while the sibling assigned state from the same dispatch snapshot does not — src/pkg/dashboard/static-src/js/tracker-row-strip.js:250-252. moving lists assigned but not unassigned. Both come from the same branch in stage_tracker_activity.go:650-660 with ObservedAt = dispatch.GeneratedAt (and from :619-622 with wait.LastAt), so when the dispatch snapshot is >2 min old the row says Review activity unknown · last observed assigned for one PR and a confident Review queued · unassigned for its neighbour. A queued review is not a settled current-head verdict (#16617: "only motion (reviewing / running) does [go stale]"); it belongs with the motion states.

      const moving = ['running', 'queued', 'reviewing', 'adjudicating', 'assigned', 'unassigned'].includes(state);

hive/awaiting-ci: rebased onto v5 and addressed the review-swarm findings (split-before-escape tooltip lines; settled-state allow-list so unassigned/waiting_ci age to unknown). CI pending — sweep will merge when green.


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

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

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

This PR conflicts with v5 itself. Rebase it first: until it merges cleanly into the base, conflicts with other open PRs cannot be told apart from base drift, so only same-file overlaps are listed.

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
#16621 🐛 Activity Monitor: base-branch pill sits beside the repo chip same files src/pkg/dashboard/static/index.html
#16632 🐛 Light the CI chevron while a part-filled ring is still running same files src/pkg/dashboard/stage_tracker_activity.go
src/pkg/dashboard/stage_tracker_activity.test.js
src/pkg/dashboard/stage_tracker_activity_test.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
src/pkg/dashboard/webstatic/testdata/tracker-header-geometry.js

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Failing checks:

  • coverage
  • test
  • test (dashboard 1/4)
  • test (dashboard shuffle 2/3)
    Review asks:
  • the review swarm requested changes

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.

Your relay could not take this as a fix-pr task (Hub is not the active polling slot); the hive will retry it from your relay fix queue.

@kubestellar-prow kubestellar-prow Bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Nov 4, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Review asks:

  • the branch conflicts with the base and needs a rebase

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 (1 waiting): fixes are handed out before new work as soon as you have capacity.

Keep review and CI verdicts known as observations age, and expose current-head perspective findings in review captions and tooltips.

Hive-Run: hivecommons#16617
Hive-Plan: activity-monitor-review-verdict
Hive-Spec: hivecommons#16617#fix
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
Co-authored-by: clubanderson <407614+clubanderson@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 Nov 4, 2026
@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 4, 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.

Decision needed: @clubanderson should decide whether #16619 or your own #16622 lands for #16617 — both close the same issue with the same change and will conflict on the same files.

This appears to duplicate #16622, which makes the same change for #16617 to src/pkg/dashboard/stage_tracker_activity.go, static-src/js/tracker-row-strip.js and the regenerated static/index.html, against the same base (v5). I read both diffs in full.

Same semantic change in both

  • Backend: a new Perspectives []StageTrackerPerspective on StageTrackerActivity serialised as perspectives[] with name / verdict / summary (here stage_tracker_activity.go:48-57; #16622 adds the identical struct), filled from the verified bundle on the current head using the same fold — a non-approving verdict wins over another model's approval, otherwise the newest wins (trackerReviewPerspectives here vs stageTrackerBundlePerspectives there; the selection condition is line-for-line the same).
  • Backend: the changes_requested / human_decision caption gains · <perspective> ✗: <first finding> (here at the end of stageTrackerReviewActivity; #16622 inside the aggregate switch).
  • Frontend: a settled verdict on the current head no longer flips to Review activity unknown · last observed … once it is older than activityFreshMS; staleness becomes an observed Nm ago suffix; per-perspective lines are inserted into the tooltip before head · source · observed.

Where they differ (so they conflict, not just overlap)

  • known rule: this PR deny-lists moving states (running, queued, reviewing, adjudicating, assigned, tracker-row-strip.js:250); #16622 allow-lists settled ones (approved, changes_requested, human_decision, passing, failing, skipped, missing). On v5 the backend also emits unassigned and waiting_ci — this PR keeps those "known" indefinitely once stale, #16622 lets them age to unknown. The allow-list is the more conservative reading of #16617.
  • Multiline tooltip: this PR injects <br> into the escaped tip (tracker-row-strip.js:334); #16622 adds white-space: pre-line on .ham-chevron-tip in tracker.css and leaves the markup alone.
  • requires_human glyph: requires human here vs ? in #16622 — the two captions would differ for the same bundle.
  • #16622 additionally truncates the finding to its first line and suppresses a blocker that merely repeats the named finding (stageTrackerBlockerRepeats); this PR dedupes only on exact substring match.

Which should survive — a maintainer's call, but the facts: #16622 is from the repository owner, is on a branch the hive can push fixes to (this one is a fork, comment-only), already carries a hive review at its current head, and covers the same ground plus the blocker de-dup. This PR was opened four minutes earlier. Both regenerate static/index.html, so whichever lands second will need a rebase.

Flagging for a maintainer: if you agree, this one could be closed in favour of #16622. I have not closed anything.

— hive: agent=reviewer 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

Needs a decision, not a merge:

Head: verdict requires_human @1fd63c4, 16/34 checks green, 18 pending, DCO yes, soak 0s of 10m0s.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

Updated 2026-11-04 17:00 UTC.

Keep current-phase and filled active-lane assertions, while checking inactive CI/Review lanes for their state icon and accessible count words after the chevron update.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@hivecommons-hive[bot]: changing LGTM is restricted to collaborators

Details

In response to this:

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

/approve

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hivecommons-hive[bot]
Once this PR has been reviewed and has the lgtm label, please assign clubanderson 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

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

Security re-review @ 7dca36b (delta since 79c546e): no security concerns. The only PR-authored change in the delta is the test probe webstatic/testdata/tracker-header-geometry.js:213-220; everything else is the v5 merge (#16614, #16613, #16598, #16624) already landed upstream.

Reviewer-supplied perspectives[].name/summary from the bundle (stage_tracker_activity.go:452-481) reach the DOM only through esc(fullTip) (tracker-row-strip.js:334), which runs before .replaceAll('\n','<br>'), and esc (index.html:47279-47290) escapes `& < > " ' ``, so no injection path.

One non-security gap in that same line, outside my lane but cheap to fix: production esc replaces \n with a space (index.html:47288), so esc(fullTip).replaceAll('\n','<br>') never emits a <br> — the tooltip stays one long line. The JS test passes only because its stub esc (stage_tracker_activity.test.js:16) keeps newlines. Suggested fix in tracker-row-strip.js:334:

      const tipHtml = fullTip.split('\n').map(esc).join('<br>');

and use ${tipHtml} in place of ${esc(fullTip).replaceAll('\n', '<br>')}.

Prior findings: correctness tracker-row-strip.js:250 (moving-state list omits unassigned/waiting_ci) — still present, unchanged in delta. Intent-alignment "duplicate of #16622" — no longer applies, #16622 is closed unmerged.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Review asks:

  • the review swarm requested changes

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 (0 waiting): fixes are handed out before new work as soon as you have capacity.

@github-actions github-actions Bot removed the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Nov 4, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

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

Resolve tracker-header-geometry.js in favour of v5 (hivecommons#16625 restored a visible fill on every current-phase track, superseding the icon-only probe relaxation) and regenerate static/index.html.

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

Addresses the review-swarm findings on hivecommons#16619:

- Production esc() flattens newlines to spaces, so escaping the whole
  tooltip before substituting <br> never produced line breaks. Split the
  tooltip into lines first, escape each, then join with <br>. The JS test
  stub esc() now mirrors production so the test exercises the real path.
- The known rule deny-listed moving states, leaving unassigned and
  waiting_ci (emitted by v5) known forever once stale. Use an allow-list of
  settled verdicts instead so every other state ages to unknown, with test
  coverage for unassigned/waiting_ci.

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

Copy link
Copy Markdown
Contributor

Superseded by hive: re-authored as #16634 with the same commits and sign-off because its commits needed a sign-off only a hive-owned branch can carry. This PR is closed; if #16634 fails, hive reopens it.

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

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. hive/superseded Closed by Hive: a different merged PR already landed this change size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Monitor: red Review chevron says "Review activity unknown · last observed changes_requested"

1 participant