Skip to content

πŸ› fix(blocked): one Unblocked note per lift, and not "actionable" when un-admitted - #16828

Merged
hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/one-unblock-notice
Nov 5, 2026
Merged

hivecommons-hive[bot] merged 1 commit into
hivecommons:v6from
Danathar:fix/one-unblock-notice

Conversation

@Danathar

@Danathar Danathar commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

Executive summary

Two hive paths lift the same blocked label, and each posted its own "Unblocked" note seconds apart. Both notes said the issue was actionable (or "re-triaging") even when project.issue_filter does not admit it. projectbluefin/website#987 shows both problems:

The issue has no triage/accepted, so nothing would work it.

With this PR, whichever path runs second sees the first one's note for the same PR and posts nothing. On an un-admitted issue the note says "Unblocked β€” waiting for a maintainer to admit it" and names the label that admits it.

What

Situation Before After
Review-backlog reconciler lifts, then the blocked sweep Two notes (website#987, server#597) One: the sweep sees the lift note for the same PR and stays quiet
Blocked sweep lifts, then the review-backlog reconciler Two notes (utah-packages#868, chairlift#720) One: LiftBlock removes the label and posts nothing
The block was re-applied after an earlier lift β€” A newer blocked-on marker resets it, so the next lift is noted again
Issue not admitted by project.issue_filter "actionable now" / "re-triaging" "Unblocked β€” waiting for a maintainer to admit it: project.issue_filter admits only issues labelled triage/accepted…"
Admitted issue Unchanged Unchanged

Why

  • ReconcileReviewBacklogBlocks (review_backlog_blocks.go) lifts a review-backlog item when its PR settles. It knows merged from abandoned, and it checks the finding against the base.
  • reconcileBlockedTargets (issue_blocked.go) also lifts any blocked issue whose blocked-on PR settled. Its targets come from the enumeration snapshot or a listing taken before the other sweep removed the label.
  • postUnblockedNote deduped only an identical note, and the two notes differ in wording. LiftBlock did not dedupe at all.
  • Neither note looked at admission. The un-park reply already does (unparkIssueFilterNote).

How

  • unblockAlreadyNoted(comments, note) reads the PR the note is about (Unblocked: [source PR ]owner/repo#N). It walks the comments newest first:
    • a hive:unblocked note naming the same PR (by short repo name and number) means it was already noted;
    • a newer blocked-on marker means it was not.
    • It also matches the note when it was folded into the hive status card, which keeps the marker and the text.
    • Notes naming no PR (deadline, marker-less) are never matched.
  • Wiring:
    • postUnblockedNote uses it before posting.
    • githubIssueBacklogSink.LiftBlock still removes the label, then skips the comment when the lift is already noted.
  • Admission wording:
    • unblockAdmission(labels) asks the issue filter about the labels without blocked. It returns "" when admitted, otherwise the sentence naming the required labels.
    • The PR-settled notes take it: blockedPRSettledNote, the new blockedSupersededSettledNote, reviewBacklogLiftNote and reviewBacklogRetriageNote.
    • The review-backlog sweep reads the item's labels only for a GitHub-issue item (reviewBacklogAdmission). Other destinations have no issue filter.

Files

File Change
src/pkg/github/issue_blocked.go unblockAlreadyNoted, unblockAdmission, admission-aware settled notes
src/pkg/github/review_backlog_blocks.go LiftBlock dedupe, reviewBacklogAdmission, admission-aware notes
src/pkg/github/issue_unblock_once_test.go New tests
src/pkg/github/review_backlog_heads_test.go Call updated for the new parameter
src/docs/hive-open-issue.md, src/docs/labels-and-control-signals/reference.md, changelog.d/ One note per lift; admission wording

Tests

Test Covers
TestUnblockAlreadyNoted (8 rows) both orders, retriage note, short vs full repo name, other PR, re-blocked, deadline note
TestBlockedSweepQuietAfterReviewBacklogLift website#987 shape: label lifted, no second note; a fresh item still gets one
TestReviewBacklogLiftQuietAfterSweepNote the other order through LiftBlock
TestUnblockNotesAdmissionAware, TestBlockedSweepNoteNamesAdmission, TestReviewBacklogReconcileLiftNamesAdmission wording for un-admitted vs admitted, through both sweeps end to end
TestUnblockAdmissionIgnoresTheBlockedLabel, TestReviewBacklogAdmissionReadsTheIssue admission is asked about the issue without blocked; GitHub-issue items only
Existing TestReconcileBlockedIssues and the review-backlog tests unchanged and passing
Mutants 13/13 caught
go test ./pkg/github/..., ./pkg/writeback/ pass
check-docs-citations.py src/docs, writeback ratchet pass

Notes

πŸ€– Generated with Claude Code

https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1

…n un-admitted

projectbluefin/website#987: the review-backlog reconciler posted "Unblocked:
…hivecommons#986 merged … This item is actionable now" and, 8s later, the blocked
sweep "…hivecommons#986 is no longer open; re-triaging." The issue had no
triage/accepted.

- unblockAlreadyNoted: a hive:unblocked note naming the same PR, newer than
  the last blocked-on marker, makes the second path quiet
  (postUnblockedNote and githubIssueBacklogSink.LiftBlock).
- unblockAdmission: PR-settled notes on an issue project.issue_filter does
  not admit say "Unblocked β€” waiting for a maintainer to admit it" and name
  the admitting label.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1
Signed-off-by: Danathar <Danathar@users.noreply.github.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 5, 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 nicholasjackson 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

PR Title Relation Files
#16832 πŸ› fix(blocked): an unmarked block becomes a needs-human ask; markers in comments name the blocker same files src/docs/labels-and-control-signals/reference.md
src/pkg/github/issue_blocked.go
#16811 πŸ› fix(workflows): verify "the App cannot push workflows" before parking on it same files src/docs/hive-open-issue.md
src/docs/labels-and-control-signals/reference.md

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Read at head db62d00 against v6; pkg/github builds. The dedup and admission wiring look correct to me; one narrow gap worth a sentence from the author.

Verified

  • issue_blocked.go:800-804 and review_backlog_blocks.go:119-123: both lifters now call unblockAlreadyNoted after unblockIssue, so the label is still removed even when the note is suppressed β€” the website#987 pair (lift note, then "no longer open" 8s later) collapses to one note, and TestUnblockAlreadyNoted covers both orders plus the short-vs-full repo spelling.
  • unblockNoteRefRE (issue_blocked.go:669) matches every note shape that names a PR: blockedPRSettledNote, blockedSupersededSettledNote (which names the superseding PR, consistent with reviewBacklogLiftNote(repo, supersededBy, …) at review_backlog_blocks.go:284), and the source PR retriage form. Deadline/marker-less notes fall through to m == nil.
  • unblockAdmission (issue_blocked.go:645-667) strips blocked case-insensitively before asking filter.Admits, matching how client.go:2141 admits issues; reviewBacklogAdmission only does the extra Issues.Get for githubIssueBacklogSink, so non-GitHub sinks are unchanged.

Low β€” body-level re-block is invisible to the reset
unblockAlreadyNoted (issue_blocked.go:691-717) stops at a blocked-on marker only when it is in a comment. But the normal markers are body sections: blockedBacklogNote (issue_blocked.go:301-306) and blockedOnReviewedPRNote (review_backlog_blocks.go:69-73) write BlockedOnMarker into the issue body; only the re-target path (issue_blocked.go:530) posts it as a comment. So if an issue is lifted with a note for o/r#986, then later re-blocked on #986 via the body (PR reopened and re-targeted, or the body re-parked), the next lift strips the label but posts no note β€” the old "Unblocked: o/r#986" comment still matches and no newer marker comment resets it. The PR body's "a newer blocked-on marker resets it" is true only for the comment form. Re-blocking on an already-settled PR is rare, so I'd call this low; but if it matters, comparing the matched note's CreatedAt against the issue's UpdatedAt/body edit, or against the time blocked was last applied (blockedLabelActor already reads the timeline), would close it.

Nothing else blocking from my side.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive
hivecommons-hive Bot merged commit 91ba1dd into hivecommons:v6 Nov 5, 2026
71 of 74 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Hive status β€” updated in place; edits do not notify. Full history is in the Activity Monitor.

Evidence bundle `#16828db62d00` sha256:9fbe9da291a91c9122b06bddc04be8eb58efd9dc4895d9cbb7b93ba07c7a8d89 β€” download from the dashboard or `hivectl review evidence #16828`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant