Skip to content

✨ review backlog: min_severity floor, per-PR lifetime cap, collapse same-family findings - #17072

Merged
clubanderson merged 3 commits into
v5from
spam-review-backlog
Nov 7, 2026
Merged

clubanderson merged 3 commits into
v5from
spam-review-backlog

Conversation

@clubanderson

Copy link
Copy Markdown
Member

Fixes #17065

Why

Read-only audit (2026-11-07): [reviewer] Review backlog issues run at ~160/week ≈ 40% of all issues in this repo (0.28 per PR), virtually all auto-closed within ~1h by a hive fix PR. Examples: #17027 and #17028 (two P3 docs-currency issues from one PR, #17025), #16944, #16961, #16857.

What

  1. review.backlog.min_severity (default P2). Findings below it are never filed. They are appended to one upserted <!-- hive:review-followups-comment v1 --> comment on the PR via EditIssueMarkerComment, so nothing is lost: ticked task lines stay ticked, re-reported nits are not listed twice, new nits are appended. Docs-currency findings are P3 → follow-ups. min_severity: P3 restores filing every finding.
  2. Per-PR lifetime cap. review.backlog.max_per_pr (default 3) replaces the per-UTC-day cap; the count is persisted in the review-backlog ledger (pr_item_count in /data/review-backlog-issues.json, the file that already holds claims/fingerprints). max_per_pr_per_day is kept as a retired alias for the size (dashboard still references it; untouched). Still-present notes no longer spend the cap (they are already bounded once per head).
  3. Same-family collapse. New findings from one pass sharing perspective + scope become one item titled [reviewer] Review backlog (<perspective>): <repo>#<pr> — N follow-ups with a checklist body; every fingerprint maps to that one item so cross-PR dedupe keeps working. A single new finding keeps the per-finding title.
    • Note on the title: createIssue runs every title through issueshape.AgentIssueTitle, which prepends [reviewer], so a literal [review-backlog] prefix would double-tag. Kept the Review backlog (<perspective>): lead that title canonicalisation / fold matching depend on.
  4. Docs: operator-reference/README.md, review-swarm.md (config block, table, Backlog routing bullets), work-sources.md; changelog fragment.

Tests

Table-driven, no time.Sleep: ReviewFindingBelowMinSeverity, groupReviewBacklogPending, renderReviewFollowUpsComment (fresh / merge keeps ticked / dedupe / truncation), end-to-end hold → one comment → edit-in-place on second head across min_severity P2/P3/P1, TestReviewBacklogPRCap, config EffectiveMaxPerPR/EffectiveMinSeverity/Validate. Existing routing tests pin MinSeverity: "P3" to keep exercising the file-everything path.

Expected reduction

~28/week docs-currency (all P3) → 0 issues; the remaining P3 nits move to the follow-ups comment; the lifetime cap + collapse bound the P2 remainder per PR. Estimate 160 → ~30–50 issues/week (−70–80%).

…e-family findings

Findings below review.backlog.min_severity (default P2) are no longer
filed as backlog issues; they are appended to one upserted
hive:review-followups comment on the PR. The issue cap is now
review.backlog.max_per_pr (default 3) over the PR's lifetime, persisted
in the review-backlog ledger, instead of per UTC day
(max_per_pr_per_day is read as a retired alias). New findings from one
pass that share a perspective and scope are filed as a single
checklist item.

Operators who want every finding filed as before set min_severity: P3.

Fixes #17065

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@kubestellar-prow kubestellar-prow Bot added the dco-signoff: yes Indicates the PR's author has signed the DCO. label Nov 7, 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 hanthor 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/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 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.

PR Title Relation Files
#17073 🌱 contributor-nudge once per PR+reason; fold origin notes into status; marker ratchet same files src/docs/operator-reference/README.md
src/pkg/dashboard/static/index.html
#17040 ✨ agents: disable CLI auto-memory by default and add cli_memory.clear_on_kick same files src/docs/operator-reference/README.md
#17086 ✨ agents: drain CLI memory into draft knowledge entries before clearing same files src/docs/operator-reference/README.md

@hivecommons-hive

hivecommons-hive Bot commented Nov 7, 2026 •

Copy link
Copy Markdown
Contributor

Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor.

clubanderson this PR is held at stage/071-needs-author and the hive will not merge it yet.

Failing checks:

  • test (dashboard 4/4)
  • test (dashboard shuffle 3/3)

Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path.

Another agent tried to open a PR from scanner/fix-17065, but this PR already closes #17065. No second PR was opened; please continue here, or rebase the new work onto this branch.

…nt notes

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
TestSettingsDialogReferencesEveryHiveYAMLLeaf requires every hive.yaml
leaf to have a Settings control. Add a min_severity select and a
lifetime max_per_pr input next to the retired per-day cap, accept both
on PUT /api/config/review, and cover them in the 11088 settings test.

Signed-off-by: Andrew Anderson <andy@clubanderson.com>
@clubanderson
clubanderson merged commit 03d1ac1 into v5 Nov 7, 2026
84 of 85 checks passed
@kubestellar-prow
kubestellar-prow Bot deleted the spam-review-backlog branch November 7, 2026 19:55
@github-actions

github-actions Bot commented Nov 7, 2026

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

dco-signoff: yes Indicates the PR's author has signed the DCO. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🌱 review backlog: file only ≥P2 as issues, per-PR cap, collapse same-family findings

1 participant