Skip to content

Commit 56bd5a0

Browse files
committed
fix: displayName equality is high-confidence without metadata signals (CM-1137)
decideMemberSimilarityUsingAdditionalChecks returned LOW_CONFIDENCE_SCORE (0.2) when called from the displayName equality path with no metadata signals, even though the displayName match itself is already high-confidence. Initialise isHighConfidence=true when no startingScore is provided so the function returns at least 0.9. Signed-off-by: Yeganathan S <63534555+skwowet@users.noreply.github.com>
1 parent b93c15d commit 56bd5a0

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

services/apps/merge_suggestions_worker/src/memberSimilarityCalculator.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -464,8 +464,10 @@ class MemberSimilarityCalculator {
464464
similarMember: IMemberOpensearch,
465465
startingScore?: number,
466466
): number {
467-
let isHighConfidence = false
468-
let confidenceScore = startingScore || this.HIGH_CONFIDENCE_SCORE
467+
// displayName equality (startingScore omitted) is itself a high-confidence signal — don't
468+
// gate on metadata. Edit-distance callers pass a score and must have at least one signal.
469+
let isHighConfidence = startingScore === undefined
470+
let confidenceScore = startingScore ?? this.HIGH_CONFIDENCE_SCORE
469471

470472
const bumpFactor = (1 - confidenceScore) / 5
471473

0 commit comments

Comments
 (0)