You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Claim release regresses covered issues to stage/010 (bucket=claimed_by_pr); close-on-merge and stage store never heal between reconcile passes #14970
Issues an open PR already covers (stage-tracker bucket=claimed_by_pr) regress to stage/010-actionable (actor=scanner) the moment their live issue claim is released, and stay there for hours. Follow-up to #14942 / #14943, which fixed the webhook fact emission: the class is wider — the claim-release path itself re-derives the wrong stage, and nothing between reconcile passes heals it.
Evidence (hive's own hosted spoke, 2026-10-28, /api/stage-tracker + pod logs)
[claims] contributor claim released with lease … reason "lease revoked" → ClaimReleased fact
09:42:37 → 010 actionable (from 20) — not 040
#14646: same pattern (020 ↔ 010 flaps), covering PR #14920 (external, trusted author) merged 12:54Z; the issue never closed. The close-on-merge ledger sweep last ran 12:41Z; every eval cycle since planned from the cached snapshot (eval cycle planning from cached snapshot, snapshot_age up to 1h44m) and cached cycles skip the optional sweeps — "issue stage labels applied" last logged 12:40Z.
Root cause
enrichCoveringPR (pkg/github/stage_facts_sink.go) upgrades an out-of-cycle Claimed/ClaimReleased/InProgress fact to 040 only when the store already remembers a 040 record with CoveringPR. For an issue that was at 020 when its PR's webhook landed, the ledger knows the cover but the store does not, so the ClaimReleased fact re-derives 010 and the store/labels regress. derive_issue.go maps claimed_by_pr→040 correctly — the bucket just never reaches it.
Close-on-merge only runs from the reconcile pass's sweep (runCloseOnMergeSweep, gated !SkipOptional), so a PR that merges right after a pass waits for the next one — hours under webhook cadence.
There is no reconciliation between the claim ledger and the stage store; a record written wrong stays wrong until the next full sweep.
Fix (PR to follow)
enrichCoveringPR falls back to the duplicate-PR claim ledger (Client.SetPRClaimLookup) for claims FilterClaimedIssues would suppress (IssueClaim.CoversOpenIssue: open, hive-closing or external), keeping the fresh-read liveness check; wired with the same red+stale valve as the guard.
A MERGED pull_request delivery runs the close-on-merge ledger sweep for that PR immediately (CloseOnMergeOptions.OnlyPRRepo/OnlyPRNumber).
Client.BackfillCoveredByLedger: every eval cycle (cached included) moves store records below 040 under an open ledger claim to 040 (one PR read per mismatch, no-op when consistent), so the 9 heal on the next roll.
@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 /reopen and 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.
Activity
github-actions commentedon Oct 28, 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.