Repository navigation
[stage] issue sweep never writes stage/040-covered-by-pr: second annotateIssueWithClaim pass resets CoveredLabelSynthesized #14397
Description
Observation (hivecommons/hive issue list, 2026-10-26 ~18:30Z)
| Issue | Stage label | Covering PR | PR body ref | GitHub closing link (closingIssuesReferences) |
Verdict |
|---|---|---|---|---|---|
| #14372 | stage/010-actionable |
#14375 (open, base v5, human) |
Fixes #14372 |
✅ linked | hive missed 040 |
| #14371 | stage/010-actionable |
#14374 (open, base v5, human) |
Fixes #14371 |
✅ linked | hive missed 040 |
| #14360 | stage/040-covered-by-pr |
#14363 (open, base v5, human) |
Refs #14360 |
❌ not linked | by design: hive's Reference tier counts a Refs PR as cover (#8876/#12144) and deliberately does not add a closing link for it (would arm auto-close the author declined) |
| #14364 | stage/040-covered-by-pr |
#14365 (open, base v5, human) |
Fixes #14364 |
✅ linked | consistent (040 landed 12 min after the human-claim release) |
| #14346 | stage/040-covered-by-pr |
#14347 (open, base v5, human) |
Fixes #14346 |
✅ linked | consistent (040 landed 4 min after release) |
Repo default branch is v5 (gh repo view --json defaultBranchRef), so base ≠ default is not a factor here. Hive-authored fix PRs already get Fixes #N retrofitted / a closing link made by EnsureIssueStagePRLink / EnsureClosingIssueLink (#11888, #12144); the non-default-base case already posts the explanatory stage comment.
Root cause (A: Fixes PR open, issue stuck at 010)
Timeline for #14372: human claim (hive/claimed-by-human, 020) → PR #14375 opened 17:35Z with Fixes #14372 → claim released 17:37Z → stage/010-actionable. The next enumeration pass (pod logs 18:18Z) did see the cover:
"msg":"suppressing issue: open external PR covers it","issue":14372,"claimed_by_pr":14375,"pr_author":"thatguywob"
but issue stage labels applied items=29 writes=4 wrote nothing for it. The sweep's input labels already "had" stage/040-covered-by-pr:
SyncIssuePRClaimLabelscallsannotateIssueWithClaim→ forge lacks 040 → adds it in-memory and marksClaimContext.CoveredLabelSynthesized=true(the 🐛 issue stage sweep never writes stage/040-covered-by-pr: synthetic in-memory label hides the gap #13316/🐛 fix(stage): write stage/040 when the forge lacks it despite the in-memory covered label #13318 fix).FilterClaimedIssuescallsannotateIssueWithClaimagain on the same payload → nowissueHasLabel(labels, 040)is true →synthesized=false, and it replacesClaimContextwith a fresh one.IssueStageInputs→forgeIssueLabelsseesCoveredLabelSynthesized=false, keeps the 040 label →stagelabels.Plansays "stage already right" → no write.
So the sweep path to 040 has been dead since #13318 shipped; 040 only lands via the out-of-cycle facts (clearInProgressForPR for relay-opened hive PRs, the contribute hub's verdict settle for hub-claimed humans — which is how #14346/#14364/#14360 got theirs). A human PR opened outside the hub, or any issue whose fact write was lost (the 17:37Z release write for #14372 logged effect outcome uncertain… context deadline exceeded; the pod has restarted twice today), never converges. GitHub 502/504s + the sweep's budget (issueStageSyncTimeout) made the single pass since the restart write only 4 of 29 items, which compounds it but is not the cause.
Root cause (B: 040 label, no GitHub link)
#14360: the covering PR uses Refs #14360. Hive's claim scan grades that as a Reference-tier cover → 040 (so dispatch does not re-offer the issue while the PR is open), and SyncIssuePRClaimLabels intentionally does not create a closing link for Reference claims (a closing link would make GitHub close the issue on merge, which the author declined; #12144 even retracts hive-made ones). GitHub's linked-PR icon only renders for closing keywords, so label and icon legitimately disagree for Refs covers. Not a bug; documenting here so the mismatch is understood. #14364/#14346 do carry GitHub links.
Fix
annotateIssueWithClaimkeepsCoveredLabelSynthesizedacross re-annotation (synthesized = !hasLabel || prevCtx.CoveredLabelSynthesized), so the sweep plans against the forge labels and writes 040 for every cover tier (external/hive closing, branch-name, Reference) and reverts to 010 when the claim lapses (existingUncoveredpath).- Table-driven test replaying the production order (
SyncIssuePRClaimLabels→FilterClaimedIssues→IssueStageInputs→ sweep) per claim tier, plus an idempotency test for the annotation.
Activity
hivecommons-hive commentedon Oct 26, 2026
🔒 Claimed by @Karibhou (contributor on hive hosted-available-oke-11-placeholder-r05x). The claim lasts 30m0s without activity and renews while the work continues. Reply
/unclaimto release, or/claimto take it over if you outrank the holder.Karibhou commentedon Oct 26, 2026
Already covered by the open, ready-for-review PR #14398, targeting
v5withFixes #14397in its body. I checked the diff: it preservesCoveredLabelSynthesizedacross repeated annotations, adds table-driven coverage replayingSyncIssuePRClaimLabels→FilterClaimedIssues→ stage inputs/sweep (external closing, hive closing, Reference, and a real forge label), tests annotation idempotency, and includes a changelog fragment. The existing uncovered path remains in place. CI and review are still pending; this is existing implementation coverage, not a claim that the fix has merged or deployed. No duplicate PR is needed.— hive: backend=codex
hivecommons-hive commentedon Oct 26, 2026
🔓 Claim by @Karibhou released (lease revoked).
github-actions commentedon Oct 26, 2026
@clubanderson this issue was closed by @hivecommons-hive[bot] as completed.
If this was closed by a merged PR, the fix only takes effect once it ships in a tagged release and your deployment updates to it — check your running version against the fix before concluding the fix failed.
If you are still seeing the problem, comment
/reopenand it will be reopened for you — you do not need write access. Please add what you are still observing (running version, logs, steps) so it is not closed the same way again.🐛 fix(stage): write stage/040 when the claim annotation runs twice in…