Repository navigation
🐛 fix(blocked): keep a relay's marker-less blocked label instead of lifting it - #15022
Conversation
…ifting it A contributor relay applies `blocked` on a blocked verdict with the hub-minted task token, so GitHub records the hive's own App bot as the labeled actor, and it writes no blocked-on marker by design (lifting is a person's, hivecommons#7924, hivecommons#12376). liftBlockedMarkerless, added for review-backlog twins (hivecommons#13364), lifted any marker-less block the hive bot applied, so it took every relay verdict for a defect: the issue went back to the ready band, the next agent hit the same blocker and the relay re-applied the label, daily. The marker-less lift now applies only to review-backlog items (body carries reviewBacklogFooter), the one hive path it was written for, and never while GitHub reports an open "blocked by" link (hivecommons#9839). Both facts come from payloads the enumeration, webhook re-read and blocked sweep already fetch: the row records them, and the sweep's listing now keeps issue_dependencies_summary. Neither costs a timeline read: both are ruled out before it. The pr= marker and recheck-after paths are unchanged. 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>
|
[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 |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
@Danathar this PR is back in your court ( Failing checks:
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. Your relay session received this as a |
There was a problem hiding this comment.
Read src/pkg/github/issue_blocked.go, client.go, webhook_item_patch.go, webhook_item_refresh.go at 3f4d44c against v6, plus the fold path in review_backlog_routing.go. The change is correct and the narrowing is justified by the tree; the red CI on this head is infrastructure, not the diff.
What I verified
- The new gate at
issue_blocked.go:561-563(!t.reviewBacklog || t.openBlockedBy > 0 → return false) runs beforeblockedLabelActor, so a relay block costs no timeline call and can no longer be lifted by the actor check — which indeed cannot distinguish the relay (same App bot via the task token) from the hive. - Both inputs come from already-fetched data:
fetchIssuespassesblockedCounts[...](client.go:1871, fromlistOpenIssuesForEnumerationat:1786); the webhook re-read passesblockedByfromgetIssueWithBlockedCount(webhook_item_refresh.go:122,:141); andlistOpenBlockedIssues(issue_blocked.go:779-815) decodesissue_dependencies_summaryvia the existingissueWithDependenciesembed (issue_dependencies.go:54-56), whoseBlockedByis documented as the OPEN-blocker count (:43-44).reviewBacklogFooteris appended by every backlog body writer (review_backlog_routing.go:526,541,568,578,review_backlog_split.go:142,152). go build ./pkg/github/passes on this head.- CI:
test (dashboard 1/4)failed withFAIL github.com/hivecommons/hive/pkg/dashboard [setup failed]caused byproxy.golang.org … cel-go@v0.31.0 … stream error: INTERNAL_ERROR(job 122987288304);coveragethen refused because a required shard did not complete. Neither touches this diff — a re-run should clear it.
Info — residual #13364 leftovers whose twin body is not a backlog filing stay stuck (issue_blocked.go:561)
The fold path already drops blocked from the labels it propagates (reusedTwinLabels, review_backlog_routing.go:323-332), so no new marker-less backlog blocks arise. Of the old ones, the twin that kept the label "loses its body" (:142-145 comment) — so a twin originally filed by a non-backlog lane carries no reviewBacklogFooter and will now never be lifted by the sweep either. That is the trade the PR body states ("every other marker-less block stays for a person"); I agree it is the right side to err on, just naming the residual so nobody expects the sweep to clean those.
Body vs diff: consistent.
— hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88
|
hive/check-report (head 🐝 Hive Agent: — hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
e75ddd0
into
hivecommons:v6
Summary
The blocked sweep lifts a contributor relay's
blockedlabel minutes after the relay applies it, every day. The issue goes back to the ready band, the next agent finds the same blocker, posts the same comment, and the relay appliesblockedagain.Evidence from projectbluefin/testsuite (every label event by
hivecommons-hive[bot]):7f89f9d, so it still happens on currentv6.Cause
blockedverdict the relay runsgh issue edit --add-label blockedwith the hub-minted task token (markIssueBlocked→markIssueLabel,bin/contributor-relay.js:8084-8134). GitHub therefore records the hive's own App bot as the label's actor. The relay writes no marker on purpose: lifting it is a person's job (🐛 bug(contribute): a no_work_needed that names an external blocker is re-offered on the 4h backoff and the finding is thrown away — let the verdict say 'blocked' and hold for the full cooldown / apply the existing 'blocked' label (utah#100) #7924; 🐛 [v6] your-turn: an issue labelledblockedon a person never reaches the inbox and gets no reply menu #12376 parks it,/hive approvelifts it).liftBlockedMarkerless(🐛 review backlog: folding into an open twin no longer applies a marker-less blocked label #13385, for the review-backlog twin fold in Review backlog (style): No JS regression test for renderAdvisorSettings/saveAdvisorFleet #13364) lifts anyblockedthat has no marker, no deadline and no ops-tracking when the latestlabeledactor is the hive. Its premise, "nothing the hive writes appliesblockedwithout a marker", is false for relay blocks. The reconcile comment even says a relay's marker-less label should be left alone, but the actor check cannot tell the relay from the hive.Change
liftBlockedMarkerlessnow lifts only a review-backlog item (its body carries thefiled by Hive review backlogfooter,reviewBacklogFooter) that GitHub reports no open native "blocked by" dependency on (✨ issues: when an agent splits an issue, record the order as GitHub "blocked by" links and keep blocked children out of the kick list #9839). That is the Review backlog (style): No JS regression test for renderAdvisorSettings/saveAdvisorFleet #13364 case. Since 🐛 review backlog: folding into an open twin no longer applies a marker-less blocked label #13385 the backlog writes thepr=marker with everyblocked, so only old twins remain. Every other marker-less block stays for a person.issue_dependencies_summarythat the enumeration (blockedCounts) and the webhook re-read (getIssueWithBlockedCount) already decode.listOpenBlockedIssuesnow decodes the same summary from the same request instead of dropping it through go-github.RepoWorkIssuegainsReviewBacklogandOpenBlockedBy, filled by one helper,setBlockedRowFacts, on all three paths: the enumeration, the webhook patch and the sweep.pr=marker path and the recheck-after deadline path.labels-and-control-signals.md(theblockedrows, lines 77 and 115).scale-envelope.md:37gets itsclient.gocitation updated, because the new lines shifted it.Testing
From
src/,TZ=UTC,-count=1:go test ./pkg/github/ ./pkg/dashboard/passes.go build ./...,go vet ./pkg/github/andgofmtare clean.check-changelog-fragment.sh v6,check-docs-links.pyandcheck-docs-citations.pypass.TestSweepBlockedIssuesKeepsRelayMarkerlessBlock(new)issue_dependencies_summary, is kept.TestReconcileBlockedIssues(extended)help wantedstripped, gets no timeline read and no note. #90, a review-backlog item with an open native blocker, is kept.TestFetchWebhookItemSnapshotBlockedRowFacts(new),TestEnumerateActionableRecordsBlockedRecheckAfter(extended)Existing expectations changed in
TestReconcileBlockedIssues, because their premise is the one this fixes:Mutation checks
Eight mutants, each restored from a backup copy, and every one fails a test:
0;0;Not verified, or still open
ReconcileHiveHardSuppress(🐛 hive parks its own work on hard-suppress labels (hold/blocked/needs-human) and never lifts them #12002) can still lift a relay'sblockedwhen an App or AI PR that references the issue merges after the label. That is a rarer path and is not touched here.review_backlog. They fail safe: the block is kept.The other half, having the hive record the blocker that a relay's verdict names so it can lift
blockeditself when that blocker closes, is a separate change: #15023.Contributor checklist
changelog.d/fixed-blocked-keep-relay-blocks.md.v6.src/docs/labels-and-control-signals.md,src/docs/scale-envelope.md).🤖 Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1