Repository navigation
🐛 Activity Monitor: secondary issue of a shared PR rides the PR's lane - #17325
Conversation
A PR closing two issues is drawn once, under the lower issue; the other issue chips to it. Its row fell back to the issue's own 030/040 stage for the lane while the merge-gate word still came from the PR, so #17302 read "Soaking · 47s left" in the PR in progress lane while #17292 soaked in the Merge queue. stageTrackerLinkedRiding picks the furthest covering PR drawn elsewhere and the row, column map and sort order ride its stage; the PR column stays empty and the "under #M" chip still names the PR. Fixes #17324 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
/lgtm |
|
/approve |
|
@clubanderson: you cannot LGTM your own PR. DetailsIn response to this:
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. |
|
[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 DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of No conflicting open PRs or same-file overlaps were found. |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Another agent tried to open a PR from @clubanderson this PR is held at Failing checks:
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 Looks correct to me. Read
Body matches the diff; changelog fragment present; Only housekeeping: the rollup shows an |
There was a problem hiding this comment.
Read the diff against the tree at this head plus the callers of stageTrackerLinkedSorted. The core fix is sound; one consumer was left behind and now produces a wrong ownership string on the secondary row.
What checks out
stageTrackerLinkedRiding(tracker-row-layout.js:307-312) only fires whenstageTrackerLinkedSortedis empty, filters to PRs drawn elsewhere that are not superseded-gone, and reusesstageTrackerLinkedSorted's comparator by clearingdrawn_underon copies — so the lane,stageTrackerColMap(tracker-motion.js:490-491) andstageTrackerLead(tracker-row-layout.js:353-354) pick the same PR by the same order.stageTrackerRowHtml(tracker-row-render.js:107-116) ridesstage/merge_gate/captionfrom the PR but only fillsprRefs/prTargetKeywhenlinked.length === 1, so the PR column stays empty and the "under #M" chip still names it, as the body says.- The
typeof … === 'function'guards match the existing harness convention in this file set.
Finding (low): stageTrackerExternalPRWork now reports "owner unknown" on the secondary row
tracker-row.js:217-222: for a via_pr row it filters linked_prs with stageTrackerLinkedDrawnHere, and sets source = linked.length === 1 ? linked[0] : {}. Before this PR a secondary row was never via_pr, so the function returned null at :218. Now the secondary row is via_pr, the drawn-here filter yields nothing, source = {}, and stageTrackerReturnedAuthor({}) (tracker-words.js:539) returns {author:'', kind:''} — which is neither hive nor bot, so the function returns a truthy object.
Consequence, when the row has no stage actor (sa.kind === STAGE_TRACKER_ACTOR_NONE): the actor tip at tracker-row.js:237 reads "PR ownership and current work activity are unknown", and the red-verdict lane at :326 reads "Fix owed · owner unknown" — while the primary row of the same hive-authored PR resolves source = linked[0], sees kind === 'hive', returns null, and reads "nobody on it". Two rows, one PR, two different owners. The fix is a one-liner: let stageTrackerExternalPRWork fall back to the ridden PR when nothing is drawn here (the same elsewhere filter stageTrackerLinkedRiding uses, without needing stages if you take the single remaining PR or thread stages through). stageTrackerReturnedAuthor (tracker-words.js:536) has the same drawn-here-only filter and would benefit from the same fallback.
Not blocking on my side — flagging for the author; a maintainer should decide whether to land as-is and follow up. I have not approved or requested changes.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #17324
A PR that closes two open issues is drawn once, under the lower issue (
drawn_under); the other issue lists it as a compact "↳ #N · under #M" chip. That secondary row dropped the PR fromstageTrackerLinkedSorted, so its strip fell back to the issue's own 030/040 stage (the PR in progress lane) whilestageTrackerCoveringPRstill overlaid the PR's merge-gate word — #17302 read "Soaking · 47s left" in PR in progress while #17292 soaked in the Merge queue.Fix (
static-src/js):stageTrackerLinkedRiding(item, stages): when every covering PR is drawn under another row, the furthest-along open one (same order asstageTrackerLinkedSorted).stageTrackerRowHtmlrides that PR (via_pr, stage, merge_gate, caption, …) exactly like a row drawing its one covering PR — but the PR column stays empty and the "under #M" chip still names it.stageTrackerColMap(motion) andstageTrackerLead(list order) use the same rule, so the lane, the move animation and the sort agree.Tests:
TestStageTrackerLinkedDrawnUnderJSnow asserts the secondary rides the PR's lane and adds the #17292 / #17302 soak case (same lit chevron on both rows, chip kept, PR column empty);stageTrackerColMapgets a shared-PR column assertion.