Repository navigation
Conversation
An `issues: closed` webhook left the issue's blocker ledger row in place, so capabilities.blocked_items counted closed issues. Clear the row on close, as the dashboard recheck and close-partial paths already do. Hive-Run: hivecommons#15273 Hive-Plan: review-backlog style finding, webhook_cache.go issue close Hive-Spec: blocker-ledger#clear-on-close Signed-off-by: SACHIN NAIK <sachin.naik@ibm.com>
|
Welcome to the Hive Commons community! Thanks for opening your first PR here! We're excited to have you contributing. Before merge, please ensure:
A maintainer will review your PR soon. Hope you have a great time here! |
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. |
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether #15312 closes in favour of #15309, which makes the same blocker-ledger-clear-on-close change as a superset and already carries a hive approve verdict at cba03b0.
This appears to duplicate #15309, which makes the same change at the same insertion point in src/pkg/github/webhook_cache.go (HandleWebhookEvent, inside the webhookTouchedIssue block at line ~493) and cites the same root issue (#15155; this PR's body says it "also covers the duplicate #15155 finding").
What I verified by reading both diffs in full against v5:
- This PR clears the ledger row only for an
issuesdelivery withaction == "closed"(webhookIssueClosed,webhook_cache.go:648), on the configured repo name only. - #15309 clears whenever
res.Item.Closed()is true.WebhookItemHint.Closed()(webhook_cache.go:94) readsissue.state == "closed", which anissues: closedpayload carries, so it covers every case this PR covers, plus: comments on already-closed issues (so a late needs-human report cannot recreate the blocker), the hive's owncloseIssuepath (issue_close.go:132), and both the configured short name and theowner/repoalias. - Both PRs insert into the same hunk of
HandleWebhookEvent, so they conflict textually: whichever merges second will need a rebase, and after #15309 lands this PR's clear becomes a no-op.
The code here is correct for what it does (the p.Issue.PullRequest != nil guard in webhookTouchedIssue, webhook_cache.go:637, is why the PR-close case in TestWebhookIssueClosedClearsBlocker passes) β this is a scope/duplication call, not a defect.
Flagging for a maintainer: if you agree, this one could be closed in favour of #15309 (broader, already hive-approved at its current head). I have not closed anything.
β hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
There was a problem hiding this comment.
Decision needed: @clubanderson should decide whether #15312 is closed in favour of #15309, which clears the same ledger row on webhook close and additionally covers the owner/repo alias key and Hive's own closeIssue path.
Conclusion: this appears to duplicate #15309 (fix: clear blocker ledger on ordinary issue closure), which is already review-clean at its current head. I have read both diffs in full; #15309 is a strict superset and should be the survivor.
Same change, verified: both PRs edit src/pkg/github/webhook_cache.go inside HandleWebhookEvent to call itemblocker.Shared().Clear(configured, n) when an issues delivery reports a closed non-PR issue (PR-shaped payloads are already excluded upstream by webhookTouchedIssue, webhook_cache.go:637). Both add a regression test in issue_blocker_test.go and a changelog.d/fixed-* fragment. The issue bodies (#15273 / #15155) describe the same symptom and this PR's body itself says it "also covers the duplicate #15155 finding".
Where they differ (why #15309 is preferable):
- Ledger key aliasing. The ledger is written under two different keys: the webhook path observes under the configured repo name (
webhook_cache.go:516), while the task-list sweep observes underowner+"/"+repo(task_list_sweep.go:663). When a repo is configured by short name those keys differ. This PR clears onlyconfigured; #15309 clears both (splitRepoβ full name,webhook_cache.gohunk at L498-505 in that PR), so a sweep-recorded row is released too. - Hive-initiated closes. #15309 also clears the row in
issue_close.go(closeIssue, afterIssues.Editsucceeds), so an issue Hive closes itself does not wait for the webhook round-trip. This PR has no equivalent. - Comments after close. #15309 skips
Observefor comments on an already-closed issue, so a late needs-human comment cannot recreate the row. This PR still observes them.
Nothing here is wrong in this PR β the Get-before-Clear at webhook_cache.go:508-510 is merely redundant (Clear on an absent key is a no-op, pkg/blocker/ledger.go:250) β it is just narrower than the sibling.
Flagging for a maintainer: if you agree, this one could be closed in favour of #15309. I have not closed anything.
β 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 @036bff0, 57/57 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 @036bff0, 57/57 checks green, DCO yes, soak 16m0s of 30m0s. How to release it:
Clear the cause and the hive re-evaluates on its next pass; the stage moves to |
|
Test coverage (quality) β approve, no findings (read at head 036bff0).
π Hive Agent: β hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
|
/lgtm Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
|
/approve Posted by @clubanderson from the Hive dashboard; the merge gate decides from here. |
|
@hivecommons-hive[bot]: changing LGTM is restricted to collaborators DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: hivecommons-hive[bot] 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 |
|
@odttlnt 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. |
|
@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.
|
Fixes #15273
An
issues: closedwebhook left the issue's blocker ledger row in place, socapabilities.blocked_itemscounted closed issues.HandleWebhookEventnow clears the row on a non-PR issue close, as the dashboard recheck and close-partial paths already do. Also covers the duplicate #15155 finding.Tests: added
TestWebhookIssueClosedClearsBlocker(fails without the fix;labeledand PR-close deliveries leave the row). Not run locally per AGENTS.md (CI is the verdict, and no Go toolchain is installed here); the changelog fragment is included.β hive: backend=bob model=premium