Repository navigation
Description
Problem
OpenCodeReview findings do not have stable semantic identity. Downstream workflows can suppress exact copies by path, line range, and body, but they cannot reliably recognize:
- the same invariant rephrased by different subtasks;
- one root cause reported against multiple nearby locations;
- an unchanged finding across reruns or providers;
- a finding that should update or resolve an existing review thread.
In a matched six-PR cohort, OCR emitted 85 findings that normalized to 74 claims: 11 duplicate units (12.9%). Only one was an exact-body duplicate; ten were semantic duplicates. In a same-commit provider comparison, duplicate rates were 16.4% and 6.5%. Exact text filtering therefore addresses only a small part of the observed problem.
PR 337 provides line-range incremental suppression, and session persistence has file/diff fingerprints. Those are useful but materially different from finding identity.
Desired behavior
Provide versioned stable finding fingerprints and semantic clustering before result publication.
Acceptance criteria
- Each finding has a deterministic fingerprint based on reviewed input identity, normalized claim/invariant, path, and symbol.
- Formatting-only prose changes do not change the fingerprint.
- Identical prose about different symbols or invariants remains distinct.
- Exact duplicates are removed before output.
- Semantically related findings expose a cluster ID, representative finding, member IDs, confidence, and clustering reason; members are not silently discarded.
- Cross-file reports of one root cause are represented explicitly rather than accidentally collapsed.
- Fingerprint and cluster fields are included in JSON and persisted session output.
- Tests cover exact copies, rephrases, same text/different symbols, one root cause across paths, provider reruns, and false-positive separation.
- Downstream consumers can suppress unchanged fingerprints and update or resolve one existing review thread.
Non-goals
- Do not require a particular embedding provider.
- Do not rely on one unexplained global similarity threshold.
- Do not automatically dismiss a finding merely because another review system reports a related concern.
Related work
- PR 337: incremental line-range suppression
- PR 306: resumable sessions and file-level fingerprints
This issue is specifically about finding-level identity and semantic output deduplication.
Activity
hanhaiqingchuan commentedon Jul 15, 2026
I'd like to work on this. Could you please assign it to me?
lizhengfeng101 commentedon Nov 26, 2026
I checked how often this happens in a larger benchmark before deciding whether to add a post-processing step. I used OCR at
d4f568f7withqwen3.8-max-0902on 151 PRs and compared the 753 published review comments within each PR, never across PRs. For each group of n comments, I counted n − 1 as extra. Exact matches were checked mechanically; the semantic groupings were model-assisted judgments, not human ground truth.The distinction matters: 21 of the 28 same-finding groups spanned files. In one FreeCAD review, four comments traced back to one missing
EDGEentry in a shared lookup table: one at the table and three at its callers. One fix addresses all four. In a different PR, four validators each classified vertical geometry as horizontal. Those comments might read better together, but all four locations still need a fix. I would not treat the broader 9.43% as a deletion rate. This benchmark also did not measure identity across reruns or providers, or reconciliation with existing threads.A PR-wide LLM pass before publication could group findings like these. My judgment is that the 4.78% rate in this run is too low to justify adding that pass to every review right now, and I expect stronger base models to reduce the need for it further. I’m closing this as not planned, not because duplicate findings don’t occur. If repeated runs show that unchanged findings regularly reopen resolved threads, that would be a separate reason to revisit stable identity.
Thanks @acoliver for documenting the problem and @hanhaiqingchuan for offering to work on it.