Skip to content

feat: Review gate: match a recurring finding across rounds by claim similarity, not exact file+claim (#727) - #787

Merged
mabry1985 merged 1 commit into
mainfrom
feat/bd-8ndhb-review-gate-match-a-recurring-finding-ac
Nov 18, 2026
Merged

mabry1985 merged 1 commit into
mainfrom
feat/bd-8ndhb-review-gate-match-a-recurring-finding-ac

Conversation

@mabry1985

Copy link
Copy Markdown
Member

Summary

A review finding that comes back re-worded, or reported in another file, is now recognised as the same finding, so the budget block reads "persist" instead of "needs a design call" (#727). The targeted suites pass: the new tests/test_review_identity_727.py, both #514 files and tests/test_block_pages_735.py; I did not run the full suite.

  • Matching (loop/reconcile.py): an exact _finding_identity repeat still matches first. Otherwise the claims are compared by Jaccard overlap of their word tokens (case-folded, stop-words dropped, plain inflection suffix stripped). The file is never required to match; it only breaks a tie between equally similar earlier claims.
  • Threshold: _CLAIM_SIMILARITY_THRESHOLD = 0.33, no config. On the bd-j5qr2 rounds, the re-worded pair (rounds 3 and 4) scores 0.42. Round 1 against round 4, a different defect on the same card, scores 0.14; the round-1 claim is my reconstruction from the issue's abridged table.
  • Second constant: the task asked for one threshold constant, and I added a floor as well, _CLAIM_SIMILARITY_MIN_SHARED = 3. Without it, very short claims such as "bug A" / "bug B" overlap by half on one shared word and would match. Short claims therefore match by exact identity only, as before.
  • Block reason: the persist and design-call wordings are unchanged, so _REVIEW_GATE_BLOCK_MARKERS still classes both. A finding matched by similarity gets a suffix in the reason and PR comment, e.g. [re-worded since round 1, was loop/drive.py:2518], so the operator can check the two wordings really are one defect. Exact repeats are named exactly as before.
  • Budget: review_fix_max and its config are untouched; the card still blocks on the same round.
  • Tests: the new file drives the bd-j5qr2 rounds through the gate and the matcher: same file, relocated file, the different-defect negative, exact repeat, file tiebreak and short claims.
  • Unlisted file: changelog.d/727.md. The task said no CHANGELOG, but recent commits each add a fragment there, so I followed that convention; drop it if it is unwanted.
  • No behaviour was removed.

Fixes #727

@mabry1985 mabry1985 added the reviewer-of-record:board Reviewed by the project board's review gate (reviewer of record) label Nov 18, 2026

@protoreview protoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

QA panel review — PASS

reviewer-of-record · head 12868a3da100 · formal

Reviewer of record: project board. This PR is labelled reviewer-of-record:board, so its review belongs to that reviewer, and its board/review-gate status is success at 12868a3da100 (“Review gate clean — 2 finding(s), none blocking”). This PASS carries that verdict into the gates that read this panel's; no panel ran on this head. Comment @vera review for an independent review.

No findings — the review came back clean.

findings JSON (machine-readable)
[]

@protoreview protoreview Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Promoting the PASS verdict for head 12868a3da100: all checks terminal-green, zero unresolved review threads. (approve-on-green)

@mabry1985
mabry1985 merged commit 976af4a into main Nov 18, 2026
6 checks passed
@mabry1985
mabry1985 deleted the feat/bd-8ndhb-review-gate-match-a-recurring-finding-ac branch November 18, 2026 03:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

reviewer-of-record:board Reviewed by the project board's review gate (reviewer of record)

Projects

None yet

1 participant