Skip to content

πŸ› fix: close issues for contributor PRs merged by the hive - #15158

Merged
hivecommons-hive[bot] merged 2 commits into
hivecommons:v5from
thatguywob:fix/15148-close-hive-merged
Oct 29, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
hivecommons:v5from
thatguywob:fix/15148-close-hive-merged

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

Fixes #15148

Contributor PRs merged by the hive can leave their fixing issues open on non-default branches because GitHub does not apply closing keywords there and close-on-merge previously trusted only the PR author.

Accept the configured hive identity as the merge actor as well as the author. Resolve an omitted merge actor through the existing terminal-PR detail lookup, including when cached PR metadata is incomplete. The usual claim evidence, reporter confirmation, reopen, and closure safeguards still apply; successful closure removes stage labels.

Regression coverage includes external PRs merged into v6, missing cached merge actors, rejection of other/unknown merge actors, confirmation gating, unmerged PRs, and backfill stage-label cleanup. Added a changelog fragment.

Validation: gofmt -l on changed Go files and git diff --check passed. Tests were not run locally, as required by AGENTS.md; CI provides the test verdict.

β€” hive: backend=codex


🐝 Hive Agent: contributor | SHA: 70cfe1db8

Trust the configured hive merge actor for close-on-merge even when the
PR author is an external contributor. Resolve missing merge actors from
PR details so incomplete cached/list responses do not strand issues on
non-default branches. Keep the existing closing evidence and issue gates.

Hive-Run: hivecommons#15148
Hive-Plan: close-on-merge-hive-actor
Hive-Spec: issue-15148#expected
Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 28, 2026
@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 hanthor 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 the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 28, 2026
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login 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 28, 2026
@github-actions

github-actions Bot commented Oct 28, 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
#15134 πŸ› Delegated decision on a capability gap: model the blocker, stop the un-park/re-park loop, name the missing App permission same files src/docs/operator-reference.md
#15104 πŸ› Activity Monitor: Rebase, then merge as maintainer; fixer owns parked conflicting PRs; dismiss self-inflicted changes_requested same files src/docs/operator-reference.md
#15085 ✨ Activity Monitor: Adopt now and Reroute to another clanker for PRs waiting on a contributor's clanker same files src/docs/operator-reference.md
#15181 πŸ› fix(dashboard): let hive decide approves a green, reviewed 090 PR instead of refusing same files src/docs/operator-reference.md
#15157 ✨ Conflict-aware merge train in the automerge lanes same files src/docs/operator-reference.md
#15186 πŸ› Activity Monitor: one coherent post-decision state for Let hive decide rows; 060 reviewed in CI / Review same files src/docs/operator-reference.md
#15122 πŸ› Write-back containment: per-kind gate for every unsolicited GitHub write, with backfill guard same files src/docs/operator-reference.md

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

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=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

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=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

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

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

Choose a reason for hiding this comment

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

Docs currency β€” one in-scope finding.

src/docs/operator-reference.md:178 (the issues.close_on_merge row) still describes the pre-#15148 rule: "When a hive-authored or trusted-author PR merges and closing keywords or Hive claim metadata show it fixed an open issue…". This PR widens that gate in src/pkg/github/close_on_merge.go:530-539 to also accept a PR whose resolved merge actor (prTerminalMergedBy, src/pkg/github/prclaims.go:1118) is the hive identity, regardless of author β€” which is the whole point of #15148. The operator reference is the only place the trust rule is spelled out for operators, so it should move with the behavior.

| `issues.close_on_merge` | `true`. | When a PR merges that was authored by Hive or a trusted author, or that Hive itself merged (the merge actor is the hive identity, resolved from `merged_by` or a PR detail lookup when cached metadata omits it; [#15148](https://github.com/hivecommons/hive/issues/15148)), and closing keywords or Hive claim metadata show it fixed an open issue, Hive comments `Fixed by #<pr> (merged <sha>). Closing. Reply /reopen if the problem persists.` and closes the issue as `completed`. Issues labelled `needs-reporter-confirmation`, `epic`, or `needs-human` stay open: Hive comments that the fix merged, adds `hive/likely-done`, and waits for `/fixed` or more instructions. Both comments carry `<!-- hive-close-on-merge -->`, Hive's already-handled marker: an issue with that comment is never closed on merge again, so `/reopen` after a Hive close sticks. An issue reopened after the PR merged stays open even when GitHub's closing keyword, not Hive, closed it: before closing, Hive reads the issue timeline since that PR's merge, and a `reopened` event by anyone but Hive (including `github-actions[bot]` from `/reopen`) skips the close and posts one comment carrying `<!-- hive-reopened-after-merge pr=<pr> -->`, so later sweeps skip that PR without rereading the timeline. The marker is per PR: a different PR that merges after the reopen can still close the issue. If the timeline cannot be read, Hive leaves the issue open and retries on the next sweep. |

(Only the first clause changes; the rest of the row is reproduced verbatim so the suggestion applies cleanly to line 178.)

Changelog fragment name/category (changelog.d/fixed-15148-close-hive-merged-pr.md) and wording match the diff; src/docs/webhooks.md:77-78 ("uses the scheduled sweep's identity/trusted-author policy") remains accurate since it defers to that policy.

β€” hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 28, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the review swarm requested changes

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.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

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

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=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

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=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

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

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 added stage/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 29, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 3f38fc1 into hivecommons:v5 Oct 29, 2026
66 of 69 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#151587cee163` sha256:b8be3adbcfaec43c9c64f0424ad0b36c6c44b79fcc32d5e9a1e8ad006d7099f9 β€” download from the dashboard or `hivectl review evidence #15158`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Merged by hive contributor-lane auto-merge: CI green for β‰₯30m, reviewer verdict approve, claim by @thatguywob on #15148 verified.

@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/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted labels Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login 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.

πŸ› Issue stays open and "PR in progress" after the hive merges its fixing PR into a non-default branch (close-on-merge skips untrusted_author)

1 participant