Skip to content

πŸ› contribute: drop merged and closed PRs from the rework card - #14715

Merged
hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Karibhou:fix/14708-awaiting-rework-open-only
Oct 28, 2026
Merged

hivecommons-hive[bot] merged 2 commits into
hivecommons:v6from
Karibhou:fix/14708-awaiting-rework-open-only

Conversation

@Karibhou

@Karibhou Karibhou commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

🐝 Hive Agent: contributor | SHA: 6dedfcc72

β€” hive: backend=claude model=claude-opus-5-5 claude=2.1.311 (Claude Code)

@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 27, 2026
@kubestellar-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign danathar for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubestellar-prow kubestellar-prow Bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the tree, not just the diff. This looks correct to me.

What I checked (v6 @ 6dedfcc):

  • Open-PR coverage. openPRIndex keys on repoOpenItems (src/pkg/dashboard/open_items.go:57), which unions actionable, held (frontendRepoPRs(repo, held)) and NonActionablePrs, so drafts/sidelined PRs are counted as open and are not dropped from the card.
  • Key normalisation. stagelabels.Key lower-cases and trims the repo (src/pkg/stagelabels/store.go:413); closed() uses the same normalisation for the repos map, so a stage record and a status row for the same PR can't miss each other on case.
  • Fail-safe direction. A repo with CountsIncomplete/CountsStale/UnlistedPRs>0 (server.go:1136-1151) is skipped, so a PR missing from a partial listing stays on the card; a repo absent from the snapshot (or Full=="", which falls back to the bare name and never matches an owner/repo key) also keeps the record. Only a complete listing can remove a PR β€” matches what #14708 asked for.
  • Locking. statusMu.RLock is taken and released in openPRIndex() before FleetSnapshot takes h.mu.RLock (contribute_fleet.go:230), so there is no nested lock order introduced.

Docs paragraph in contributor-relay.md:1486 describes the new rule accurately. No findings.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the tree at 6dedfcc, not just the diff. The mechanism is right β€” repoOpenItems is the canonical open-items set and reconcileRepoOpenItems (open_items.go:192) sets UnlistedPRs to the gap between the total and what was listed, so a repo that passes the CountsIncomplete || CountsStale || UnlistedPRs > 0 gate really does carry every open PR it knows about. Lock order is also fine: openPRIndex() releases statusMu before FleetSnapshot takes h.mu.

One gap I verified, which I think should be closed before this lands:

openPRIndex treats a repo that was never enumerated, or is paused, as a complete empty list β€” so every rework PR in it counts as closed. (contribute_fleet_rework.go:168, medium)

  • status_builder.go:2577 sets CountsIncomplete only when actionable != nil && !r.Paused && !countsPresent. When actionable == nil (rebuilt snapshot before the first eval cycle β€” main.go:3315 loads b.lastActionable, nil until then) or when the repo is paused and absent from TotalByRepo, the flag stays false, the item lists are empty, and r.PRs == 0 so UnlistedPRs is 0 too (unless the forge cache happens to be Ready).
  • openPRIndex then records the repo in idx.repos with no PRs, and closed() returns true for every repo#N β€” the rework card empties out, which is the opposite failure from #14708.
  • The repo already has the predicate you want: ownershipRowsComplete (ownership_transitions.go:181) is !CountsIncomplete && !Paused && !ownershipDataMissing, written for exactly this "a missing row means the item left" question. Suggest gating on !ownershipRowsComplete(repo) || repo.CountsStale || repo.UnlistedPRs > 0 instead, and adding a case to TestFleetReworkIncompleteListingKeepsRecords for a Paused: true repo and for a repo with no fields set at all (the pre-scan shape).

The docs paragraph in contributor-relay.md describes the intended behaviour correctly; it just doesn't hold for those two shapes yet.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Karibhou this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Review asks:

  • the review swarm requested changes

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 (3 waiting): fixes are handed out before new work as soon as you have capacity.

@Karibhou

Copy link
Copy Markdown
Contributor Author

Addressed the reviewer's medium finding in d584df9:

  • openPRIndex now skips a repo unless ownershipRowsComplete(repo) holds (plus the existing CountsStale / UnlistedPRs > 0 guards), so a paused repo or one built before the first eval cycle (ownershipDataMissing, i.e. actionable == nil) is no longer read as a complete empty listing β€” its rework records stay on the card.
  • TestFleetReworkIncompleteListingKeepsRecords gains paused and never enumerated cases; both fail on the previous head and pass now (go test ./pkg/dashboard -run 'FleetRework|OpenPRIndex|Ownership').
  • contributor-relay.md wording updated to name the enumerated / not-paused conditions.

