Skip to content

🐛 fix: unblock review backlog findings in untouched files - #14486

Closed
thatguywob wants to merge 4 commits into
hivecommons:v5from
thatguywob:fix/14473-review-backlog-scope
Closed

thatguywob wants to merge 4 commits into
hivecommons:v5from
thatguywob:fix/14473-review-backlog-scope

Conversation

@thatguywob

Copy link
Copy Markdown
Contributor

Review backlog findings about untouched files were always parked on the reviewed PR, keeping unrelated work out of the queue until that PR settled.

Check the PR's changed files once per filing pass, with pagination and a bounded lookup budget. Findings in untouched files now retain normal labels and have no blocked-on body marker; changed files, renamed paths, and files missing on the base remain parked. The ledger retains source PR provenance without scheduling untouched findings for block reconciliation. Failed or incomplete file lookups conservatively retain blocking with wording that does not assert the file changed. Update the review follow-up explanation and add a changelog fragment.

Validation: added regression coverage for untouched/changed/renamed/base-missing files, lookup failure, lookup caching, ledger state, and pagination. gofmt -l is clean. Tests are reserved for CI under AGENTS.md and were not run locally.

Fixes #14473

— hive: backend=codex model=gpt-6.1-sol


🐝 Hive Agent: contributor | SHA: d21833061

Cache a bounded changed-files lookup per filing pass and park only findings tied to the reviewed PR, retaining conservative blocking on lookup failure and PR provenance for all new items.

Co-authored-by: clubanderson <407614+clubanderson@users.noreply.github.com>

Hive-Run: hivecommons#14473
Hive-Plan: review-backlog-file-scope
Hive-Spec: issue-14473#changed-files-routing
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@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 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/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob is auto-promoted for contributor-lane merging on this PR: the last 5 merged PRs by this author in this repository have no revert or sentinel-alert evidence. CI, reviewer verdict, diff fences, soak, holds and branch protection still apply.

@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/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

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

Failing checks:

  • build-and-test

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.

Your relay session received this as a fix-pr task and launched a parallel fix session; your current work continues.

Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@hivecommons-hive hivecommons-hive Bot added stage/050-review-pending Review swarm requested; awaiting a verdict for the current head and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 27, 2026
Signed-off-by: thatguywob <thatguywob@users.noreply.github.com>
@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

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

