Skip to content

fix(dedup): Group findings by semantic bug identity - #536

Merged
gricha merged 2 commits into
mainfrom
fix/semantic-finding-dedup
Sep 28, 2026
Merged

gricha merged 2 commits into
mainfrom
fix/semantic-finding-dedup

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

Deduplicate findings about the same bug even when their wording or locations differ. This fixes repeated reports like those on getsentry/sentry-python#7720.

  • Remove the exact-text veto on model-selected groups.
  • Compare findings across files and distant lines, including against existing comments.
  • Keep the highest-priority finding and its additional locations. Leave locationless findings separate so they cannot suppress inline comments.

Retain two focused regression cases for paraphrased findings and cross-file consolidation. Model selection and the separate Warden runtime failure are outside this change.

via greg.pstrucha.

--

View Junior Session [Sentry]

Honor model-selected duplicate groups without an exact-text veto, and compare findings across distant source and test locations. Keep instructions conservative for independent bugs and cover the repeated-output-gate regression.

Co-Authored-By: Greg Pstrucha <greg.pstrucha@sentry.io>

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 95f5ed1. Configure here.

Comment thread packages/warden/src/output/dedup.ts Resolved
Keep paraphrase and cross-file consolidation checks, reuse the existing merge test, and exclude locationless findings from inline consolidation.

Co-Authored-By: Greg Pstrucha <greg.pstrucha@sentry.io>
@vercel
vercel Bot temporarily deployed to Preview – warden-prod September 28, 2026 18:46 Inactive
@vercel

vercel Bot commented Sep 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated
warden-prod Skipped Skipped Sep 28, 2026 6:46pm UTC

Request Review

@gricha
gricha merged commit a808376 into main Sep 28, 2026
20 of 22 checks passed
@gricha
gricha deleted the fix/semantic-finding-dedup branch September 28, 2026 19:44
gricha added a commit that referenced this pull request Sep 28, 2026
The repo self-review workflow did not load the org configuration. With
`WARDEN_MODEL` unset, it fell back to Pi's default OpenRouter model
instead of the shared Grok/Luna settings.

Check out the org `.github` repo and pass its `warden.toml` to both
Analyze and Report. Keep `uses: ./` so self-review still exercises the
PR's Warden build.

Separate from the deduplication change in #536.

<!-- junior-request-attribution:start -->
via **greg.pstrucha**.
<!-- junior-request-attribution:end -->

<!-- junior-session-footer:start -->
<!-- junior-conversation-id:slack%3AC0ACFA5JBDX%3A1790580664.621879 -->

--

[View Junior
Session](https://junior-prod.sentry.dev/conversations/slack%3AC0ACFA5JBDX%3A1790580664.621879)
[[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AC0ACFA5JBDX%3A1790580664.621879/?project=4510944073809921)

<!-- junior-session-footer:end -->

Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com>
Co-authored-by: Greg Pstrucha <greg.pstrucha@sentry.io>
gricha added a commit that referenced this pull request Sep 30, 2026
Raise the output budget for deduplication and cross-location comparisons
from 512 to 8,192 tokens so reasoning models can finish their JSON
responses. Truncation now reports `output_limit` with the model, finish
reason, configured limit, and consumed tokens. Failed cross-location
consolidation also emits a warning.

#531 started enforcing previously ignored token limits. On
[sentry-python#7780](getsentry/sentry-python#7780),
Warden 0.50.0 exhausted the 512-token budget and fell back to hash
matching, posting repeated findings despite the semantic-matching fix in
#536.

Regression tests exercise all three comparison paths through the Pi
adapter using captured findings, retain an independent bug, and check
truncation diagnostics and telemetry. A local replay using the
production auxiliary model completed all seven comparisons at 8,192
tokens; the 512-token control truncated five. The replay absorbed the 14
duplicate initial findings and reduced four follow-up comments to one
new IPv6 finding, without posting to GitHub.

Co-authored-by: GPT-6 <noreply@anthropic.com>

This branch was successfully deployed

1 active and 1 inactive deployments
Preview – warden — 30ef763e Deployed Sep 28, 2026 by vercel[bot]
Preview – warden-prod — 30ef763e Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant