Skip to content

🐛 Activity Monitor: person-owed PR steps light PR in progress, not Merge queue - #16593

Merged
clubanderson merged 3 commits into
v5from
fix/awaiting-rerun-lane
Nov 4, 2026
Merged

clubanderson merged 3 commits into
v5from
fix/awaiting-rerun-lane

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #16592

What

The Activity Monitor drew hive's own #16524 ("Awaiting human: rerun shared ci", hive:unauthorized, CI unknown, review findings open) with its lit chevron in the Merge queue column. Nothing about that PR is queued, merging or merge-ready: a maintainer has to rerun shared CI on GitHub. The chevron now lights PR in progress — "Waiting for @clubanderson · rerun shared ci on GitHub", person icon kept — and the Merge queue column is empty.

Rule

Merge queue is only for rows actually queued / merging / merged (merge_gate, merge_train, soak), or a merge-ready PR (review approved, CI green on this head) parked on a merge decision. Any 085 PR whose ask is a person's move on the PR (an unauthorized:<step> reason, or review not approved / CI not green on the current head) renders in PR in progress. A bare 085 with no track evidence keeps the gate, as #14821 decided.

How

  • stageTrackerItemColumn (Go) and stageTrackerAnchor (JS) consult a new stageTrackerPersonActsOnPR predicate, mirrored on both sides.
  • The unauthorized word / caption reads "Waiting for @author · on GitHub" ("a maintainer" when the author is hive / a bot / a clanker, who cannot grant the permission).
  • StageTrackerLinkedPR and both JS nested-PR projections carry unauthorized_step so the nested chevron reads the same word.

Tests

  • TestStageTrackerPersonActsOnPRColumn: the 🌱 chore: v5 → v6 top-up (2026-11-03) #16524 shape and its twins (merge-ready, queued, bare decision, stale head evidence, issue, 070).
  • TestStageTrackerRows fixture: 🌱 chore: v5 → v6 top-up (2026-11-03) #16524 renders active detoured in PR in progress, Merge queue todo with no words, one lit chevron, person icon kept; merge-ready / train twins keep the gate; nested row carries the word.
  • make dashboard-gen-check, go test ./pkg/dashboard/ -run StageTracker, gofmt -l clean on touched files.

Note on the Review chevron

#16524's review verdict really is changes_requested (aggregate verdict from the verified bundle; the security perspective's finding is the blocker), so "5/5 · changes requested" is the honest word there — no #16578 sign-off caption applies.

@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

…rge queue

