Skip to content

πŸ› Activity Monitor: exactly one lit stage chevron per row - #17337

Merged
hivecommons-hive[bot] merged 5 commits into
v5from
fix/one-lit-stage
Nov 9, 2026
Merged

hivecommons-hive[bot] merged 5 commits into
v5from
fix/one-lit-stage

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #17335

Root cause

stageTrackerActivityTrackHtml lit each track independently (lit = running || stageTrack || stalled) and the chevron rules (#16599/#16643) permitted CI + Review as an active pair. At stage 050 right after a push, CI is running and Review is the stage's own track with an unsettled verdict (adjudicating) β†’ both amber. The server legitimately carries both sub-states; the client never chose a lead. Fixed client-side at the render.

Changes

  1. Exactly one lit stage per row β€” stageTrackerLeadTrack picks the earliest track that would light (CI before Review); the other renders ham-track-queued (dim, no pulse) with a muted note: re-review queued after a push, review in progress, review queued; its words move to the tooltip (… behind CI). Prelude invariant tightened from ≀ 2 to ≀ 1 lit.
  2. Plain-language detail line β€” tracker-preparation.js: "New push c15a343 by @Karibhou 3m ago β†’ CI running, review will rerun Β· previous review no longer applies Β· Recorded first for the base refresh Β· ticket issued for an earlier head Β· re-checked on c15a343 Β· ticket issued 4m ago". No preparation / unverified / ticket age; server Detail strings unchanged (data), mapped at render. Queue chip reworded likewise.
  3. stage ↓ pill β€” it is the hive-handled regression marker; now reads stage reset, or stage reset by push when push.state === 'pushed' or the reason names a push. Tooltip unchanged.
  4. Docs: chevron canonical rules 1 & 3 rewritten (one lit stage; CI leads Review); stage ↓ mentions updated; index.html regenerated.

Tests

  • stage_tracker_ui_rows_test.go: 🌱 test: regression for an epic-driven PR on a contributor-claimed, PR-covered issueΒ #17308 push-during-review fixture β†’ 1 lit (CI), Review dim + re-review queued; both/busy fixtures β†’ 1 lit.
  • stage_tracker_preparation_visual.test.js: push fixture detail string equals the plain sentence and matches no /preparation|unverified|ticket age|Head changed/i.
  • stage_tracker_regressed_test.go: pushed / reason-named cases render stage reset by push; no stage ↓.
  • stage_tracker_activity.test.js wired to the new helpers; expectations updated.

After a push during review the row lit CI and Review amber together
(client lit each track independently; the chevron rules allowed the
CI+Review pair). Derive one lead track (CI before Review); the other is
dim with a muted queued note, its words in the tooltip. Reword the
base-refresh detail line in operator terms (no preparation/unverified
jargon, each signal once) and rename the handled-regression pill to
"stage reset" / "stage reset by push". Doc rule: exactly one lit stage
per row; later stages shown dim with a queued note.

Fixes #17335

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

Copy link
Copy Markdown
Member Author

/lgtm

@clubanderson

Copy link
Copy Markdown
Member Author

/approve

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@clubanderson: you cannot LGTM your own PR.

Details

In response to this:

/lgtm

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.

@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

@kubestellar-prow kubestellar-prow Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 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.

No conflicting open PRs or same-file overlaps were found.

@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 9, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

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

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

Failing checks:

  • test (rest 3/4)

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.

Reviewed by reviewer β€” no findings.

Reviewer notes

Read the full tracker-row-strip.js at this head, not just the diff. Looks correct to me.

What I verified:

  • stageTrackerLeadTrack (tracker-row-strip.js:292) is fed the same current (col50.state === 'active') that stageTrackerActivityTrackHtml derives at :338, and the same stalledTrack, so the lead decision and the per-track wouldLight are computed from identical inputs β€” there is no path where the lead is a track that itself does not light. stageTrackerTrackWouldLight does not re-check !running on the stalled branch, but stalledTrack is only non-empty when tracksRunning === 0 (:515), so that is equivalent.
  • The #17335 scenario (stage 050, CI running, Review adjudicating): stageTrackerStageTrack returns review (:223-228), stageTrackerTrackRunning(item,'ci') is true, so ['ci','review'].find(...) yields ci; Review gets ham-track-queued, active=false (no data-motion), and stageTrackerQueuedTrackNote returns re-review queued whenever push.sha === head or stageTrackerHiveOwesReReview β€” matches the body.
  • "stage ↓" has exactly four consumers in the repo (two docs, the JS, stage_tracker_regressed_test.go) and all four are in this diff; static/index.html carries the same hunks as static-src, so the bundle is in sync.
  • regressed_reason is an existing field (:787), so the pushReset regex at :949 reads real data.

No findings. CI shows the build/merge jobs as skipped on this head; the required checks will need a run before tide moves it.

Evidence bundle `#17337671f7ac` sha256:475fd293cc932488807c4c8f29fedfaaccd78e80046e4677f0f08ec03c68257c β€” download from the dashboard or `hivectl review evidence #17337`.

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

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

Read the change against the tree at 2fd05e6 (merge-base with v5), not just the diff. Looks correct to me; no defects found.

What I verified

  • tracker-row-strip.js: stageTrackerLeadTrack and the wouldLight computation inside stageTrackerActivityTrackHtml use the same inputs (stageTrackerTrackRunning, stageTrackerStageTrack, stalledTrack) and the same current (sg.state === 'active' on the column-50 segment, which is what stageTrackerStripItems passes as col50.state === 'active'), so the lead chosen in stageTrackerStripItems cannot disagree with what each track thinks it would do. stalledTrack is only non-empty when tracksRunning === 0, so lead/stalled can't both light. The opts.lead fallback (wouldLight ? kind : '') keeps the function self-consistent when harnesses call it alone.
  • Payload fields the new code reads exist on the server side: push.state/push.sha (stage_tracker_push.go:42-49), code_activity.state === "pushed" (stage_tracker_activity.go:890), regressed_reason (stage_tracker.go:455).
  • stage_tracker_ui_prelude_test.go tightens the fixture-wide invariant from ≀2 to ≀1 lit chevron and adds the dim-with-note / never-note-on-active assertions, so the behaviour change is pinned by a test that fails without it.
  • Merge order with the sibling Activity Monitor PRs: git merge-tree of #17333 and #17334 onto this head both produce clean trees β€” the shared tracker.css / activity-monitor.md edits don't conflict textually.

Minor, not a defect: stageTrackerQueuedTrackNote's 'CI queued' branch is unreachable today, since stageTrackerLeadTrack always prefers CI when it would light; harmless.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

Read the render path on v5 rather than just the diff. The one-lead rule is wired consistently: stageTrackerStripItems computes leadTrack from col50.state === 'active' and the same stalledTrack it already passed as opts.stalled, and stageTrackerActivityTrackHtml derives current from sg.state === 'active' (tracker-row-strip.js:303), so stageTrackerTrackWouldLight and the per-track wouldLight = running || stageTrack || stalled evaluate the same predicate on the same inputs β€” the lead can't disagree with the track it demotes. stalledTrack is only non-empty when tracksRunning === 0, so the CI-vs-Review collision is always running vs stageTrack/adjudicating, and ['ci','review'].find picks CI as the body says. The opts.lead fallback (lead = wouldLight ? kind : '') keeps the harnesses that lift the function alone on the old behaviour.

The #16484 screenshot test and the running loop in stage_tracker_activity.test.js both flip from "two lit" to "CI leads, Review ham-track-queued", so the behaviour change is pinned by tests that fail without it.

Looks correct to me.

One scheduling note for whoever lands these: #17333 also edits src/pkg/dashboard/static/index.html, static-src/css/tracker.css and src/docs/dashboard-sections/activity-monitor.md, so the second of the two to merge will need a rebase (and a bundle regen) β€” not a defect in either, just avoid the stale-bundle conflict.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit c4abd0f into v5 Nov 9, 2026
83 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/one-lit-stage branch November 9, 2026 02:44
@github-actions

github-actions Bot commented Nov 9, 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

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 671f7ac.

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

Read tracker-row-strip.js on this head against the callers; the one-lit-track logic looks correct to me.

  • stageTrackerTrackWouldLight (row-strip, new) and the wouldLight = running || stageTrack || stalled expression inside stageTrackerActivityTrackHtml use the same three conditions with the same current (sg.state === 'active' on column 50 in both call sites), and stalledTrack is only non-empty when tracksRunning === 0, so the lead chosen in stageTrackerStripHtml can never disagree with the per-track wouldLight β€” no row can end up with zero lit chevrons when one would have lit before.
  • ['ci','review'].find(...) means CI always wins when both would light, so the kind === 'ci' branch of stageTrackerQueuedTrackNote is unreachable in practice; harmless, just dead.
  • The lead fallback (opts.lead || (wouldLight ? kind : '')) keeps the harnesses that lift stageTrackerActivityTrackHtml alone on their old behaviour.
  • stage_tracker_activity.test.js flips the #16484/#16599 assertions from active to todo ham-track-queued + review queued behind CI, so the tests fail without the change.

All checks green except mobile-shots (still running) and tide. Nothing blocking from my side; not approving, since the PR already carries approved.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Activity Monitor: row lights two stage chevrons (CI + Review) after a push, with jargon detail line and opaque "stage ↓" pill

1 participant