import type { ConflictProbe, ProbeAnswer } from "./types.ts"; export function probeIdentity(probe: Pick): string { return `${probe.semantic_key}|${probe.candidate_split_hash}`; } export function isDuplicateProbe( probe: Pick, asked: readonly Pick[], ): boolean { return asked.some((item) => item.semantic_key === probe.semantic_key || item.candidate_split_hash === probe.candidate_split_hash, ); } export function askedIdentities( asked: readonly Pick[], ): ReadonlySet { return new Set(asked.flatMap((item) => [item.semantic_key, `${item.semantic_key}|${item.candidate_split_hash}`])); }