Repository navigation
π tracker: closed superseded PRs no longer render as rows - #15267
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
A PR the hive closed when it opened its replacement (close-first supersession) rode under its issue as a bare sub-row with an empty ladder: the claims index still reported it open, and the resolver kept the unmatched link. A linked PR with no PR row in the snapshot is now dropped (the cache state resolver also drops closed/merged links at the source); the live replacement carries supersedes metadata and the SPA draws one muted "supersedes #N" chip as the only trace. Fixes #15265 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
9cec241 to
6281691
Compare
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@clubanderson is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this hive's repositories have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply. |
There was a problem hiding this comment.
Read the diff against v5 at merge-base 4db33fe plus the seams it leans on. Looks correct to me.
What I verified:
stageTrackerResolveLinkedPRs(src/pkg/dashboard/stage_tracker.go:2873-2876) now drops a linked PR with no PR row unlessopen(repo, n)vouches for it. The vouch passed frombuildStageTracker(stage_tracker.go:1974) isstageTrackerPRStateResolver(...) == "open", and that resolver (stage_tracker.go:1150-1163) answersopenfor any PR inrepoOpenItemsacross all repos in the status payload β so an open PR thataddPRfiltered out ofitems, or a cross-repo PR, still survives as a bare link. Only PRs absent from the open snapshot (closed/merged, or the claims index lagging a close) are dropped. Unknown ("") is kept bystageTrackerLinkedPRFinished, so a resolver miss fails safe.- The second caller,
delegatedCompetingNumbers(delegated_pr_context.go:45), passes an always-true vouch, preserving its prior behaviour. stageTrackerSupersedesIndexkeys bystagelabels.Key, which lowercases (stagelabels/store.go:493-495), matching the lookup atstage_tracker.go:2081.SupersededByis also set by the older merged-copy path (#14471), but there the superseder is merged and not a row, so the chip can only appear on a live close-first copy.TestStageTrackerClosedSupersededPRNotASubRowreproduces the reported shape (claims index says#15184open, snapshot lacks it) and asserts both the drop and the chip metadata.go build ./pkg/dashboard/ ./pkg/stagelabels/at6281691passes.
No findings. Not approving (human signature); flagging as ready for a maintainer's read.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Read the diff against v5 plus the callers; this looks correct to me.
What I verified:
stageTrackerResolveLinkedPRs(src/pkg/dashboard/stage_tracker.go:2826) now drops a linked PR with no PR row unlessopen(repo, n)vouches for it. InbuildStageTrackerthat callback isprState(...) == "open"(stage_tracker.go:1974), andstageTrackerPRStateResolver(stage_tracker.go:1144) builds its open set from every repo in the snapshot, so the cross-repo case the doc comment describes is covered. The only other caller (delegated_pr_context.go:45) passes an always-true vouch over an already-open-filtered list, which is the right thing there.- Supersede filename matching in
stageTrackerSupersedesIndexkeys onstagelabels.Key(repo, rec.SupersededBy); the lookup inaddPRuses the sameKey(repoName, pr.Number), so the chip lands on the live copy.TestStageTrackerClosedSupersededPRNotASubRowexercises the exact claims-index-lag shape from #15265. go build ./pkg/dashboard/passes on the head.
One semantic note, not a defect: a linked PR whose state the caches cannot resolve ("" β e.g. a PR the hive just opened that the status snapshot hasn't picked up yet) is kept by the addIssue filter (stageTrackerLinkedPRFinished treats unknown as not finished) but then dropped by stageTrackerResolveLinkedPRs, so it won't appear until the next snapshot lists it. That matches the PR's goal (a bare {number,url} sub-row with an empty ladder is exactly the artefact being removed), just flagging that unknown β open here in case anyone expects the sub-row to show during that window.
β hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 095-pre-merge-soak β 060-reviewed: required-check-pending:Sign-off survives the squash |
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #15265
Root cause
GET /api/stage-trackerbuilt an issue'slinked_prsfrom the enumeration's claims index (issue.LinkedPRs), whose state is"open"unless merged β it never says"closed". After close-first supersession the closed original therefore passed the!Merged && State != "closed"filter; having no row of its own (not an open item) it stayed a bare{number, url}entry, which the SPA drew as a sub-row with stage 0, no title and a full-height empty ladder (#15183 β β³ #15184, #15169 β β³ #15170).Fix
stageTrackerResolveLinkedPRsdrops a linked PR that has no PR row in the response unless the caller vouches it is open elsewhere (cross-repo);addIssuealso asks the cache state resolver and drops closed/merged links at the source.supersedes: {number, url, closed_at, open}from the original'sSupersededByrecord; the SPA draws one mutedsupersedes #Nchip (hover: closed , link). Nothing else β the closed PR never renders.Verified against the live spoke payload for #15183 before the fix (bare
#15184entry present). Tests: Go snapshot filtering + chip metadata, resolver unit test, supersedes index, node assertions for the chip and sub-row item.