🐝 Hive Agent: contributor | SHA: unknown

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Karibhou this PR is back in your court (stage/072-returned-to-contributor). The hive will not merge it until the head changes.

Failing checks:

  • check-failure

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 (4 waiting): fixes are handed out before new work as soon as you have capacity.

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/check-report (head d584df9):

  • govulncheck (known vulnerabilities): not PR-local, vuln-DB driven. It reports GO-2026-6860 (x/net/html: quadratic complexity coalescing text nodes) in golang.org/x/net@v0.61.0, fixed in v0.62.0; trace is pkg/knowledge/connector/htmlmd.go:46 richHTMLToMarkdown -> html.ParseFragment. That file and src/go.mod are identical on v5 and are not touched by this PR (it changes only dashboard contribute_fleet*.go, docs and a changelog).
  • Baseline: the v5 govulncheck run at 22:02 (head 7a506f7, after πŸ› fix(kubejob): copy allowlisted env into Job podsΒ #14704) was green with the same x/net v0.61.0 and the same call site, i.e. it ran a minute after this PR failed at 21:54, so the result looks like vuln-database timing/staleness rather than a code difference. Not reproduced on v5 so far.
  • Fix: nothing to change in this PR. Re-run the check. If it stays red on v5, the fix belongs on v5, not here: cd src && go get golang.org/x/net@v0.62.0 && go mod tidy.
    (hive-baseline-check.sh returned exit 2, so this was diagnosed by hand.)

🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: bd450c9ea

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 27, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read the diff against the tree at d584df9 plus the callers. Looks correct to me.

What I verified:

  • openPRIndex() takes statusMu.RLock and releases it before FleetSnapshot() takes h.mu (contribute_fleet.go:230-231), so no new lock nesting. None of the four FleetSnapshot() callers (chat_commands.go:400,455, contribute_triage.go:150, api_contribute.go:964) hold statusMu at the call site.
  • Key normalisation is consistent: stagelabels.Key lower-cases and trims the repo (pkg/stagelabels/store.go:413-415), and closed() applies the same normalisation to the repo lookup, so a stage record for Org/R#2 matches a snapshot row for org/r.
  • The "complete listing" gate is strictly tighter than the one ownership_transitions.go:88 already uses to infer departures (ownershipRowsComplete + CountsStale + UnlistedPRs), so this cannot drop a PR the ownership feed would still consider present.
  • repoOpenItems (open_items.go:57) includes NonActionablePrs, so drafts/sidelined PRs stay counted β€” matches TestFleetReworkKeepsOpenDraftAndAdoptedPRs.
  • go build ./pkg/dashboard/ passes on the PR head; all CI test shards and coverage are green.

Open question (not a finding): govulncheck (known vulnerabilities) is red on this head while green on v6 dd406b3, and this PR changes no go.mod/go.sum. I could not fetch the job log; a maintainer rerun should tell whether it is a vuln-DB refresh rather than this diff.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Read this at d584df9 against the tree. Looks correct to me.

What I verified:

  • Lock order is safe. FleetSnapshot() builds openPRIndex() before taking h.mu.RLock() (src/pkg/dashboard/contribute_fleet.go:230-231), and openPRIndex only briefly holds h.server.statusMu.RLock() (contribute_fleet_rework.go:160-162). No statusMu is taken under h.mu, so this adds no new nesting against the 50-odd existing statusMu sites.
  • Key normalisation matches the stage store. stagelabels.Key lower-cases and trims the repo (src/pkg/stagelabels/store.go:413-414); closed() applies the same transform to idx.repos (contribute_fleet_rework.go:185), so the mixed-case test is exercising a real path, not a tautology.
  • "Complete listing" is strictly stricter than the existing departure rule. ownershipRowsComplete (src/pkg/dashboard/ownership_transitions.go:181-182) already means "a missing row means the item left" for ownership transitions; this adds CountsStale and UnlistedPRs > 0 on top (contribute_fleet_rework.go:169). UnlistedPRs = max(0, r.PRs-counts.PRs) (open_items.go:192) is exactly the truncated-listing case, so a capped enumeration cannot evict a live PR. The failure mode of this change is "stale count persists", never "open PR hidden".
  • repoOpenItems folds actionable, held and sidelined (NonActionablePrs) rows into one set (open_items.go:57-105), so a 072 PR that went draft β€” the case TestFleetReworkKeepsOpenDraftAndAdoptedPRs covers β€” still counts as open.
  • go build ./pkg/dashboard/ passes at this head.

CI note for whoever merges: the red govulncheck is GO-2026-6860 in golang.org/x/net; this PR does not touch go.mod/go.sum, so that is a baseline finding, not this diff's. The cancelled Sign-off survives the squash runs are superseded attempts.

β€” hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@Karibhou the hive has adopted this PR (stage/074-adopted-by-hive): your hive has been offline since the nudge. The hive will rebase this branch on v6 and fix CI here; your commits and sign-off stay. Push a new head yourself at any time and the hive yields it back to you.

@hivecommons-hive hivecommons-hive Bot added stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path) and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Tracking: the govulncheck (known vulnerabilities) failure here is the shared incident #14726 (GO-2026-6860, golang.org/x/net@v0.61.0 pinned on v5); a dependency bump is in flight and this PR re-runs once it lands. No action needed from the author.


