Skip to content

πŸ› blocked sweep: remember an issue-form blocked-on marker as an issue - #18947

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/blocked-issue-form-marker
Nov 18, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/blocked-issue-form-marker

Conversation

@Danathar

Copy link
Copy Markdown
Contributor

Summary

An issue's blocked label 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

  1. The blocked sweep reads the newest blocked-on marker from the issue's comments (blockedSweepComments), then calls noteBlockedOnSeen(repo, number, scan.prRepo, scan.pr). That stores owner/repo#N and drops scan.issue.
  2. The enumeration rebuilds the row's reason from that record (blockedFilterReasonFor): blocked on owner/repo#N, the PR form, without the issue word.
  3. The sweep reads comments for at most 40 issues per pass (blockedSweepCommentLookups). On a pass where this issue doesn't get a comment read, reconcileBlockedTargets takes the blocker from the reason. parseBlockedOnReason reports onIssue=false, and pullRequestSettledDetails calls GET /repos/owner/repo/pulls/N. For an issue number that's a 404, logged as blocked sweep: tracked PR lookup failed.

The several-blockers path (reconcileBlockedOnAll) recorded its first open blocker the same way.

The fix

noteBlockedOnSeenRef stores the blocker's reason form (blockedOnRef.reasonRef()), which keeps issue for 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 as blocked on issue o/r#100, which reads back as an issue, and no /pulls/ call is made. The PR form stays blocked on o/r#3.
  • Locally only gofmt -l was run; AGENTS.md bans local go test/go build/go vet. CI is the test run.

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…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
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 18, 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 clubanderson 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 Nov 18, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

@Danathar 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 branch is behind the base and Hive cannot update it; enable "allow edits by maintainers" or rebase

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.

@Danathar Danathar changed the title fix(github): remember an issue-form blocked-on comment marker as an issue πŸ› blocked sweep: remember an issue-form blocked-on marker as an issue Nov 18, 2026
@clubanderson clubanderson added the author/human A person pushed this PR themselves label Nov 18, 2026
@hivecommons-hive

hivecommons-hive Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

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

@hivecommons-hive
hivecommons-hive Bot merged commit 8f7bf56 into hivecommons:v6 Nov 18, 2026
87 of 88 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/human A person pushed this PR themselves 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.

2 participants