Repository navigation
π issue stage labels: take has-open-pr off once no open PR links the issue - #18833
Merged
hivecommons-hive[bot] merged 5 commits intoNov 17, 2026
Merged
hivecommons-hive[bot] merged 5 commits into
hivecommons-hive[bot] merged 5 commits into
Conversation
β¦issue The open-PR guard added has-open-pr when it refused a dispatch and nothing removed it, so after the linking PR merged or closed the issue kept claiming an open PR links it (projectbluefin/bluefin-bling#82, projectbluefin/common#1656). The issue stage-label sweep now asks the guard's own listing (OpenPRLinkingIssue) for issues wearing the label and clears it through Decision.Clear in the stage write, only on a successful listing with no linking PR. Once per linking PR: a re-add with still no PR is yielded, and a linking PR seen again resets it. Signed-off-by: Danathar <6772335+Danathar@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Contributor
|
[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 |
Contributor
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
This was referenced Nov 17, 2026
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
has-open-prnow comes off an issue once no open PR links it.The open-PR dispatch guard adds the label when it refuses to dispatch an issue because an open PR already links it with
Fixes/Closes/Resolves. Nothing ever removed it. After the linking PR merged or closed, the issue kept a label whose description says "An open PR already links this issue β¦ the hive will not dispatch it again". That is false, and it misleads people and the tracker.The issue stage-label sweep now checks the guard's own open-PR listing for each open issue that wears the label. When the listing succeeds and no open PR links the issue, the sweep removes the label in the same write as the stage, with no comment.
What happened
Two projectbluefin issues, times Eastern:
has-open-prfor bluefin-bling#128.stage/010-actionable.stage/010-actionable,good first issueandhelp wanted, though no open PR links the issue.hive/partially-addressed, nowstage/045-needs-decision).has-open-pr.This isn't specific to those repos. Every hive with the guard on (
scanner.skip_issues_with_open_pr, defaulttrue) gets a permanent label on every issue the guard ever refused.Cause
markIssueHasOpenPR(src/pkg/github/open_pr_links.go) is the only code that writes the label.git grep HasOpenPRLabelfinds only the add.What changed
issue_stage_labels.go, newsettleOpenPRLabelClear):has-open-pr, with the guard on, at a real stage.Client.OpenPRLinkingIssue: the guard's listing, cached per repo per minute, with the same closing-keyword grammar.stageengine):IssueFacts.StaleOpenPRLabel.DeriveIssueadds the label toDecision.Clear, next to the staleneeds-triageandapproved-directionclears, so it comes off in the stage write.stagelabels.Store, the reconciler), modeled onneeds-triage(π [v5] bug: the hive and a repo's own triage tool keep removing and re-adding needs-triage on covered issuesΒ #18387):OpenPRLabelClearedAt).OpenPRLabelClearYielded), logs that once, and leaves the label.ResetOpenPRLabelClear), and the label can come off once more after that PR goes. That allows at most one removal per linking-PR lifecycle, so it can't loop.operator-reference/sweeps-and-operations.mdandrunning-at-level-6.mdnow say when the label comes off.Not in this PR
good first issue/help wantedon the same issues (a separate bug).labels-and-control-signalshas nohas-open-prrow (it only mentions the label in passing), so there was nothing to update there.Tests
issue_stage_labels_open_pr_clear_test.go, throughSyncIssueStageLabelswith the fake GitHub server, which now answers the open-PR listing:Fixes #82PR still open: kept;SetSkipIssuesWithOpenPR(false): kept, with no listing at all;TestOpenPRLabelClearAllowedcovers the once-only rule on its own.stageengine/derive_issue_open_pr_clear_test.go: the label is inClearonly when marked stale, alongside a staleneeds-triage, and never on a closed issue.stagelabels/open_pr_label_clear_test.go: the removal and yield survive a save and reload, and the reset clears both.Only
gofmt -lwas run locally (AGENTS.md bans localgo test/go build/go vet). CI runs the tests.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1