Skip to content

🌱 test: cover issue_comment-seeded blocker cleared on issue close - #15646

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

hivecommons-hive[bot] merged 31 commits into
v5from
hive/adopt-15312

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

Supersedes #15312 (adopted after CI went red and the contributor was unavailable; original commits by @odttlnt preserved).

Refs #15273

Test-only. The behaviour #15273 asked for — clearing the shared blocker ledger row when an issues: closed webhook arrives — already landed on v5 via #15309 (src/pkg/github/webhook_cache.go clears on res.Item.Closed(); recorded in changelog.d/fixed-15155-closed-issue-blockers.md). This PR therefore ships no production change and no changelog fragment.

What it adds: TestWebhookCommentSeededBlockerClearsOnClose, a regression test for the one path the existing TestWebhookClosedIssueClearsBlocker table does not cover — a blocker seeded through a live issue_comment delivery, then cleared on issues: closed while another item's capabilities.blocked_items count is preserved.

#15273 can be closed as fixed by #15309.

This branch began as #15312's head 036bff04204f as pushed by @odttlnt (fork odttlnt/hive).

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.

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: #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>
@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 30, 2026
@github-actions

github-actions Bot commented Oct 30, 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
#15312 🐛 fix: clear blocker ledger entry when an issue closes same files src/pkg/github/issue_blocker_test.go

@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 30, 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.

Decision needed: @clubanderson should decide whether #15646 (and its fork original #15312) should close as redundant with merged #15616, or land as a belt-and-braces second clear.

This change is already on v5 via #15616 — the new block is a strict subset of what the base branch does.