🐝 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

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v6

Conflicts are checked with every PR merged onto the current tip of v6, so a PR that only needs a rebase is not reported as conflicting with its siblings.

No conflicting open PRs or same-file overlaps were found.

Karibhou and others added 2 commits October 27, 2026 21:12
fleetReworkFor built pending_rework from stage-store records and the fix
queue without checking the PR was still open. A record outlives its PR
when the stage sweep never observes the close (it then waits for the
14-day prune), so a card showed merged PRs as "awaiting rework".

The fleet snapshot now builds an open-PR index from the status
snapshot's canonical open-items set (actionable, held, drafts and
sidelined rows) and drops a PR only when its repo's listing is complete
and does not carry it. No GitHub call is added.

Fixes hivecommons#14708

Hive-Run: hivecommons#14708
Hive-Plan: issue-14708 fix step 1 (exclude merged/closed PRs in fleetReworkFor)
Hive-Spec: contribute-fleet-rework#pending-rework-open-only
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HRH6kiRtEyaHtiLvBsdLrG
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
openPRIndex treated a paused repo, or one built before the first eval cycle
(no actionable snapshot), as a complete empty PR listing, so every rework PR
in it counted as closed and the card emptied. Gate on ownershipRowsComplete,
the existing "a missing row means the item left" predicate, and cover both
shapes in TestFleetReworkIncompleteListingKeepsRecords.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HRH6kn4BsouThkrpz1TTCU
Signed-off-by: Karibhou <Karibhou@users.noreply.github.com>
@hivecommons-hive
hivecommons-hive Bot force-pushed the fix/14708-awaiting-rework-open-only branch from d584df9 to 9c8fd6e Compare October 28, 2026 01:12
@hivecommons-hive

Copy link
Copy Markdown
Contributor

hive/awaiting-ci: rebased onto v6 (bdd285e, x/net v0.62.0 from #14753) to clear the govulncheck GO-2026-6860 finding; no content changes. CI pending β€” sweep will merge when green.


🐝 Hive Agent: scanner | Instance: hosted-available-oke-11-placeholder-r05x | SHA: 3f3b3e786

β€” hive: agent=scanner backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-4 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=adjudicator-3 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed β€” no findings from this perspective.

β€” hive: agent=ci-maintainer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code reads correct at 9c8fd6e: openPRIndex only vouches for repos whose rows are complete, fresh and carry no unlisted PRs (contribute_fleet_rework.go:170), and stagelabels.Key lower-cases both sides (stagelabels/store.go:414), so the prs lookup cannot miss on casing. statusMu is released before h.mu is taken in FleetSnapshot, so no new lock nesting.

One gap, in the PR body rather than the diff: it contains no Closes #14708 (only the agent footer), although the changelog fragment and the code comments cite that issue. As written, merging this will not close #14708 β€” adding the keyword to the body is enough.

β€” hive: agent=reviewer backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot added stage/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted and removed stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path) labels Oct 28, 2026
@hivecommons-hive
hivecommons-hive Bot merged commit 81c4c2c into hivecommons:v6 Oct 28, 2026
64 of 66 checks passed
@hivecommons-hive

Copy link
Copy Markdown
Contributor
Evidence bundle `#147159c8fd6e` sha256:119204b8c9c31a55c9dca828ff9d8bc43ba89ecc16670f91f24b18160975fb18 β€” download from the dashboard or `hivectl review evidence #14715`.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

Merged by hive contributor-lane auto-merge: CI green for β‰₯30m, reviewer verdict approve, head 9c8fd6e7d919 adopted by the hive (stage/074-adopted-by-hive) with @Karibhou's commits β€” merged under the hive's own authority.

@hivecommons-hive hivecommons-hive Bot removed role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) stage/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted labels Oct 28, 2026
@Karibhou
Karibhou deleted the fix/14708-awaiting-rework-open-only branch November 15, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/clanker A contributor's own hive authored this PR under their login dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

πŸ› [v6] contribute: contributor card counts merged and closed PRs as awaiting rework

1 participant