Skip to content

ref(sdk): Extract applyMergeGroups to unify cross-location merge logic#153

Merged
dcramer merged 1 commit intomainfrom
ref/simplifier-clm
Feb 17, 2026
Merged

ref(sdk): Extract applyMergeGroups to unify cross-location merge logic#153
dcramer merged 1 commit intomainfrom
ref/simplifier-clm

Conversation

@dcramer
Copy link
Member

@dcramer dcramer commented Feb 17, 2026

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

Both dedup.ts and extract.ts duplicated the same group-processing loop
for merging findings by LLM-returned groups. Extract into a single
applyMergeGroups function in extract.ts and call it from both sites.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Feb 17, 2026

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

Project Deployment Actions Updated (UTC)
warden Ready Ready Preview, Comment Feb 17, 2026 8:56pm

Request Review

@dcramer dcramer marked this pull request as ready for review February 17, 2026 20:57
@dcramer dcramer merged commit f9000e3 into main Feb 17, 2026
13 checks passed
@dcramer dcramer deleted the ref/simplifier-clm branch February 17, 2026 21:15
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

Comments