Skip to content

πŸ› activity monitor: light a needs-decision PR's real stage and carry the ask as a pill - #17457

Merged
clubanderson merged 6 commits into
v5from
fix/needs-human-real-stage
Nov 10, 2026
Merged

clubanderson merged 6 commits into
v5from
fix/needs-human-real-stage

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #17453

Problem

A PR parked at stage/085-needs-decision whose head is short of merge-ready (checks running, red or unreported; review verdict pending or asking for a person) forced a Needs human Β· decision chevron into the PR in progress column while the CI and Review chevrons spun dim β€” #17442 (under #17426) today at 21:37Z with CI 3/9 running; #17416 read Needs human Β· review the same way. Yesterday's #17327 / #17334 fixed the sentinel/hold case only; stageTrackerPersonActsOnPR still mapped bare 085 to PR in progress, and stage_tracker_build.go stripped the needs-decision modifier ("the chevron says it"), so no pill existed.

Fix (owner rule: a human gate is a pill on the real stage, not a stage of its own; one lit stage per row, #17337)

  • Column: stageTrackerPersonActsOnPR β†’ CI / Review (Go stageTrackerItemColumn, JS stageTrackerAnchor), never PR in progress. Go stageTrackerNotMergeReadyEvidence now counts queued/running CI as "at CI" (mirrors JS).
  • Lit track: CI running on the head is motion even on a person-parked 085 row (stageTrackerTrackRunning); otherwise the stalled track lights β€” Review when its verdict is human_decision, CI when not green. The lit track wears ham-human-gated (amber outline, tokens only) and its tooltip ends Β· needs a person: <question>.
  • Pill: Go stageTrackerApplyPersonActsOnPRPill re-adds needs-decision once the head's tracks are known (ordered, never duplicated, not on a merge-ready/queued row); stageTrackerChipsHtml derives it for older payloads. The existing pill β†’ decision popover / question tooltip is reused.
  • Docs: activity-monitor.md stage table, canonical rule 5, sentinel/unauthorized sections. Changelog fragment at repo root.

Tests

…the ask as a pill

A PR parked at stage/085-needs-decision whose head is short of
merge-ready (checks running, red or unreported; review verdict pending
or asking for a person) forced a 'Needs human Β· decision' chevron into
the PR in progress column while the CI and Review chevrons spun dim
(#17442 under #17426; #17416 read 'Needs human Β· review' the same way).

The lit chevron is now the PR's real stage: the CI track (with motion
while checks run) or the Review track, wearing an amber ham-human-gated
marker; PR in progress is passed and Merge queue stays empty. The ask
rides as the needs-decision pill (human icon, question in the hover,
decision popover on click) β€” the server re-adds the modifier once the
head's tracks are known, and the page derives it for older payloads β€”
and the lit track's tooltip ends 'Β· needs a person: <question>'. One lit
stage per row. Only a merge-ready, queued or merging 085 keeps the gate.

Fixes #17453

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

Copy link
Copy Markdown
Member Author

/lgtm
/approve

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 9, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

@clubanderson: you cannot LGTM your own PR.

Details

In response to this:

/lgtm
/approve

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

PR Title Relation Files
#17478 πŸ› dashboard: surface Prow's rejection of relayed /lgtm and /approve same files src/docs/dashboard-sections/activity-monitor.md

@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Mutation testing (advisory)

No surviving mutants in changed files (or the run hit its time budget before reporting any).

Advisory only; this job never blocks the PR (#17349).

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

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.

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

Correctness review (head 6837568, read against #17453)

The column/lit-track changes match the issue's expected behaviour and the Go ↔ JS mirrors agree on stageTrackerPersonActsOnPR. One divergence between the server pill hook and the client fallback is worth fixing before merge:

Server adds a second human pill on 085 rows that already carry unauthorized / hold

stageTrackerApplyPersonActsOnPRPill (src/pkg/dashboard/stage_tracker_vocabulary.go:137-145) re-adds needs-decision whenever stageTrackerPersonActsOnPR is true and the modifier is absent β€” it does not look at the other modifiers. At 085 nothing is deferred (stage_tracker_caption.go:44-49), so an hive:unauthorized 085 row (the #16524 shape: both the stage label and the unauthorized label set via stage_tracker_caption.go:76,88) is now served with modifiers: ["unauthorized","needs-decision"] β€” stage_tracker_build.go:174 strips the modifier, then line 571 puts it back.

The JS fallback the PR adds (tracker-row-strip.js:969) deliberately does the opposite: "Any pill that already names the person owed (unauthorized, hold …) stands in for it" and skips the push when any STAGE_TRACKER_HUMAN_MODS entry is present. The chip renderer shows the lead pill plus a +N fold (tracker-row-strip.js:973-979), so live #16524-class rows will read unauthorized +1 where they previously showed one pill β€” a visible regression that the tests don't catch because the Node #16524 fixture hand-sets modifiers: ['unauthorized'] (stage_tracker_ui_rows_test.go:759) rather than the shape the server now produces, and the Go pill test only exercises [stalled] as the pre-existing modifier.

Suggested fix (Go side; this makes the server match the rule the client comment states):

func stageTrackerApplyPersonActsOnPRPill(it *StageTrackerItem) {
	if it == nil || !stageTrackerPersonActsOnPR(it) || slices.Contains(it.Modifiers, modNeedsDecision) {
		return
	}
	// A pill that already names the person owed (hold, unauthorized) stands
	// in for the ask β€” mirrors the SPA's stageTrackerChipsHtml fallback.
	if slices.Contains(it.Modifiers, modHold) || slices.Contains(it.Modifiers, modUnauthorized) {
		return
	}
	it.Modifiers = append(it.Modifiers, modNeedsDecision)

and narrow the JS guard to the same two (['hold','unauthorized'] instead of STAGE_TRACKER_HUMAN_MODS, which also contains stalled/needs-rebase/blocked and would otherwise make the client skip a pill the server adds for a stalled 085 row). Adding an unauthorized case to the Go pill assertions in TestStageTrackerPersonActsOnPRColumn would lock it in.

…lds to human pills

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 Go and JS sides against v5 at 64320ff. The column move (stageTrackerItemColumn β†’ trackerColumnReview, stageTrackerAnchor β†’ 50), the running/queued change in stageTrackerNotMergeReadyEvidence, the stalled-track and ham-human-gated wiring all read correctly, and the server re-add is safe against the decided projection (applyDecidedProjection at stage_tracker_build.go:528 runs before the loop and moves a decided row off 085, so stageTrackerPersonActsOnPR is false for it).

One thing the Go side and the JS side disagree on, and the server wins:

stageTrackerApplyPersonActsOnPRPill stacks needs-decision behind pills the PR says should stand in for it β€” src/pkg/dashboard/stage_tracker_vocabulary.go:137-145 (this PR).

  • Go only checks slices.Contains(it.Modifiers, modNeedsDecision); otherwise it appends whenever stageTrackerPersonActsOnPR is true β€” which includes the unauthorized:<step> path at stage_tracker_vocabulary.go:117-119 (return !stageTrackerMergeReadyEvidence(it)), i.e. exactly the #16524 "rerun shared ci" row.
  • JS stageTrackerChipsHtml (tracker-row-strip.js:966-969, this PR) only adds the pill when no STAGE_TRACKER_HUMAN_MODS entry is present, and the comment + the new TestStageTrackerHoldProvenanceJS case assert "A pill that already names the person owed (unauthorized, hold) stands in: no needs-decision stacked behind it."
  • But the JS branch only runs on a payload that predates the server change. On a live spoke the modifier arrives from Go already set, so a 085 PR wearing unauthorized renders both unauthorized and needs human decision pills β€” the stacking the JS test guards against.
  • Same disagreement in the other direction for stalled: STAGE_TRACKER_HUMAN_MODS (tracker-row-strip.js:763) includes 'stalled', so JS would not add the pill on a stalled row, while the new Go test (stage_tracker_item_column_test.go, pill.Modifiers = []string{modStalled} β†’ wants stalled,needs-decision) requires that it does. The Go test clears Reason/UnauthorizedStep so the unauthorized case is never exercised server-side.

Severity: low–medium β€” visual only, but it contradicts the rule this PR states in its own body and test, and it lands on the #16524-shaped rows this lineage of fixes is about. Suggest making Go mirror JS: skip the append when any of stageTrackerHumanMods (stage_tracker_build.go:615, same list as the JS constant) is already present β€” or, if stalled + pill is the intended reading, drop 'stalled' from the JS guard and say so, and add the unauthorized case to the Go test either way.

Everything else I checked (CSS token use, trackerColumnReview exists, stageTrackerNeedsHuman is per-row boolean so the re-added modifier cannot double-count, docs updated in activity-monitor.md) looks right.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/ci-report β€” mobile-shots (Dashboard Mobile Shots) is the only red check at head 6837568; every other check is green. Baseline: the same check is green on sibling PRs (#17458 merged, #17449), so this is PR-local, not a shared incident.

Failing acceptance (job log):

Activity browser acceptance failed: 390x844@3 light tracker-phone-ergonomics; 390x844@3 dark tracker-phone-ergonomics; 844x390@3 light tracker-phone-chrome; 844x390@3 dark tracker-phone-chrome

Likely cause: the branch now derives the needs-decision modifier client-side for an 085 row whose tracks are still running (tracker-row-strip.js / tracker-words-core.js), so the density fixture's stage-85 PR row gains a button.ham-badge-mod.ham-mod-needs-decision.ham-decision-trigger pill at the phone viewport. tracker-phone-ergonomics.js only exempts ham-decision-trigger when it is display: inline or inside .ham-chevron-copy; a pill in the pill strip is a block-ish control and must meet the 44Γ—44 floor (or grow its hit area with a negative-inset ::before/::after, the pattern the progress pill uses, #17183). The landscape tracker-phone-chrome failures (844Γ—390) are most likely the same extra pill pushing the first row's header past the row-peek / two-rows-in-view budget.

Suggested fix (one of):

  • give .ham-badge-mod.ham-mod-needs-decision the same phone-tier hit-area extension the other tappable pills use in tracker.css, or
  • extend the stripCell exclusion in tracker-phone-ergonomics.js only if the pill is deliberately an inline text control (it has a click popover, so the floor seems to apply).

The exact per-control findings are in the run's dashboard-mobile-shots artifact (overflow-report.json); I cannot download artifacts from this lane. I have not pushed to this branch.


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

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

…target

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

Copy link
Copy Markdown
Member Author

/lgtm
/approve

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@clubanderson: you cannot LGTM your own PR.

Details

In response to this:

/lgtm
/approve

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.

… heads

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

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.

Correctness β€” delta re-review at 3414abf (vs 6837568)

The delta (icon-carrying ask pill, .ham-mod-word fold-away in the stacked head, tap-target ::before, test assertion) is clean: stageTrackerDecisionTriggerHtml inserts innerHtml raw (static/index.html:24443), so the SVG + <span class="ham-mod-word"> markup renders rather than escapes; ham-mod-ask is only added when askable (tracker-row-strip.js:1028), so hold/blocked popover pills keep their words; stageTrackerIcon returns aria-hidden SVG when no label is given (index.html:18208), leaving the visually-hidden word span as the button's accessible name.

Still present (in-scope, from the previous review): src/pkg/dashboard/stage_tracker_vocabulary.go:138 β€” stageTrackerApplyPersonActsOnPRPill only skips when needs-decision is already present, while the client (tracker-row-strip.js:970) skips when any STAGE_TRACKER_HUMAN_MODS entry (hold, unauthorized, blocked, …) is present. A 085 PR with an unauthorized or hive hold modifier therefore gets a second human-owed pill (unauthorized +1) from the server that the client-only path would not add. Suggested fix:

	if it == nil || !stageTrackerPersonActsOnPR(it) || slices.ContainsFunc(it.Modifiers, func(m string) bool { return slices.Contains(stageTrackerHumanMods, m) }) {

(with stageTrackerHumanMods mirroring the JS list: hold, unauthorized, needs-human, needs-decision, needs-rebase, blocked, stalled), plus a server-side test asserting a Modifiers: []string{"unauthorized"} 085 PR gains no needs-decision.

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

…rce guard

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

Copy link
Copy Markdown
Member Author

/lgtm
/approve

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@clubanderson: you cannot LGTM your own PR.

Details

In response to this:

/lgtm
/approve

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.

@clubanderson
clubanderson merged commit cb742f9 into v5 Nov 10, 2026
81 of 83 checks passed
@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 deleted the fix/needs-human-real-stage branch November 10, 2026 00:27
@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

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: a 085 needs-decision PR with CI / review in flight still forces its chevron into PR in progress instead of its real stage

1 participant