Repository navigation
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 |
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. |
|
Scanner note (comment-only, head lives in a fork): #15607 and #15608 are the same finding as #15606 from other review perspectives. Adding 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
There was a problem hiding this comment.
Read the change against the tree — looks correct to me.
src/pkg/github/pr_supersession_sweep.go:471-486 now scans every same-repo merged node from closedByPullRequestsReferences and keeps the one with the latest MergedAt instead of returning on the first match; MergedAt is a time.Time (:460) so After is the right comparison, and the found flag preserves the previous (zero, false) contract when nothing qualifies. The three call sites (pr_supersession_sweep.go:418, advisory_work.go:105, decomposed_parents.go:283) only consume the (closer, ok) pair, so no caller behaviour changes other than which PR is picked.
The new test type-checks against NewClientForTest (client.go:1451) and covers the cases that matter: excluded current PR, unmerged node, cross-repo node, and two same-repo merged nodes with different mergedAt.
Info only, not a defect: the REST fallback at :429-434 (ListPullRequestsWithCommit) still takes the first merged PR, but that list is scoped to a single closing commit, so ordering ambiguity there is far less likely.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
@Karibhou this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
|
stage 095-pre-merge-soak → 072-returned-to-contributor: fork-not-editable |
Choose the latest merged same-repository closing reference so GraphQL node ordering does not decide which pull request is reported. Hive-Run: hivecommons#15606 Hive-Plan: issue-15606 Hive-Spec: issue-15606#latest-merged-closer Signed-off-by: Karibhou <157208370+Karibhou@users.noreply.github.com>
a87009a to
4cd8b23
Compare
There was a problem hiding this comment.
Looks correct to me.
Read closedByPullRequestReference at src/pkg/github/pr_supersession_sweep.go:471-486 on this head: the loop now keeps the node with the greatest MergedAt among merged, same-repo, non-current nodes. MergedAt is a time.Time (struct at :460), so After on the zero-valued latest is safe and the !found seed means the first candidate always wins before comparison. sameRepoPullURL and the currentPR skip are unchanged, so cross-repo and open nodes are still excluded — the new test covers exactly those three cases plus two merged same-repo nodes.
#15606 and #15607 are the same finding filed under two perspectives, so closing both with this PR is right.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Looks correct to me. Verified at 4cd8b23:
closedByPullRequestReference(src/pkg/github/pr_supersession_sweep.go:438-486) now keeps the latest same-repo merged node instead of returning on the first; thefound/Afterpair handles the first match correctly (zero-timelatestis never compared). The existing filters forcurrentPR,!MergedandsameRepoPullURLare untouched, so the open and cross-repo nodes in the new test are excluded by the same code paths as before.- The node struct already decodes
mergedAtintotime.Time(pr_supersession_sweep.go:460), so the comparison is on parsed times, not strings. - The sole caller
resolveIssueClosingPR(:417-419) only uses the(closer, ok)shape, which is unchanged. The commit-based fallback (:429-434) still returns the first merged PR, but that path is keyed by one closing commit so ordering is not a concern there. - The new test mirrors the existing
/graphqlhttptest pattern inpr_supersession_sweep_test.goandNewClientForTest(client.go:1457).go build ./pkg/github/passes on the head.
This resolves #15606 and #15607, which are the same pre-existing finding filed twice from the #15537 review.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
@Karibhou this PR is back in your court ( Failing checks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (3 waiting): fixes are handed out before new work as soon as you have capacity. |
|
@clubanderson asked the hive to adopt this pull request now, without waiting for its author's hive. The hive opens its own PR carrying the author's commits and sign-off unchanged on the pass now running; this PR closes when that copy merges. |
|
@clubanderson asked the hive to adopt this pull request now, without waiting for its author's hive. The hive opens its own PR carrying the author's commits and sign-off unchanged on the pass now running; this PR closes when that copy merges.
|
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether to merge this contributor PR (#15609, now green at 7b9848b) and close the hive adoption #15634, or merge #15634 and close this one — the two diffs are byte-identical and cannot both land.
Conclusion: the change is correct, and this PR is now content-identical to its hive adoption #15634. One of the two should be closed; I have not closed anything.
Duplicate check (both diffs read in full): gh pr diff 15609 and gh pr diff 15634 differ in nothing but blob hashes — same src/pkg/github/pr_supersession_sweep.go hunk, same new pr_supersession_closer_test.go, same changelog.d/fixed-15606-latest-issue-closer.md. #15634 was opened as "Supersedes #15609" when this PR's CI was red; this head (7b9848b = 4cd8b23 + a merge of v5) is now green except for tide, so the original reason for the adoption no longer applies. Merging either makes the other a no-op; which one lands is an attribution/ownership call, not a code call.
Correctness (read against v5): closedByPullRequestReference (src/pkg/github/pr_supersession_sweep.go:468-485) previously returned on the first merged same-repo node, so GraphQL node order picked the closer. The new loop keeps the node with the latest MergedAt using a strict After, so ties keep the first node — deterministic. MergedAt is time.Time with json:"mergedAt" (line ~455), so the "mergedAt":null on the unmerged node in the test decodes to the zero value and is skipped by !node.Merged before it is ever compared. The only caller, resolveIssueClosingPR (line 418), consumes (closer, ok) unchanged. The test's cross-repo node other/repo/pull/42 exercises the existing sameRepoPullURL filter at line 480 and has the same timestamp as the winner, which confirms the repo filter and not timestamp order is what excludes it. Looks correct to me.
— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
Needs a decision, not a merge:
Head: verdict requires_human @7b9848b, 54/54 checks green, DCO yes, soak 0s of 30m0s. How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
|
Needs a decision, not a merge:
Head: verdict requires_human @7b9848b, 54/54 checks green, DCO yes, soak 4m0s of 30m0s. How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
|
@Karibhou this PR is back in your court ( Review asks:
Reply here or push a new head to this branch (same sign-off); CI and the review swarm re-run automatically and the PR returns to the normal path. Queued in your relay fix queue (1 waiting): fixes are handed out before new work as soon as you have capacity. |
Summary
closedByPullRequestReferenceinstead of returning whichever merged node GraphQL lists first.Fixes #15606
Fixes #15607
Validation
gofmtapplied to changed Go files.git diff --checkpassed.AGENTS.md.— hive: backend=codex