Repository navigation
🐛 gfi: withdraw the invite once a PR covers the issue; never advertise relay-refused issues - #18834
Conversation
…e relay-refused issues The good-first-issue sweep only re-scored filtered rows, so an advertised issue a pull request later covered (claimed_by_pr) kept both labels and the welcome comment, and linked-pr / stage/040-covered-by-pr were not withdrawable anyway. Covered rows wearing the label now reach the sweep with HasLinkedPR and are withdrawn with a covered-by-a-PR note; a relay contributor's or person's claim keeps the label (Convert). Score also never consulted hub.contribute_skip_labels, so needs-triage issues were advertised with a claim link the relay refuses. Policy gains an optional RelaySkip matcher, wired to the hub setting; relay-skip is checked after the withdrawable gates and is itself not withdrawable. 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 |
Open PR overlap check✅ Resolved: no conflicting open PRs or same-file overlaps remain against |
There was a problem hiding this comment.
Style pass at c041719: no blockers. Conventions followed (named Skip constants, docs and changelog updated, tests added). One low readability nit inline on the mixed &&/|| condition in gfi_wire.go.
— hive: agent=adjudicator-4 backend=claude model=claude-sonnet-5-5 claude=2.1.326
| for _, row := range result.WorkDetailsByRepo[repo].Issues { | ||
| if row.Number <= 0 || row.Bucket != "filtered" || !gfi.HasLabel(row.Labels) { | ||
| covered := row.Bucket == "claimed_by_pr" | ||
| if row.Number <= 0 || row.Bucket != "filtered" && !covered || !gfi.HasLabel(row.Labels) { |
There was a problem hiding this comment.
Readability nit: this condition mixes || and && unparenthesised. Suggest naming the bucket test:
covered := row.Bucket == "claimed_by_pr"
if row.Number <= 0 || !(row.Bucket == "filtered" || covered) || !gfi.HasLabel(row.Labels) {|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Docs-currency, delta re-review at 0d8365a. The delta is mostly main merged in. The only gfi changes are the Previous findings:
Finding. Line 75 says the scorer runs over the actionable list, "which already excludes hard-suppressed, claimed and PR-covered items". The same file contradicts it two ways. The gate table (line 85) says a And at lines 221-222: "(blocked, held, parked, PR-covered)". Findings not on a changed line
Review findings from Delta re-review at 0d8365a (correctness).
Review limits: the delta is 4148 lines over 80 files and the GitHub API hourly cap was reached mid-review. I read only gfi_wire.go, gfi.go and good-first-issue.md; the other delta hunks (stageengine, automerge, writeback, dashboard) were not reviewed. Findings not on a changed line
Review follow-ups: 1 open of 1 (below
|
|
@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 (13 waiting): fixes are handed out before new work as soon as you have capacity. |
There was a problem hiding this comment.
Style delta re-review at 0d8365a: approve. One advisory remains: the mixed &&/|| condition at gfi_wire.go:165 (still present, low). Prior correctness/docs notes (withdrawal permanence at gfi.go; good-first-issue.md:75-76 still saying PR-covered items are excluded) are unchanged by this delta; the ClaimedBy carry looks fixed.
— hive: agent=adjudicator-4 backend=claude model=claude-sonnet-5-5 claude=2.1.326
| // wear the label, are handed to the sweep so it can withdraw the | ||
| // advertisement (hivecommons/hive#13267); the labels and the coverage | ||
| // alone decide, so the missing body is harmless. | ||
| for _, repo := range sortedRepoKeys(result.WorkDetailsByRepo) { |
There was a problem hiding this comment.
Mixed &&/|| without parentheses. Suggest:
| for _, repo := range sortedRepoKeys(result.WorkDetailsByRepo) { | |
| if row.Number <= 0 || (row.Bucket != "filtered" && !covered) || !gfi.HasLabel(row.Labels) { |
Summary
The good-first-issue sweep kept inviting newcomers to issues the hive's own contributor relay will not hand out:
good first issue,help wantedand the welcome comment stayed on it.hub.contribute_skip_labelslabel (needs-triageby default) got the invite, and its "claim it through the relay" link led nowhere.Now a covered issue loses both labels on the next sweep, and its welcome comment is edited to say a pull request covers it. An issue matching the relay's skip labels is never advertised. No new setting: case 2 reuses
hub.contribute_skip_labels, which already has its dashboard control and MCP parity.What happened
Seen on projectbluefin hives running v6.44 (Eastern):
needs-triageatstage/015-triage-needed. [shared-ci] E2E — composed common suite / e2e / GNOME — common failing across projectbluefin/common projectbluefin/common#1688 and [reviewer] Review backlog (correctness): installcheck tests read workflow files main deleted, so Unit Tests and Race Detection are red projectbluefin/chairlift#806 are the same.stage/040-covered-by-prat 11:41 PM on 11-15 and still wears both GFI labels. renovate: pin Renovate's npm to 11 so lockfile updates work again projectbluefin/website#1031 (covered at 3:47 PM on 11-17), utah#1234/feat: policies over 90% (90.8%) #1235/kick-agents.sh: central ledger sync fails — /tmp/hive/.beads/ directory missing #1237/test: expand hub and proxy test coverage #1238, website#1032 and common#1688 are the same.blockedis withdrawn: Bake the FDSDK version in the image andd add it to Fastfetch projectbluefin/common#1656 lost both labels on 11-13.Cause
Case 1
gfiCandidates(src/cmd/hive/gfi_wire.go) builds candidates from the actionable list, which already excludes PR-covered issues. Its second loop hands back onlyfilteredrows for withdrawal (🌱 Post-hoc soak evidence for stable promotion of 7d1b5a3ae #13267).claimed_by_prwork row (src/pkg/github/prclaims.go), so the sweep never saw it again.Withdrawable(src/pkg/gfi/opstracking.go) returned false for bothlinked-prandexcluded-label:stage/040-covered-by-pr.Releasefires only when a hive agent starts the issue, so a PR from a person or another bot never removed anything.Case 2
hub.contribute_skip_labels(HubConfig.MatchContributeSkipLabel).Scorenever consulted that set;gfiSweepOptionspassed only the hard-suppress labels.What changed
Covered issues (
gfi_wire.go,opstracking.go,gfi.go)claimed_by_prrows that still wear the label are handed to the sweep withHasLinkedPR: true.Withdrawableis now true forlinked-prand forexcluded-label:stage/040-covered-by-pr.WithdrawnCommenthas its own wording for this case: "a pull request now covers this issue, so it is no longer open to new contributors". It drops the "not open to new contributors — … Sorry for the noise" correction, because this was newcomer work that somebody took.ClaimKindcontributor/humanwithClaimedBy), the candidate getsClaimedBy.Scorethen saysclaimed, which is never withdrawn, so the label stays until the issue closes as documented.Relay-refused issues (
gfi.go,gfi_wire.go)gfi.Policygains an optionalRelaySkip func(labels []string) (string, bool). The package stays stdlib-only;gfiSweepOptionssets it tocfg.Hub.MatchContributeSkipLabel.Scorereturnsrelay-skip:<label>.blockedandtracking, and those must keep withdrawing.relay-skipis not withdrawable. Triage adds and removesneeds-triageall the time (common#1688 flapped every 15 minutes on 11-15), and a withdrawal is permanent. An already-advertised issue that gains it keeps its invite.Docs and changelog
src/docs/good-first-issue.md: the gates table (thelinked-prrow and a newrelay-skiprow), and a "Withdraw when a pull request covers the issue" section.Not in this PR
Release.Release, the reselect cooldown, the caps and the scoring signals are unchanged.assignedfirst, which is not withdrawable, as today.No existing issue covers this. The nearest are #13304 and its PR #13307 (blocked and ops-tracking withdrawal), PR #15028 (withdraw the hive's own selection when it parks), and the design in #12185.
Tests
src/pkg/gfi/covered_relayskip_test.gocovers:Scorewith aRelaySkipmatcher, includingblockedstill scoring asexcluded-label:blockedand still withdrawing;Withdrawableforlinked-pr,stage/040andrelay-skip;stage/040label alone also withdrawing;needs-triageissue never being selected, and an advertised one that gains it not being withdrawn.src/cmd/hive/gfi_wire_test.go:claimed_by_prrows become candidates withHasLinkedPR, and unlabelled ones do not;ClaimedBy, and an agent claim does not;gfiSweepOptionswiresRelaySkip, which matchesneeds-triageunder the default config.Only
gofmt -lwas run locally (AGENTS.md bans localgo test/go build/go vet); this PR's CI is the test run.🤖 Generated with Claude Code
https://claude.ai/code/session_01BQYnPGFJx81c8JXR3o1sg1