A PR parked at 085 because a person has to act on the PR itself (rerun
CI, approve workflow runs, resolve a GitHub permission, answer review
findings or red checks still open on its head) is not queued, merging
or merge-ready. Its chevron now lights PR in progress — "Waiting for
@who · rerun shared ci on GitHub", person icon kept — and the Merge
queue column stays empty. Only rows actually queued / merging / merged,
or a merge-ready PR (review approved, CI green) parked on a merge
decision, sit in Merge queue. A bare 085 with no track evidence keeps
the gate (#14821).

- stageTrackerItemColumn (Go) / stageTrackerAnchor (JS): new
  stageTrackerPersonActsOnPR predicate, mirrored on both sides.
- Unauthorized word/caption: "Waiting for @author · <step> on GitHub"
  (a hive / bot / clanker author yields "a maintainer").
- Nested PR rows carry unauthorized_step so the word matches.
- Tests: Go table (#16524 shape and its twins) + rows fixture.

Fixes #16592

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 4, 2026
@clubanderson
clubanderson force-pushed the fix/awaiting-rerun-lane branch from cbbaa63 to 7d4ee65 Compare November 4, 2026 13:15
@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
#16500 ✨ feat(dashboard): replace Matrix presentation with Code activity same files src/pkg/dashboard/static/index.html
#16514 ✨ feat(dashboard): replace Matrix presentation with Code activity same files src/pkg/dashboard/static/index.html

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

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

Failing checks:

  • test (dashboard shuffle 1/3)

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

Correctness review @ 7d4ee65 — the #16524 shape itself is handled correctly (unauthorized branch, return !mergeReady). One in-scope gap in the non-unauthorized branch:

1. The "bare 085 keeps the gate (#14821)" carve-out is unreachable with served rows — unknown tracks count as not-merge-ready evidence. stageTrackerNotMergeReadyEvidence (src/pkg/dashboard/stage_tracker_vocabulary.go:137-140) and the JS mirror (static-src/js/tracker-words-core.js:80) return true whenever review.state != "approved" or ci.state != "passing". But the backend never serves a PR item without both tracks: stage_tracker_build.go:534-537 fills CIActivity/ReviewActivity with trackerUnknownActivity(it.Head, …) (State: "unknown", same head) for every PR. So the Go case at stage_tracker_item_column_test.go:170-172 (nil activities) and the JS assertion at stage_tracker_ui_rows_test.go:761 (no activity fields) exercise a shape /api/stage-tracker cannot emit. In production every 085 PR with no unauthorized step and CI unknown + review unknown (nothing observed on this head yet) now lights PR in progress with the 085 decision word — the exact #14821 case the PR body and #16592 say must keep the gate. Suggested fix (plus the same in JS and make dashboard-gen, and switch the #14821 test case to ci("unknown"), review("unknown")):

func stageTrackerNotMergeReadyEvidence(it *StageTrackerItem) bool {
	known := func(a *StageTrackerActivity) bool {
		return stageTrackerActivityOnHead(it, a) && a.State != "" && a.State != "unknown"
	}
	return (known(it.ReviewActivity) && it.ReviewActivity.State != "approved") ||
		(known(it.CIActivity) && it.CIActivity.State != "passing")
}

JS: return !!((review && review.state && review.state !== 'unknown' && review.state !== 'approved') || (ci && ci.state && ci.state !== 'unknown' && ci.state !== 'passing'));

2. (low) Go caption never names the author. PR body says the "word / caption reads 'Waiting for author · on GitHub'", but stage_tracker_caption.go:846 always emits Waiting for a maintainer · … even though author is a parameter; only the JS chevron word names clubanderson. The rows fixture at stage_tracker_ui_rows_test.go:742 pins the mismatch (caption "a maintainer", chevron "clubanderson") on the same row. Either name the author in the caption for non-hive/bot/clanker authors or trim the body claim.

Advisory (no change requested): with the rule as written, a merge-ready 085 whose CI re-runs (running/queued on this head) will hop Merge queue → PR in progress → Merge queue as checks cycle; worth knowing when reading the board.

Hive filed review findings that do not block this PR as backlog items:

Cap: 10 backlog item(s) per PR per day.

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

Read the predicate against the tree at 72203c1 (not just the diff): stageTrackerItemColumn ordering in src/pkg/dashboard/stage_tracker_vocabulary.go:68-96, the JS anchor in static-src/js/tracker-row-anchor.js:31-51, the anchor callers (tracker-row.js:12, tracker-motion.js:461 pass 'pr' for via_pr rows, so the kind === 'pr' guard matches the Go Kind != "pr" check), and the CI/review state vocabulary in stage_tracker_activity.go ("passing", "approved" are the real values). Looks correct to me. The Go and JS predicates make the same decisions: both run after the merge-gate / merge-train promotions, both bail on any non-empty gate or train state, both ignore a track whose head is set and differs from the row's, and both keep a bare 085 (no track evidence) at the gate. go build ./pkg/dashboard/ ./pkg/webassets/..., gofmt -l, the dashboard-gen-check generator and the webassets/trackerrow copy are all clean on this head.

One small mismatch worth a look, not a blocker:

  • Caption and chevron name different people on the same row (low). stage_tracker_caption.go:846 always emits "Waiting for a maintainer · <step> on GitHub" even though stageTrackerCaption receives author (line 760) and uses it for the Needs-author captions. The JS word (tracker-words-core.js stageTrackerUnauthorizedWho) names author when the author is a person. Your own fixture shows the result: stage_tracker_ui_rows_test.go:742 seeds the caption Waiting for a maintainer · rerun shared ci on GitHub … and line 749 asserts the chevron reads Waiting for clubanderson · rerun shared ci on GitHub. The body's "How" bullet says the caption reads author; the Go side does not. Either branch on author kind in the Go caption too, or state in the body that the caption deliberately says "a maintainer" (e.g. because it is the person who can grant the permission, not necessarily the author).

Open question, not a finding: stageTrackerNotMergeReadyEvidence treats CI state == "unknown" from Source: "unavailable" (stage_tracker_activity.go:53) as "short of merge-ready", so an approved PR whose CI evidence merely could not be fetched will move out of Merge queue. That matches the rule as written ("CI not green on this head") and the #16524 case, so I read it as intended — flagging only so it is a conscious choice.

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 stage_tracker_vocabulary.go, stage_tracker_build.go (where the tracks are populated), stage_tracker_activity.go, and the JS mirror at the PR head (72203c1). The #16524 case itself is handled correctly, but the "bare 085 keeps the gate" rule the predicate documents is not reachable in the served payload.

1. unknown is counted as not-merge-ready evidence, so every bare 085 PR leaves Merge queue (medium)

src/pkg/dashboard/stage_tracker_vocabulary.go:138-141 — stageTrackerNotMergeReadyEvidence returns true whenever a track on the current head has State != "approved" / State != "passing". That includes "unknown".

In production neither track is ever nil:

  • stage_tracker_build.go:463 → stageTrackerCIActivity, which starts from trackerUnknownActivity(pr.HeadSHA, "CI unknown · …") (stage_tracker_activity.go:57) and returns it unless checks are observed;
  • stage_tracker_build.go:475 → stageTrackerReviewActivity, which starts from trackerUnknownActivity(pr.HeadSHA, "Review unknown · …") (stage_tracker_activity.go:436);
  • stage_tracker_build.go:535 / :550 backfill unknown on any head mismatch.

Both carry Head = it.Head, so stageTrackerActivityOnHead is true. Result: a bare 085 PR with no unauthorized: reason — a hive/supersession-pending park ("Superseded by #N — decide", the #14821 case), a hold, any decision park whose head hive has not yet seen checks or a verdict for — renders in PR in progress and only moves back to Merge queue once review is approved and CI is passing. That is the opposite of the predicate's own comment (:103-104, "A bare 085 with no track evidence keeps the gate") and of the Rule in the PR body. The test that guards this (stage_tracker_item_column_test.go:170-172, "bare 085 decision keeps the gate (#14821)") sets both tracks to nil, a shape the builder never emits; with ci("unknown"), review("unknown") it would return trackerColumnPR.

The JS mirror has the same behaviour (tracker-row-anchor.js, stageTrackerPersonActsOnPR: ci.state !== 'passing').

Suggested fix, both sides: treat unknown (and empty) as absent evidence — e.g. known := a != nil && a.State != "" && a.State != "unknown" inside the on-head check — and change the #14821 fixture to ci("unknown"), review("unknown") so it fails without the fix. All the cases you intend still hold: #16524 (step + changes_requested), "decision with review findings open", "CI red, review approved" are all real non-approved / non-passing states.

2. Go caption always says "a maintainer"; the JS word names the author (low)

src/pkg/dashboard/stage_tracker_caption.go:846 returns "Waiting for a maintainer · <step> on GitHub" unconditionally, while tracker-words-core.js stageTrackerUnauthorizedWho writes @<author> for a human author. The PR body says the word reads "Waiting for @clubanderson · rerun shared ci on GitHub" — that is true of the SPA's rendered chevron but not of the JSON caption field, so any consumer of caption (API clients, tooltips that use it) reads a different sentence than the chevron. If that split is intentional, a one-line note at :846 would save the next reader the same check; otherwise stageTrackerCaption already receives author and could name them when the kind is human.

No security-relevant surface touched; changelog fragment and webassets copy are in place. I have not changed anything on the branch.

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

@clubanderson
clubanderson merged commit 7e561e9 into v5 Nov 4, 2026
83 of 84 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the fix/awaiting-rerun-lane branch November 4, 2026 13:41
@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

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. 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: "Awaiting human: rerun…" renders in the Merge queue column instead of PR in progress

1 participant