Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
🟠 [Q9Q-QGN] onSkillUpdate receives uniqueFindings instead of mergedFindings (src/cli/output/tasks.ts:387) (high confidence)
Line 387 passes uniqueFindings to onSkillUpdate callback while the report uses mergedFindings. This causes the terminal UI (via completedItems in ink-runner.tsx) to display pre-merge finding counts, inconsistent with the actual report findings.
Identified by Warden via notseer
When multiple findings describe the same root cause at different code locations, use Haiku LLM to identify groups and merge them into a single finding with additionalLocations. Updates the full rendering pipeline (terminal, GitHub checks, PR comments, stale detection, dedup) to handle the new field. Key design decisions: - mergeGroupLocations returns a shallow copy (no input mutation) - Overlapping LLM groups skip already-absorbed findings - Additional locations are deduplicated by path:startLine:endLine - Shared findingLine/compareFindingPriority utilities in types/index.ts - Cross-location merge runs once in runSkillTask, not again in poster Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
c5f3f5c to
dfad83c
Compare
Fix three bugs in cross-location finding merge: 1. When overlapping LLM groups share the same winner, the replacement map was overwritten, losing locations from prior groups. Now uses the existing accumulated replacement as the merge base. 2. Duplicate indices from LLM responses could cause a winner to appear in the absorbed/dropped set, silently removing it from output. Now deduplicates group indices before processing. 3. onSkillUpdate callback was emitting pre-merge uniqueFindings instead of the final mergedFindings, causing inconsistent state for consumers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Seed the dedup set in mergeGroupLocations with the winner's own primary location so losers sharing that same path:startLine:endLine don't produce a redundant self-reference in additionalLocations. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a finding that won a previous merge group later becomes a loser in a subsequent group, its accumulated additionalLocations were lost because only the winner's replacement was substituted. Now substitutes replacements for all findings in the group before merging. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
After substituting replacements into the sorted array for merging, the loser-tracking loop was adding replacement objects to absorbed/dropped sets. The final filter checks original references from the findings array, so originals slipped through, producing duplicates. Now tracks original finding references for absorption. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
dcramer
added a commit
that referenced
this pull request
Feb 17, 2026
#153) Extract duplicated merge-group processing into a single `applyMergeGroups` function. Both `consolidateBatchFindings` (dedup.ts) and `mergeCrossLocationFindings` (extract.ts) contained the same loop for processing LLM-returned merge groups: deduplicating indices, filtering absorbed findings, substituting prior replacements, and calling `mergeGroupLocations`. This extracts that logic into one shared function in extract.ts. Also adds a small `locationKey` helper to replace repeated inline string construction, and removes `pickAndMergeWinner` which was a thin wrapper around `mergeGroupLocations`. Net: -21 lines, no behavior change. Follow-ujp to #148 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge findings that describe the same root cause at different code locations
into a single finding with
additionalLocations.When a skill reports the same issue found in multiple places (e.g. the same
anti-pattern repeated across files), Warden now uses Haiku to identify groups
and collapses them into one finding per root cause. This reduces noise in PR
comments and GitHub checks while preserving all location details.
What changes:
mergeCrossLocationFindingsinsrc/sdk/extract.tscalls Haiku to grouprelated findings, then merges each group into a primary finding with
additional locations attached
detection, dedup) handles the new
additionalLocationsfieldrunSkillTask, not again in the posterfindingLine/compareFindingPriorityutilities intypes/index.tsDesign decisions:
mergeGroupLocationsreturns a shallow copy (no input mutation)path:startLine:endLine