Repository navigation
Description
Target: v6.
Target branch:
v6only. Open the PR with--base v6.hive-open-prdefaults to the repo's default branch (v5) when--baseis omitted.
Citations:path:lineagainstv6@dd406b3e9, paths relative tosrc/.
The contributor card counts merged and closed PRs as "awaiting rework".
What happened
Seen on a hosted hive on 2026-10-27. A contributor's card said "idle · 4 PRs awaiting rework (not yet dispatched)". The four PRs were chairlift#630, dakota-iso#269, dakota-iso#274 and dakota-iso#287. The first three had been merged on 2026-10-25 while still labelled stage/072-returned-to-contributor. Only #287 was still open.
That line tells the operator that rework is not reaching the contributor's agent. Phantom entries make it a false alarm.
Cause
fleetReworkFor (pkg/dashboard/contribute_fleet_rework.go:143) builds PendingReworkPRs from three sources:
- the fix queue;
store.ByAuthor(user, stagelabels.ReturnedToContributor)(:228);store.ByAuthor(user, stagelabels.AdoptedByHive)(:248).
Nothing checks whether the PR is still open. Store.ByAuthor (pkg/stagelabels/store.go:1382) returns every record with that author and stage.
Stage records are removed in only two ways:
store.Forget(key)runs when the PR stage sweep sees a terminal verdict, meaning the PR was closed or merged (pkg/github/automerge/automerge_stage_labels.go:888-889;Terminalis defined atpkg/stageengine/decision.go:21).store.Prune(stageStorePruneAge)drops records not observed for 14 days (automerge_stage_labels.go:189,:1159;Store.Pruneis atstore.go:1303, keyed onRecord.LastSeenatstore.go:196).
The three merged PRs still had records two days after merging, and their 072 labels were never cleared. So the sweep never saw them close, and the terminal path did not run for them. Their records will stay until the 14-day prune.
Fix
- Required. Exclude merged and closed PRs from pending rework in
fleetReworkFor. Use open-state data the dashboard already holds, such as the status snapshot's open-PR lists or the stage record'sLastSeenagainst the last completed sweep. Avoid a new GitHub call per card render. - Preferred, if the layer is clear. Make the PR stage sweep retire records for PRs that have left its open list, not only those it sees reach a terminal verdict. That way every other
ByAuthorand stage consumer stops seeing stale 072 and 074 records too, and the stale stage label can be cleared at the same point. A PR missing from one partial or failed listing must not be forgotten, so this applies only after a complete listing.
The PR must say which layer owns the cleanup and why.
Acceptance criteria
- A merged or closed PR never appears in
pending_reworkorpending_rework_prs. - An open PR at 072 or 074 still appears.
- The in-flight exclusion (
inFlightKeys) behaves as it does now. - If record cleanup is added, a merge or close removes the PR from
ByAuthorresults. A PR missing from an incomplete listing keeps its record.
Test plan
fleetReworkForwith a stage store holding three of one contributor's PRs: an open one at 072, a merged one at 072, and a closed one at 074. Expect only the open one inpending_rework_prs, withpending_rework= 1.- If cleanup is added, a sweep-level test where a PR present on one complete listing is absent on the next. Its record must be gone, and it must be kept after a failed or partial listing.
- Run
go test ./pkg/dashboard/... ./pkg/stagelabels/... ./pkg/github/automerge/....
Out of scope
- Dispatch logic.
- Fix-queue scheduling.
Activity
hivecommons-hive commentedon Oct 27, 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.hivecommons-hive commentedon Oct 27, 2026
🔓 Claim by @Karibhou released (lease revoked).
hivecommons-hive commentedon Oct 27, 2026
PR #14715 covers this issue: #14715
GitHub only shows its linked-PR icon for closing-keyword PRs that target the repository default branch; this PR targets
v6, so Hive cannot make GitHub display that icon for this issue.🐛 contribute: drop merged and closed PRs from the rework card
🐛 contribute: drop merged and closed PRs from the rework card (#14715)
hivecommons-hive commentedon Oct 28, 2026
Verified resolved by #14715 (merged into v6): PR excludes merged and closed PRs from the rework card count by checking against the snapshot's open-PR index when the repo listing is complete. Closing.
🐝 Hive Agent:
scanner| Instance:hosted-available-oke-11-placeholder-r05x| SHA:unknown— hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88
github-actions commentedon Oct 28, 2026
@Danathar 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.🐛 contribute: a fleet card never lists a closed or merged PR as await…
🐛 fix(contribute): keep a queued fix while its PR still waits at 072,…