Read src/pkg/github/webhook_cache.go at this head. Inside the same if n, ok := webhookTouchedIssue(event, p) body, a few lines above the block this PR adds, v5 already has (from #15616, commit 11ec258):

if res.Item.Closed() {
    // Closed issues no longer contribute to blocked_items. ...
    l := itemblocker.Shared()
    l.Clear(configured, n)
    owner, repo := c.splitRepo(configured)
    if full := owner + "/" + repo; full != configured {
        l.Clear(full, n)
    }
}

WebhookItemHint.Closed() (webhook_cache.go:94) is true for any issues/issue_comment payload whose issue.state is closed, regardless of action, and it clears both the configured name and the owner/repo alias. The block added here (webhookIssueClosed → action == "closed", clear configured name only) does nothing the existing code has not already done by the time it runs.

The new test TestWebhookIssueClosedClearsBlocker only fails without this PR because its payload {"action":"closed","issue":{"number":21}} omits issue.state; a real GitHub issues.closed delivery always carries "state":"closed", so in production the existing path fires first.

Nothing here is wrong — #15312 was opened before #15616 merged and simply got overtaken. Flagging for a maintainer: if you agree, this and #15312 could be closed in favour of #15616. I have not closed anything.

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

@hivecommons-hive hivecommons-hive Bot added stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Needs a decision, not a merge:

Head: verdict requires_human @53b91bd, 64/65 checks green, 1 pending, DCO yes, soak 0s of 30m0s.

What to do: approve this head (53b91bd) to merge as-is, or leave a changes requested review (or reply /hive decision <what to change>) and the hive will push the fix.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@kubestellar-prow

Copy link
Copy Markdown
Contributor

@hivecommons-hive[bot]: you cannot LGTM your own PR.

Details

In response to this:

/lgtm

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

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.

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

/approve

Posted by @clubanderson from the Hive dashboard; the merge gate decides from here.

@hivecommons-hive hivecommons-hive Bot removed the stage/085-needs-decision A human decision is owed: sentinel alert, hold/needs-decision label, human-only rule or parked issue label Oct 30, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: hivecommons-hive[bot]
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

@hivecommons-hive hivecommons-hive Bot added the stage/050-review-pending Review swarm requested; awaiting a verdict for the current head label Oct 30, 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.

Decision needed: @clubanderson should decide whether #15646 (the hive's adoption of #15312) closes as already landed by #15309, which merged into v5 as cba03b0 and clears the blocker ledger on the same webhook path.

Decision needed: @clubanderson should decide whether #15646 (the hive's adoption of #15312) closes as already landed by #15309, which merged into v5 as cba03b0 and clears the blocker ledger on the same webhook path.

This is a no-op merge against v5. I read this branch's full delta against its merge-base (webhook_cache.go +16, issue_blocker_test.go +39, one changelog fragment) and the current v5 tree:

  • v5 src/pkg/github/webhook_cache.go:512-522 already has if res.Item.Closed() { l.Clear(configured, n); … l.Clear(full, n) } inside the same webhookTouchedIssue block — that is #15309's change, and it also clears the owner/repo alias this PR does not.
  • This PR's added block at webhook_cache.go:536-543 runs immediately after it and clears (configured, n) again, gated on action == "closed". WebhookItemHint.Closed() (webhook_cache.go:94) reads issue.state, which every GitHub issues: closed delivery carries, so on real payloads the row is already gone by the time the new block runs.
  • The new test passes on v5 only because its payload omits state; it is pinning a code path real deliveries never reach.

The code is not wrong — it is the same fix #15309 already landed, written a second time. The earlier review on #15312 flagged exactly this (#15309 as superset); the adoption carried the original commit forward unchanged without picking that up. Keeping the original author's work in history is fine, but merging it adds a redundant clear and a test of an unreachable branch.

Flagging for a maintainer: if you agree, this one and #15312 can be closed in favour of #15309. I have not closed anything.

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

@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 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/070-fixing Hive-authored PR: CI red, changes requested or needs rebase; a hive agent is fixing it labels Oct 30, 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.

Decision needed: @clubanderson should decide whether #15646 (and its fork original #15312) should be closed as already landed on v5, or merged as a redundant second guard.

Conclusion: the behaviour this PR adds is already on v5; merging it is effectively a no-op, and the new test only fails on v5 because its payload omits a field GitHub always sends.

Evidence (read at v5 tip ee5bf9ad9 and at this PR's head):

  • src/pkg/github/webhook_cache.go:512-522 (v5) — inside the same webhookTouchedIssue branch this PR extends, if res.Item.Closed() { l.Clear(configured, n); … l.Clear(owner+"/"+repo, n) } already drops the ledger row for any issues/issue_comment delivery whose issue.state is closed. WebhookItemHint.Closed() (webhook_cache.go:94-96) reads p.Issue.State.
  • src/pkg/github/issue_blocker_test.go:107-157 (v5) — TestWebhookClosedIssueClearsBlocker already covers {"closed", "issues", "closed", "closed", …, wantBlocked=false} and asserts Capabilities().BlockedItems drops.
  • changelog.d/fixed-15155-closed-issue-blockers.md (v5) — "Clear blockers when issues close through GitHub or the hive". #15155 is the duplicate this PR's body says it also covers.
  • The block this PR adds (webhook_cache.go:532-542 on the PR head) runs after that existing block, keyed on action == "closed" instead of issue.state, and clears only configured (not the owner/repo alias the existing block also clears). Its test payload {"action":"closed","issue":{"number":21},…} has no state, so Item.Closed() is false there — that is the only reason TestWebhookIssueClosedClearsBlocker fails without the diff. Real issues.closed webhooks carry "state":"closed".

Nothing here is wrong — the extra guard is harmless — but it is redundant against the base branch. I have not closed anything; flagging for a maintainer to pick close-as-landed or merge-as-is.

— 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.

Decision needed: @clubanderson should decide whether #15646 (adopted from @odttlnt's #15312) still needs to land now that merged #15309 already clears the blocker ledger on issues: closed webhooks, or whether #15646/#15312 should be closed and #15273 closed as fixed by #15309.

Conclusion: the fix this PR adds is already on v5 via #15309 (merged 2026-10-29 05:50 UTC, for the duplicate issue #15155). The rebase onto v5 (head 146b903) stacked the new block directly underneath the existing one, so merging it adds a redundant branch rather than new behaviour. Not wrong — just no longer needed.

Evidence, read from the tree at 146b903:

  • src/pkg/github/webhook_cache.go:510-520 (base, from #15309): inside the same webhookTouchedIssue branch, if res.Item.Closed() { itemblocker.Shared().Clear(configured, n); … Clear(owner+"/"+repo, n) } — clears the row on a closed non-PR issue, for both the configured alias and the owner/repo form, and also skips Observe for comments on closed issues.
  • src/pkg/github/webhook_cache.go:529-539 (this PR): if webhookIssueClosed(event, p) { … l.Clear(configured, n) } — clears only the configured alias; a strict subset of what the block ten lines above already did.
  • The only behavioural difference: the base keys on issue.state == "closed" (WebhookItemHint.Closed(), webhook_cache.go:94), this PR keys on action == "closed". Real GitHub issues deliveries carry both, so this only matters for the synthetic test payload in issue_blocker_test.go:91 ({"action":"closed","issue":{"number":21}}, no state). That is why the new TestWebhookIssueClosedClearsBlocker still fails on base — not because the fix is missing.
  • PR-close vs issue-close is already handled upstream of both blocks: webhookTouchedIssue (webhook_cache.go:655-663) returns false when p.Issue.PullRequest != nil.

Two reasonable outcomes, which is why I'm routing rather than judging:

  1. Close #15646 and #15312 as superseded by #15309, and close #15273 (still OPEN) as fixed by it; or
  2. Land #15646 for the action == "closed" belt-and-braces plus the extra regression test — in which case the duplicate Clear block should probably be folded into the existing res.Item.Closed() branch rather than left as a second copy.

Also note CI on this head is still pending (build-and-test, build (linux/arm64…) not yet concluded). I have not closed or changed anything.

— hive reviewer-2 · model: claude-fable-5.1

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

Needs a decision, not a merge:

Head: verdict requires_human @146b903, 61/62 checks green, 1 pending, DCO yes, soak 0s of 30m0s.

What to do: approve this head (146b903) to merge as-is, or leave a changes requested review (or reply /hive decision <what to change>) and the hive will push the fix.

How to release it:

  • After reading the verdict, a trusted merger can submit a GitHub Approve review for the current head and the lane clears the hold on its next pass; /hive approve replies on a PR are acknowledged but not consumed.

Clear the cause and the hive re-evaluates on its next pass; the stage moves to stage/090-ready-for-human-merge, stage/095-pre-merge-soak or the merge queue on its own. Approval does not bypass CI, hold labels or other merge gates.

@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.

Decision needed: @clubanderson should decide whether #15646 (and its origin #15312) can be closed now that #15309 already clears the blocker ledger on issue close.

Conclusion: this change is already on v5. Merged #15309 (19b17ed374, 2026-10-29) fixed #15273 by the same mechanism, so the block this PR adds never does anything. Recommend closing #15646 (and the fork original #15312) rather than merging. I have not closed anything.

Evidence (read at head 05f28d6):

  • src/pkg/github/webhook_cache.go:512-520 (base, from #15309): inside the same if n, ok := webhookTouchedIssue(event, p) block, if res.Item.Closed() { itemblocker.Shared().Clear(configured, n); … } already removes the row — and also clears the owner/repo alias, which this PR's block does not.
  • src/pkg/github/webhook_cache.go:529-539 (this PR): if webhookIssueClosed(event, p) { … if _, ok := l.Get(configured, n); ok { l.Clear(configured, n) } } runs after that clear, so l.Get is always false for the same key. Dead code.
  • The PR-close guard the new test relies on ("pull_request":{"url":"x"} must not clear) is provided by webhookTouchedIssue at webhook_cache.go:648 (p.Issue.PullRequest != nil → not touched), not by webhookIssueClosed, which checks only event == "issues" && p.Action == "closed".
  • src/pkg/github/issue_blocker_test.go:107 already has TestWebhookClosedIssueClearsBlocker from #15309; the new TestWebhookIssueClosedClearsBlocker passes against base without the diff, so it is not a regression test for this change.
  • changelog.d/fixed-15273-blocker-ledger-clear-on-close.md would record #15273 as fixed a second time.

Not redundant-marked: the diffs differ (this one adds a helper, a second test and a fragment), so merging is not a byte-level no-op — but behaviourally it is.

Side note: build-hub (linux/amd64) is red on this head; I did not triage it since the recommendation is to close regardless.

— 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 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.

Correctness (delta re-review, head 79bffde)

The delta since 05f28d6 is only Merge branch 'v5' pulling in already-landed #15718 (pr_merge_state.go, its test, operator-reference.md, changelog.d/security-15421.md); the PR's own three files are byte-identical to the previous head. Nothing new to judge in the delta.

Previous findings at the new head:

  • Still present (in-scope): src/pkg/github/issue_blocker_test.go:65 — TestWebhookIssueClosedClearsBlocker passes only on a synthetic payload. Base v5 already drops the ledger row at src/pkg/github/webhook_cache.go:512-523 whenever res.Item.Closed() (payload issue.state == "closed", webhook_cache.go:95), which every real GitHub issues: closed delivery carries. The test payloads (issue_blocker_test.go:89) omit "state", so they bypass the base path and exercise only the new block at webhook_cache.go:532-541 — which on a real payload is a no-op after the base Clear at line 516. Concrete fix: either close this PR as superseded by #15309, or drop the redundant block + webhookIssueClosed (webhook_cache.go:678-680) and keep the test with a realistic "state":"closed" payload as a regression guard for #15309.
  • Still present (intent-alignment, not re-filed here): the added block at webhook_cache.go:532 duplicates merged #15309.

— 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.

Intent-alignment (delta re-review, head 79bffdeb) — the delta is only a v5 merge-in (#15718: pr_merge_state.go, its test, operator-reference.md, changelog.d/security-15421.md); none of the PR's own hunks changed.

Still present (in-scope): this PR duplicates work already on v5. #15309 (merged 2026-10-29, 19b17ed) already clears the blocker ledger on issues: closed: src/pkg/github/webhook_cache.go:512-522 at head runs l.Clear(configured, n) (and the owner/repo alias) whenever res.Item.Closed(), which webhookItemHint derives from issue.state (webhook_cache.go:644, :94-96). The hunk this PR adds right below it (webhook_cache.go:532-541, keyed on action == "closed" via webhookIssueClosed at :679) therefore never clears anything a real GitHub payload has not already cleared, and it covers only the configured name, not the owner/repo alias the base path also clears. Base also already ships TestWebhookClosedIssueClearsBlocker (issue_blocker_test.go:146).

The prior correctness note on issue_blocker_test.go:65 still applies: the new test's close payload omits issue.state, so it exercises only the redundant action-keyed hunk, not the path real deliveries take.

Requested change: #15273 is already satisfied on v5 by #15309. Drop webhook_cache.go:532-541 + webhookIssueClosed, TestWebhookIssueClosedClearsBlocker, and changelog.d/fixed-15273-blocker-ledger-clear-on-close.md, which leaves nothing to land — close this PR as superseded by #15309 and close #15273 citing #15309.

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

hivecommons-hive Bot and others added 2 commits October 30, 2026 11:31
Base v5 already clears the blocker ledger row when a webhook payload
says the issue is closed (#15309, keyed on issue.state via
WebhookItemHint.Closed), so the action=="closed" block and
webhookIssueClosed added here were reachable only for payloads lacking
`state`, which real GitHub deliveries always carry. Remove them and the
changelog fragment (no behaviour change remains), and give the new test
realistic `state` fields so it guards the live issue_comment -> close
flow against the production code path.

Refs #15273

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 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 (correctness, delta 05f28d6 → 6e6253c) — the delta is sound; one advisory.

The final commit 6e6253c removed the action=="closed" clear and webhookIssueClosed from src/pkg/github/webhook_cache.go, correctly: base v5 already clears the ledger row via res.Item.Closed() → l.Clear(configured, n) (webhook_cache.go:512-522, present at merge-base 360a42a), keyed on issue.state, and webhookTouchedIssue (webhook_cache.go:644-652) already excludes PR-backed issues, so the new test's negative cases are enforced by production code. The PR diff against v5 is now only src/pkg/github/issue_blocker_test.go (+40); CI test shards are green at head.

Advisory (in-scope, low): the PR title 🐛 fix: clear blocker ledger entry when an issue closes and body still describe a production fix, but no production code changes remain — this is a regression test for behaviour already landed by #15309. Since the squash commit inherits the title, retitle to something like ✅ test: guard blocker ledger clear on issue close (#15273) and note in the body that #15273 was already fixed on base.

— 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.

Style review (head 6e6253c)

  1. Title/body claim a fix the diff no longer contains. After 6e6253c the PR is test-only (src/pkg/github/issue_blocker_test.go +40). The production clear already lives on v5 at src/pkg/github/webhook_cache.go:512-523 (res.Item.Closed() → l.Clear(...), shipped as changelog.d/fixed-15155-closed-issue-blockers.md). The title 🐛 fix: clear blocker ledger entry when an issue closes and Fixes #15273 describe #15309's work, not this diff. Per #15273's own body: "if it is already fixed, close this item without a PR." Retitle to a test-only change (e.g. ✅ test: cover live issue_comment → close blocker flow) and change Fixes → Refs, or close this PR and #15273 as already fixed.

  2. Near-duplicate test with a near-identical name. New TestWebhookIssueClosedClearsBlocker (issue_blocker_test.go:66) sits in the same file as existing TestWebhookClosedIssueClearsBlocker (issue_blocker_test.go:147), which already table-tests issues/closed clears, labeled+open keeps, PR-comment keeps, and Capabilities().BlockedItems (:152-159, :176-187). The only new coverage is seeding via a live issue_comment delivery instead of l.Observe (:75). Fold that into the existing table (a seedViaWebhook bool column) or, if kept separate, name it for what it adds (e.g. TestWebhookCommentSeededBlockerClearsOnClose) and trim the re-asserted labeled/PR-close cases (:79-89).

— 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.

Intent alignment (read at head 6e6253c)

PR title/body say "fix", diff is test-only — the fix already landed. The only file changed is src/pkg/github/issue_blocker_test.go (+40). The production behaviour #15273 asks for is already on v5 from #15309: src/pkg/github/webhook_cache.go:512-522 clears itemblocker.Shared() for both the configured and owner/repo names when res.Item.Closed(), and head already carries a table-driven regression TestWebhookClosedIssueClearsBlocker (issue_blocker_test.go:147-194) covering closed / labeled-open / reopened / PR / unknown-repo cases. Commit 6e6253c ("drop redundant close-clear") correctly removed the duplicate production change but left the 🐛 fix: title, the "clear blocker ledger entry when an issue closes" claim and Fixes #15273 in place, so the PR now describes work it does not contain.

The new TestWebhookIssueClosedClearsBlocker (issue_blocker_test.go:66-100) does add one path the existing table does not: seeding the ledger through a live issue_comment delivery before the close, and asserting a second item's count survives. That is fine to land as a test — but it should be labelled as such.

Requested change: retitle to a test-scoped title (e.g. ✅ test: cover issue_comment-seeded blocker cleared on issue close), and reword the body to state that #15309 shipped the fix and this PR only adds the regression test for #15273 (keep Fixes #15273 only if the maintainers want #15273 closed by this test-only PR; otherwise Refs #15273 and close the issue as fixed by #15309).

(The earlier swarm note at 146b903 already asked whether this PR should land at all; the above is the concrete remediation rather than a re-ask.)

— 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.

docs-currency — one in-scope finding.

PR title/body describe a behaviour fix the diff no longer contains. After the "drop redundant close-clear" commit, the diff is a single new test (src/pkg/github/issue_blocker_test.go:62-100); no production code or changelog fragment is touched. The clear-on-close behaviour already exists on v5 at src/pkg/github/webhook_cache.go:512-522 (res.Item.Closed() → l.Clear(configured, n)), landed by merged #15309 and recorded in changelog.d/fixed-15155-closed-issue-blockers.md. Yet the title is still 🐛 fix: clear blocker ledger entry when an issue closes and the body says "Fixes #15273" with no mention that the fix already shipped — so the merge commit / release notes would advertise a fix that this PR does not make, and #15273 reads as closed by it.

Requested change: retitle to a test-only prefix (e.g. ✅ test: regression test for blocker ledger clear on issue close), and add one line to the body stating that the behaviour landed in #15309 and this PR only adds the regression test guarding the live issue_comment → issues:closed path. Omitting a changelog fragment is correct as-is (no behaviour change).

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

hivecommons-hive Bot and others added 2 commits October 30, 2026 07:51
TestWebhookIssueClosedClearsBlocker was a near-duplicate of the existing
table test TestWebhookClosedIssueClearsBlocker, differing only by word
order and re-asserting its labeled/PR-close cases. Rename it to
TestWebhookCommentSeededBlockerClearsOnClose and keep only the path the
table does not cover: ledger seeded via a live issue_comment delivery,
then cleared on issues:closed while a second item's count survives.

Refs #15273

Hive-Fix-Attempt: 2/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 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.

Checked the body's claims against v5 before reading the test:

  • src/pkg/github/webhook_cache.go:512-521 already clears the shared ledger (both configured and owner/repo aliases) on res.Item.Closed(), and changelog.d/fixed-15155-closed-issue-blockers.md records it. So the production fix from #15312 is indeed on v5; this PR is correctly test-only.
  • TestWebhookClosedIssueClearsBlocker (issue_blocker_test.go:107) seeds every row via l.Observe(...). The new TestWebhookCommentSeededBlockerClearsOnClose is the one path that table does not exercise: a row created by a live issue_comment delivery, then cleared by issues: closed, with issue 22's count preserved. The helpers it uses (swapSharedLedger, setupWebhookCacheTest, workflowsReport, jsonString) all exist in the package. The test reads correctly to me.

The only thing holding this PR is CI, not code:

  • PR Type is red because the title starts with ✅. That check reads the first character and accepts ✨ 🐛 📖 📝 ⚠️ 🌱; ✅ is not in the set. Retitling to 🌱 test: cover issue_comment-seeded blocker cleared on issue close should turn it green (Hive fix agent: that is the one remaining ask on this branch).

Once merged, #15312 can be closed as superseded and #15273 as fixed by #15309, exactly as the body says. I have not closed or retitled anything.

— 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 Author

Choose a reason for hiding this comment

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

Looks correct to me. Read the tree at 8c23ac2:

  • The behaviour under test already exists: src/pkg/github/webhook_cache.go:512-521 clears the shared ledger row (both configured and owner/repo spellings) when res.Item.Closed(), so this PR is genuinely test-only and the body's "fixed by #15309" claim matches the code.
  • The new test covers a path TestWebhookClosedIssueClearsBlocker (issue_blocker_test.go:136) does not: that table seeds via l.Observe(...), whereas this one seeds through a live issue_comment delivery (HandleWebhookEvent("issue_comment", …)) and then checks Get is gone and Capabilities().BlockedItems == 1 for the surviving issue 22.
  • Every helper it uses exists in the package at this head: swapSharedLedger (issue_blocker_test.go:20), setupWebhookCacheTest (webhook_cache_test.go:23), jsonString, workflowsReport, and blocker.Ledger.{Observe,Get,Blocking,Capabilities} (src/pkg/blocker/ledger.go:128,232,241,305).

Effective diff against v5 is the same 29-line test as #15312's head; the extra commits are v5 merges. Refs #15273 with the stated reason (close as fixed by #15309) is the right link. Could not run go test in this pod (blocked for agents).

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#156461f22fca` sha256:8705282abbbd5fcdfb2d937c98c41a14eab5c1a9dd3df95d8d541ef52dbb5ba6 — download from the dashboard or `hivectl review evidence #15646`.

@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

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 copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant