Skip to content

Commit 7061f06

Browse files
committed
fix: handleMerge must use return value of updateSupportStats
updateSupportStats returns a new SupportInfoV2 object — the original is not mutated. The old code discarded the return value and persisted the empty original, causing merge+contextLabel to always write empty support_info ({global_strength:0.5, total_observations:0, slices:[]}).
1 parent 38456a1 commit 7061f06

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/smart-extractor.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -627,8 +627,8 @@ export class SmartExtractor {
627627
if (updatedEntry) {
628628
const meta = parseSmartMetadata(updatedEntry.metadata, updatedEntry);
629629
const supportInfo = parseSupportInfo(meta.support_info);
630-
updateSupportStats(supportInfo, contextLabel, "support");
631-
const finalMetadata = stringifySmartMetadata({ ...meta, support_info: supportInfo });
630+
const updated = updateSupportStats(supportInfo, contextLabel, "support");
631+
const finalMetadata = stringifySmartMetadata({ ...meta, support_info: updated });
632632
await this.store.update(matchId, { metadata: finalMetadata }, scopeFilter);
633633
}
634634
} catch {

0 commit comments

Comments
 (0)