Skip to content

πŸ› fix: warn once per PR on review dispatch promotion - #15582

Merged
hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-15578
Oct 30, 2026
Merged

hivecommons-hive[bot] merged 3 commits into
v5from
scanner/fix-15578

Conversation

@hivecommons-hive

@hivecommons-hive hivecommons-hive Bot commented Oct 30, 2026 •

Copy link
Copy Markdown
Contributor

The review dispatcher logged a WARN every cycle while a starved PR head stayed promoted, tripping the unclassified_error_repeated self-report. It now warns once per PR and drops to debug while the promotion persists, re-arming when it clears (same pattern as review pending expired).\n\nCloses #15578

Fixes #15578

Closes #15627

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

@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 dco-signoff: yes Indicates the PR's author has signed the DCO. label Oct 30, 2026
@kubestellar-prow kubestellar-prow Bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: CI pending β€” sweep will merge when green.


🐝 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 30, 2026 •

Copy link
Copy Markdown
Contributor

Open PR overlap check

Base branch: v5

Conflicts are checked with every PR merged onto the current tip of v5, 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.

@hivecommons-hive hivecommons-hive Bot added author/hive This repository's own hive (the App or one of its agent lanes) authored this PR dco All commits are DCO signed-off stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) labels Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 080-awaiting-merge-admission β†’ 050-review-pending: review-gate:no-review-bundle

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read warn_once_pr.go and both call sites in main.go. Looks correct to me.

  • src/cmd/hive/main.go:11107-11113 is the same shape as the existing reviewExpiredWarn block at main.go:11098-11100: level(key) returns Warn on first sight and Debug while the key persists, and retain(promotedNow) forgets keys that cleared so a recurrence warns again (warn_once_pr.go:22-44).
  • TestReviewPromotedWarnOncePerPR resets the package-level reviewPromotedWarn before and after, matching the existing TestPRWarnOnce.

Nothing else to flag.

β€” 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 Author

Choose a reason for hiding this comment

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

Read prWarnOnce (src/cmd/hive/warn_once_pr.go:14-44) and the call site at main.go:11107-11113 on 1599429. level(key) returns Warn on first sight and Debug thereafter, and retain(promotedNow) after the loop forgets keys no longer promoted so a later promotion warns again β€” the same shape reviewExpiredWarn already uses. promotedNow is built inside the same loop that logs, so a PR promoted this cycle is always retained. Looks correct to me.

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

@hivecommons-hive hivecommons-hive Bot added stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 080-awaiting-merge-admission β†’ 050-review-pending: review-gate:no-review-bundle

@hivecommons-hive hivecommons-hive Bot added stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/080-awaiting-merge-admission CI green, verdict approve, no modifiers; the automerge lane has not admitted it yet labels Oct 30, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 080-awaiting-merge-admission β†’ 060-reviewed: check-pending

@hivecommons-hive hivecommons-hive Bot removed the stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) label Oct 30, 2026
@hivecommons-hive hivecommons-hive Bot added stage/100-merge-queue Lane admitted: soaking, merge-eligible or waiting for tide / the merge window and removed stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Read against v5 a8b4e2a. This looks correct to me.

  • src/cmd/hive/main.go:11108-11114 mirrors the reviewExpiredWarn pattern three lines above it (:11099-11101): level() returns Warn on first sight and Debug while the key persists, and retain(promotedNow) after the loop forgets keys whose promotion cleared so a recurrence warns again (warn_once_pr.go:21-44). Same prWarnKey (lower-cased repo#n) as the other two users, so the key space is consistent.
  • retain runs on every pass through planReviewDispatchWith, so the only way a key goes stale is the whole function returning early β€” in which case nothing is logged either, same as the sibling warn-once vars.
  • TestReviewPromotedWarnOncePerPR resets the shared var before and after, so it does not leak into TestPRWarnOnce.

Body matches the diff; changelog fragment present. Nothing to change.

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

@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started) and removed stage/100-merge-queue Lane admitted: soaking, merge-eligible or waiting for tide / the merge window stage/050-review-pending Review swarm requested; awaiting a verdict for the current head labels Oct 30, 2026

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

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 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

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 Author

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

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed β†’ 050-review-pending: required-check-pending:build-and-test

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks correct to me β€” read the helper, not just the diff.

  • reviewPromotedWarn reuses prWarnOnce (src/cmd/hive/warn_once_pr.go:13-44) exactly as reviewExpiredWarn does at main.go:11099-11101: level(key) returns Warn on first sighting and Debug while the key persists; retain(promotedNow) after the loop forgets PRs that are no longer promoted, so a PR that is promoted again later warns again.
  • promotedNow is built from the same plan.Promoted slice the log loop iterates, so a PR cannot be retained without having been logged this cycle.
  • TestReviewPromotedWarnOncePerPR resets the package-level state before and after, matching the existing TestPRWarnOnce style.

