Repository navigation
🐛 fix: scope tracker link memo to the excluded PR - #15537
Conversation
Include the carrying PR in the issue-link memo key so row-specific closer exclusions cannot leak into sibling rows. Cover both row orders and cached rebuilds. Hive-Run: #15495 Hive-Plan: correctness-link-memo Hive-Spec: issue-15495#exclude-sensitive-cache-key Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Signed-off-by: mendezr <mendezr@users.noreply.github.com>
Dashboard shuffle 2/3 failed before tests ran: gotestsum installation could not download golang.org/x/text v0.17.0 because proxy.golang.org returned an HTTP/2 INTERNAL_ERROR. Retrigger CI without changing the tracker fix. Signed-off-by: mendezr <mendezr@users.noreply.github.com>
|
[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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
There was a problem hiding this comment.
Adopted head 5400580 is byte-identical to #15508@fc19faa (I diffed the two gh pr diff outputs), so the open finding on #15508 carries over unchanged. The memo change itself is correct — caching the unfiltered closer under owner/repo#issue and excluding the carrying PR per row at src/pkg/dashboard/stage_tracker.go:3025-3029 puts the exclusion where the key can honour it.
One fix needed before this lands (medium): the regression fixture conflicts with #15509, which is open on the same base and further along in checks.
src/pkg/dashboard/stage_tracker_link_memo_test.go:20serves a closer node with nourl:{"number":70,"merged":true,"mergedAt":"…"}.- #15509 adds
sameRepoPullURL(node.URL, owner, repo, node.Number)toclosedByPullRequestReference(src/pkg/github/pr_supersession_sweep.go:475-477). With an empty URL,url.Parse("")yields an empty path, the comparison against/hivecommons/hive/pull/70fails, and the node is skipped —ClosedBybecomes 0 for both rows and this test'scloser = 0, want 70assertion fails for PR #90.
Whichever merges second goes red. One-line fix on this branch: add "url":"https://github.com/hivecommons/hive/pull/70" to the node, which is also what GitHub actually returns. #15509 needs no change.
The changelog fragment (changelog.d/fixed-15508-link-memo.md) that was missing on the earlier head is present, so that earlier red is resolved.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
This head (5400580) is #15508's fc19faa unchanged, so the open finding from that review carries over; stating it here concretely so it can be fixed on this branch.
Blocker: the new test will fail once #15509 lands. src/pkg/dashboard/stage_tracker_link_memo_test.go:20 serves the closer node as {"number":70,"merged":true,"mergedAt":"..."} with no url. #15509 (src/pkg/github/pr_supersession_sweep.go:475) adds a sameRepoPullURL check that skips any node whose URL path is not /hivecommons/hive/pull/70; with it in place ClosedBy is 0 for both rows and this test fails at closer = 0, want 70 for PR #90. I checked every other fixture on v5 that serves a merged closedByPullRequestsReferences node (stage_tracker_test.go:1082, api_review_queue_superseded_test.go:389, issue_link_state_test.go:24, pr_supersession_sweep_test.go:145) — all already carry a same-repo url; this test is the only one that does not.
One-line fix: add "url":"https://github.com/hivecommons/hive/pull/70" to the node at line 20. That is also what GitHub actually returns, so the fixture gets more realistic, not less.
The production change itself is right: caching the unfiltered closer per owner/repo#issue and excluding the carrying PR per row at src/pkg/dashboard/stage_tracker.go:3026-3029 is the correct place for the exclusion. The low-impact note from the earlier review still applies and is not a blocker: with exclude=0, closedByPullRequestReference returns the first merged same-repo closer, so if the carrying PR is ever itself a merged row listed first, a second genuine closer would not be surfaced — relevant only in the "merged rows included later" scenario this PR defends against.
With the url field added this looks good to me.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
/hive decision make CI green without widening scope; keep the smallest reversible change, then it merges Rationale: the head is not mergeable yet; the direction names the fix and nothing else. Hive decided: Told the author agent what to change. Decided by the hive at @clubanderson's request as the owner's delegate under the owner-delegate policy (rule |
|
Decision recorded by @clubanderson for head Recorded from the hive dashboard. |
The closedByPullRequestsReferences filter from #15509 drops nodes whose url is not /owner/repo/pull/N, so the url-less fixture node would make ClosedBy resolve to 0 once v5 is merged. Add the matching url. Hive-Fix-Attempt: 1/6 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Read stageTrackerEnrichSoftLinks on this head and IssueLinkState / closedByPullRequestReference on v5: this looks correct to me, and the one thing the swarm asked for on #15508 is in.
src/pkg/dashboard/stage_tracker.go:3044now caches the unfiltered closer (IssueLinkState(..., 0); withcurrentPR == 0thenode.Number == currentPRskip atpkg/github/pr_supersession_sweep.go:472never drops a real PR), and:3058-3062excludes the carrying PR per row — which is where the exclusion belongs, since the memo key (:2967) never carried the PR number.- The carried-over finding from #15508 (closer node fixture with no
url, whichsameRepoPullURLatpr_supersession_sweep.go:487-494would now drop) is addressed:stage_tracker_link_memo_test.go:20serves"url":"https://github.com/hivecommons/hive/pull/70", so the test is consistent with the URL filter already onv5. go build ./pkg/dashboard ./pkg/githubpasses oncad267e. The merge fromv5carries no other change (3 files, +69/-3 against base).
Known, not a blocker (same caveat as on #15508): closedByPullRequestReference returns the first merged node, so if merged PRs ever become tracker rows and the carrying PR is listed first, the row shows no closer instead of its sibling. Not reachable with today's open-only rows.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
stage 060-reviewed → 050-review-pending: required-check-pending:Sign-off survives the squash |
|
Hive filed review findings that do not block this PR as backlog items:
Cap: 10 backlog item(s) per PR per day. |
There was a problem hiding this comment.
Read the adopted head against v5: this looks correct to me, and the two asks carried over from #15508 are both satisfied on this branch.
- Mechanism:
src/pkg/dashboard/stage_tracker.go:3044now callsIssueLinkState(..., 0), so the memo entry underowner/repo#issue(:3041) holds the issue's unfiltered merged closer, and:3058-3061applies the carrying-PR exclusion per row.closedByPullRequestReference(src/pkg/github/pr_supersession_sweep.go:470) treatscurrentPR == 0as "exclude nothing", so no real PR is dropped from the lookup. Sibling rows referencing the same issue share one GET + one GraphQL read instead of one pair each. - Carried-over ask 1 (fixture URL):
stage_tracker_link_memo_test.go:20now serves"url":"https://github.com/hivecommons/hive/pull/70", which passes thesameRepoPullURLfilter that is already onv5(pr_supersession_sweep.go:475). The test asserts both row orders and the shared read count. - Carried-over ask 2 (changelog guard):
changelog.d/fixed-15508-link-memo.mdis present with a single-bullet.
Known, previously noted and still academic: with exclusion applied after the lookup, an issue closed by two merged PRs where the carrying PR is listed first shows no closer rather than the sibling. Tracker rows are open-only today, so this is not reachable.
Sequencing note for whoever merges: this PR carries conflicts-with-open-pr because #15526/#15574 move this function out of stage_tracker.go. Whichever lands second needs a trivial re-apply — the semantic change here is 11 lines.
— hive: agent=reviewer-2 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 |
Supersedes #15508 (adopted after CI went red and the contributor was unavailable; original commits by @mendezr preserved).
Fixes #15495
This branch is #15508's head
fc19faaf4981as pushed by @mendezr (forkmendezr/hive), unchanged. Last lane reason on the original:contributor-lane:changes-requested.Hive fix agent: rebase this branch on
v5, fix the failing checks / review asks, and push to THIS branch. Keep the original author's commits and theirSigned-off-by; add your own sign-off on your commits. Do not open another PR.Open review finding carried over from #15508: the review swarm's latest verdict on
fc19faaf4981requested changes (changes_requested); read the swarm's review on #15508, address it here, and let the swarm re-review this PR. Green CI alone is not done.