fix(FN-5150): unblock workspace gates with near-duplicate timestamp guard
Fusion-Task-Id: FN-5150 Fusion-Task-Lineage: 09bf24f1-5d23-4049-bd5e-7afbea0a59ae
This commit is contained in:
committed by
gsxdsm
parent
356411ef06
commit
41d18b3f6d
@@ -2368,8 +2368,12 @@ export class TriageProcessor {
|
|||||||
const taskCreatedAt = Date.parse(task.createdAt);
|
const taskCreatedAt = Date.parse(task.createdAt);
|
||||||
const candidatesById = new Map(candidates.map((candidate) => [candidate.id, candidate]));
|
const candidatesById = new Map(candidates.map((candidate) => [candidate.id, candidate]));
|
||||||
const isStrictlyOlderOrTieCanonical = (candidate: NearDuplicateCandidate): boolean => {
|
const isStrictlyOlderOrTieCanonical = (candidate: NearDuplicateCandidate): boolean => {
|
||||||
if (candidate.createdAt < taskCreatedAt) return true;
|
const candidateCreatedAt = candidate.createdAt;
|
||||||
if (candidate.createdAt > taskCreatedAt) return false;
|
if (typeof candidateCreatedAt !== "number" || Number.isNaN(candidateCreatedAt)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (candidateCreatedAt < taskCreatedAt) return true;
|
||||||
|
if (candidateCreatedAt > taskCreatedAt) return false;
|
||||||
return candidate.id.localeCompare(task.id, undefined, { numeric: true }) < 0;
|
return candidate.id.localeCompare(task.id, undefined, { numeric: true }) < 0;
|
||||||
};
|
};
|
||||||
const olderMatches = matches.filter((match) => {
|
const olderMatches = matches.filter((match) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user