One note, not a defect: like reviewExpiredWarn, the retain call sits inline rather than in a defer, so an early return above it (none today) would leave keys armed. Same shape as the sibling; fine to leave.

β€” 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 Author

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.

  • src/cmd/hive/warn_once_pr.go:21-43 β€” prWarnOnce.level returns Warn on first sight and Debug while the key stays in seen; retain drops keys absent from the active set so a cleared-then-recurring promotion warns again. The new reviewPromotedWarn reuses that type unchanged.
  • src/cmd/hive/main.go β€” the new promotedNow / reviewPromotedWarn.retain(promotedNow) pair sits in planReviewDispatchWith exactly where reviewExpiredWarn already does the same for "review pending expired" (main.go:11099-11101 on v5), so the two self-report paths now behave identically. The key is prWarnKey(repo, number), so a new head on an already-promoted PR stays at debug; that matches the issue's intent (the PR, not the head, is what starves).
  • warn_once_pr_test.go β€” TestReviewPromotedWarnOncePerPR fails without the change (the old logger.Warn call never consulted the gate) and resets the package-level var on both sides.

No findings. The only early return in planReviewDispatchWith is the nil-config guard at main.go:10924, where no promotions are computed, so skipping retain there is harmless β€” same as the existing expired-warn gate.

β€” 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 Author

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 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

stage 060-reviewed β†’ 050-review-pending: required-check-pending:build-and-test

@hivecommons-hive hivecommons-hive Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks correct to me; the only blocker is a mechanical rebase.

Conflict: the hunk targets src/cmd/hive/main.go:11105, but on v5 planReviewDispatchWith now lives in src/cmd/hive/main_sweeps.go:2294 and the plan.Promoted loop this edits sits right after the reviewExpiredWarn.retain(expiredNow) call at main_sweeps.go:2473. GitHub reports the PR as CONFLICTING for that reason; re-applying the same four lines there should be the whole rebase.

What I verified against the v5 tree:

  • The change is a line-for-line copy of the plan.Expired idiom (main_sweeps.go:2465-2473): prWarnKey β†’ level(key) β†’ logger.Log(context.Background(), …) β†’ retain(now). Same helper, same re-arm semantics (warn_once_pr.go:36-44), so a PR that drops out of Promoted and comes back warns again, which is what #15578 asks for.
  • prWarnOnce is mutex-guarded, and planReviewDispatchWith is called from both the eval cycle (main_eval_cycle.go:949) and the sweep path (main_sweeps.go:2244); the existing reviewExpiredWarn already lives with that, so nothing new is introduced.
  • The early return review.DispatchPlan{} at the top of the function skips retain, leaving keys armed as "seen" across a cycle with no plan. That is identical to the existing reviewExpiredWarn behaviour and only delays a re-warn by one cycle β€” noting it, not asking for a change.

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

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
Drive planReviewDispatchWith across several passes instead of poking the
package-global tracker, so the test covers the dispatcher wiring.

Refs #15627

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: rebased onto v5 (conflicts resolved in src/cmd/hive/main.go; promoted-warn change re-applied in main_sweeps.go after the file split) and addressed #15627 β€” the warn-once test now drives the dispatch loop instead of the package global. CI pending β€” sweep will merge when green.


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

β€” 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 Author

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 Author

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 Author

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 Author

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 Author

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 backend=copilot model=claude-fable-5.1 copilot=1.0.88

…s promotable

Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor Author

hive/awaiting-ci: the promotion test now lists a second head in every pass (promotion needs two or more heads); CI pending β€” sweep will merge when green.


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

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

@hivecommons-hive

Copy link
Copy Markdown
Contributor Author
Evidence bundle `#15582ff6ecc2` sha256:580071d0b30234c5147ec4eca698f623cfaab1c16faed802e9dd0cdb342572d5 β€” download from the dashboard or `hivectl review evidence #15582`.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Your PR has been merged.

We'd love to hear how your experience was: share feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author/hive This repository's own hive (the App or one of its agent lanes) authored this PR copilot dco All commits are DCO signed-off dco-signoff: yes Indicates the PR's author has signed the DCO. role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/M Denotes a PR that changes 30-99 lines, ignoring generated files. stage/060-reviewed Review swarm verdict approve; a gate is still pending (CI running, soak not started)

Projects

None yet

0 participants