Skip to content

🐛 fix: scope tracker link memo to the excluded PR - #15537

Merged
hivecommons-hive[bot] merged 20 commits into
v5from
hive/adopt-15508
Oct 30, 2026
Merged

hivecommons-hive[bot] merged 20 commits into
v5from
hive/adopt-15508

Conversation

@hivecommons-hive

Copy link
Copy Markdown
Contributor

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 fc19faaf4981 as pushed by @mendezr (fork mendezr/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 their Signed-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 fc19faaf4981 requested 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.

mendezr and others added 5 commits October 29, 2026 19:57
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>
@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

@kubestellar-prow kubestellar-prow Bot added dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 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
#15591 🐛 adoption: superseded PRs close promptly and read as one muted tracker line same files src/pkg/dashboard/stage_tracker.go
#15526 🌱 dashboard: split stage_tracker.go into 4 files same files src/pkg/dashboard/stage_tracker.go
#15584 🐛 Close the hive's own empty-diff PRs as superseded instead of asking a person same files src/pkg/dashboard/stage_tracker.go
#15574 🌱 dashboard: split stage_tracker.go into 4 files CONFLICT src/pkg/dashboard/stage_tracker.go

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 29, 2026
@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:20 serves a closer node with no url: {"number":70,"merged":true,"mergedAt":"…"}.
  • #15509 adds sameRepoPullURL(node.URL, owner, repo, node.Number) to closedByPullRequestReference (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/70 fails, and the node is skipped — ClosedBy becomes 0 for both rows and this test's closer = 0, want 70 assertion 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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/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.
Why: The branch isn't mergeable yet.
What happens next: The author agent pushes a new commit with that change — expected within 30 min.
If it doesn't happen: Re-run the decision, give different direction, or close it.

Decided by the hive at @clubanderson's request as the owner's delegate under the owner-delegate policy (rule fix-then-merge).

@hivecommons-hive hivecommons-hive Bot added stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Decision recorded by @clubanderson for head 5400580. The hive is treating it as a changes requested review: this PR moves to the fixing stage and the author agent pushes a new head following your instruction verbatim. The review swarm then re-reviews that head; if it approves, the PR comes back for your merge approval.

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>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 29, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:3044 now caches the unfiltered closer (IssueLinkState(..., 0); with currentPR == 0 the node.Number == currentPR skip at pkg/github/pr_supersession_sweep.go:472 never drops a real PR), and :3058-3062 excludes 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, which sameRepoPullURL at pr_supersession_sweep.go:487-494 would now drop) is addressed: stage_tracker_link_memo_test.go:20 serves "url":"https://github.com/hivecommons/hive/pull/70", so the test is consistent with the URL filter already on v5.
  • go build ./pkg/dashboard ./pkg/github passes on cad267e. The merge from v5 carries 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

@github-actions github-actions Bot added the conflicts-with-open-pr Open PR has a merge conflict with another open PR label Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed → 050-review-pending: required-check-pending:Sign-off survives the squash

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — no findings from this perspective.

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

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:3044 now calls IssueLinkState(..., 0), so the memo entry under owner/repo#issue (:3041) holds the issue's unfiltered merged closer, and :3058-3061 applies the carrying-PR exclusion per row. closedByPullRequestReference (src/pkg/github/pr_supersession_sweep.go:470) treats currentPR == 0 as "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:20 now serves "url":"https://github.com/hivecommons/hive/pull/70", which passes the sameRepoPullURL filter that is already on v5 (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.md is 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

@hivecommons-hive hivecommons-hive Bot added stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit a970c2b into v5 Oct 30, 2026
79 of 81 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the hive/adopt-15508 branch October 30, 2026 01:39
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#155370f50da1` sha256:222558029c9b137f9919150dae9fc7e393e6d814f4fa7a84887bcabfab201a0d — download from the dashboard or `hivectl review evidence #15537`.

@github-actions

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

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) labels Oct 30, 2026
hivecommons-hive Bot added a commit that referenced this pull request Oct 30, 2026
…racker hunks onto the split files

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR conflicts-with-open-pr Open PR has a merge conflict with another open PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review backlog (correctness): Link memo keyed by issue only while result depends on per-row exclude (currently a no-op)

1 participant