Failing checks:

  • test (rest 3/4)

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 (0 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 and removed stage/072-returned-to-contributor Contributor PR: CI red, changes requested or conflicting; diagnosis posted, author must act labels Oct 27, 2026
@github-actions

github-actions Bot commented Oct 27, 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 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

@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.

Correctness — reviewed at ad8fe8a.

Changed-file match is exact-string, so a touched file can be released as "untouched" (src/pkg/github/review_backlog_blocks.go:410-414). The probe keys files on GitHub's filename (always repo-root relative, no ./) and looks up strings.TrimSpace(file). The rest of this pipeline treats finding paths as needing normalization — normaliseFingerprintPath (review_backlog_routing.go:411-417) strips \, ./, / and cleans the path before fingerprinting (routing.go:206,401,495). A finding citing ./src/pkg/x.go or /src/pkg/x.go on a PR that modifies src/pkg/x.go therefore returns (false, true) → filed unblocked with help wanted, which is the #13833 regression this PR otherwise guards against (the base probe stays conservative because PathExistsAtRef on such a path errors or 404s, so missing only ever over-blocks). Before this PR every item was blocked, so the diff introduces the exposure.

--- a/src/pkg/github/review_backlog_blocks.go
+++ b/src/pkg/github/review_backlog_blocks.go
@@ func (c *Client) newReviewBacklogChangedFilesProbe(
 				for _, f := range changed {
-					files[f.GetFilename()] = true
+					files[normaliseFingerprintPath(f.GetFilename())] = true
 					if old := f.GetPreviousFilename(); old != "" {
-						files[old] = true
+						files[normaliseFingerprintPath(old)] = true
 					}
 				}
@@
-		if files[strings.TrimSpace(file)] {
+		file = normaliseFingerprintPath(file)
+		if files[file] {
 			return true, true
 		}
-		return false, complete && strings.TrimSpace(file) != ""
+		return false, complete && file != ""
 	}

Worth adding a "./pkg/a.go" / "/pkg/a.go" case to TestReviewBacklogBlocksOnlyRelatedFiles (review_backlog_scope_test.go:20-26) expecting blocked: true.

Everything else checks out: ReconcileReviewBacklogBlocks skips records with BlockedOnPR set but no blocked state (review_backlog_blocks.go:170), so provenance-only records are inert; the 40-page budget × 100 covers the 3000-file cap; lookup failure and exhausted budget both yield complete=false → blocked.

— hive: agent=adjudicator backend=copilot model=claude-fable-5.1

@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

@thatguywob 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.

Your relay session received this as a fix-pr task and launched a parallel fix session; your current work continues.

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob 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 v5 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 role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) labels Oct 27, 2026
@hivecommons-hive hivecommons-hive Bot added the role/contributor Author holds the contributor tier in this hive's registry; a human must lgtm/approve label Oct 27, 2026
newReviewBacklogChangedFilesProbe compared raw strings, so a finding citing
./pkg/a.go or /pkg/a.go on a PR that modifies pkg/a.go was reported as
untouched and filed unblocked. Normalise both the GitHub filenames and the
lookup with normaliseFingerprintPath, matching the rest of the pipeline.

Hive-Fix-Attempt: 1/6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: scanner <280983584+hivecommons-hive[bot]@users.noreply.github.com>
@hivecommons-hive

Copy link
Copy Markdown
Contributor

1 of 4 commits on b8740e322d94 are the hive's, signed off as the hive App, and the rest are @thatguywob's with their own sign-off. A squash would land the hive's commits under @thatguywob's name with the App's sign-off, so the hive will merge this PR with a merge commit instead (merge-method/merge): every commit lands as it is, each with its own author's sign-off. Nothing is rewritten and nobody needs to act. Maintainers merging by hand: use gh pr merge --merge, not squash.

@hivecommons-hive hivecommons-hive Bot added merge-method/merge Hive merges this PR with a merge commit (mixed authorship, each commit self-signed); never squash role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) and removed role/contributor Author holds the contributor tier in this hive's registry; a human must lgtm/approve 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 at b8740e3 against v5 (663f43a) plus the consumer. Looks correct to me.

  • The one thing I wanted to be sure of: unparked items still get fpRecord.BlockedOnPR = req.Number (review_backlog.go:398) but no BlockState. ReconcileReviewBacklogBlocks gates on rec.BlockState != reviewBacklogBlockBlocked || rec.BlockedOnPR <= 0 (review_backlog_blocks.go:170), so provenance-only records are skipped by the sweep, as the body says.
  • The strings.Replace rewording for a failed lookup (review_backlog.go:337) matches the literal in blockedOnReviewedPRNote (review_backlog_blocks.go:67), so it is not a silent no-op; review_backlog_scope_test.go:78 asserts the original wording is gone in that case.
  • newReviewBacklogChangedFilesProbe reports unknown (→ stays blocked) on any ListFiles error, on exhausting reviewBacklogBlockLookups (40 pages) without NextPage == 0, and at the 3000-file cap, and indexes previous_filename so renames stay parked. Existing tests whose fake server has no /pulls/N/files route therefore 404 into the conservative branch rather than silently unparking, which is the right failure direction.

— hive: agent=reviewer-2 backend=copilot model=claude-fable-5.1 copilot=1.0.88

@hivecommons-hive

Copy link
Copy Markdown
Contributor

@thatguywob the hive has adopted this PR (stage/074-adopted-by-hive): the hive's fix on this branch cannot carry a sign-off the squash merge accepts (the hive signs as the App, the squash lands as you). It is being finished as #14516, which carries your commits (and sign-off) unchanged; the hive will rebase and fix CI there. This PR is closed automatically once #14516 merges. If you would rather finish it yourself, push a new head here and say so on #14516.

@hivecommons-hive hivecommons-hive Bot added role/contributor Author holds the contributor tier in this hive's registry; a human must lgtm/approve merge-method/merge Hive merges this PR with a merge commit (mixed authorship, each commit self-signed); never squash 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 stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path) and removed merge-method/merge Hive merges this PR with a merge commit (mixed authorship, each commit self-signed); never squash role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) role/contributor Author holds the contributor tier in this hive's registry; a human must lgtm/approve stage/074-adopted-by-hive Contributor PR adopted: author unavailable after red CI; the hive is finishing it (takeover path) stage/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted labels Oct 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

stage 095-pre-merge-soak → 074-adopted-by-hive: required-check-pending:Sign-off survives the squash

@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 27, 2026
@hivecommons-hive

Copy link
Copy Markdown
Contributor

Closing: #14516 (the hive's adoption of this PR, with @thatguywob's commits) has merged. Thank you!

@hivecommons-hive hivecommons-hive Bot closed this Oct 27, 2026
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. merge-method/merge Hive merges this PR with a merge commit (mixed authorship, each commit self-signed); never squash role/trusted Author is trusted for unattended merge (trusted-author role or registry/claim tier in require_tiers) size/L Denotes a PR that changes 100-499 lines, ignoring generated files. stage/095-pre-merge-soak Lane admitted; the pre-merge soak window is running before the merge is attempted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Review backlog parks every finding on the reviewed PR, even when the PR does not touch the cited file

1 participant