Repository navigation
π blocked sweep: remember an issue-form blocked-on marker as an issue - #18947
Conversation
β¦ssue The blocked sweep remembers the blocker it read from an issue's newest blocked-on comment (noteBlockedOnSeen), and the enumeration rebuilds the row's reason from it. It stored "owner/repo#N" for both marker forms, so an `issue=` marker became "blocked on owner/repo#N", the PR form. A later pass whose comment budget skipped that issue read the blocker from the reason as a PR and called GET /repos/owner/repo/pulls/N, which 404s for an issue: the lookup failed and the block could not lift on that pass. noteBlockedOnSeenRef stores the blocker's reason form, keeping "issue " for the issue form; the single-comment and several-blockers paths use 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
|
[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 |
|
@Danathar 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 (2 waiting): fixes are handed out before new work as soon as you have capacity. |
|
Hive status β updated in place; edits do not notify. Full history is in the Activity Monitor. stage 080-awaiting-merge-admission β 072-returned-to-contributor: fork-not-editable Evidence bundle `#18947d12888e` sha256:de5f70aa3c6bbb1208f288fd6c01b2f1a4630a5968ff8190f36a16337b15dc73 β download from the dashboard or `hivectl review evidence #18947`. |
Summary
An issue's
blockedlabel is meant to lift once the issue it waits on closes. A blocked-on marker in the issue form (<!-- hive:blocked-on issue=owner/repo#N -->) that the sweep read from a comment was remembered in the PR form. A later pass then looked the blocker up as a pull request. That GET 404s, so the lookup fails and the block can't lift on that pass.This is the existing gap #18840's report noted and left for its own change.
What happens
blockedSweepComments), then callsnoteBlockedOnSeen(repo, number, scan.prRepo, scan.pr). That storesowner/repo#Nand dropsscan.issue.blockedFilterReasonFor):blocked on owner/repo#N, the PR form, without theissueword.blockedSweepCommentLookups). On a pass where this issue doesn't get a comment read,reconcileBlockedTargetstakes the blocker from the reason.parseBlockedOnReasonreportsonIssue=false, andpullRequestSettledDetailscallsGET /repos/owner/repo/pulls/N. For an issue number that's a 404, logged asblocked sweep: tracked PR lookup failed.The several-blockers path (
reconcileBlockedOnAll) recorded its first open blocker the same way.The fix
noteBlockedOnSeenRefstores the blocker's reason form (blockedOnRef.reasonRef()), which keepsissuefor the issue form. Both issue-sweep call sites use it.noteBlockedOnSeen(the PR form, used by the blocked-PR sweep) is unchanged.The dashboard caption reads the same reason (
BlockedOnTarget/BlockedOnIssueTarget), so it now names an issue blocker as an issue too.Tests
TestBlockedOnSeenKeepsIssueForm: a comment's issue-form marker is remembered asblocked on issue o/r#100, which reads back as an issue, and no/pulls/call is made. The PR form staysblocked on o/r#3.gofmt -lwas run; AGENTS.md bans localgo test/go build/go vet. CI is the test run.π€ Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1