fix: enforce current physique range in funnel

This commit is contained in:
jjbrunton committed 2026-08-10 18:35:22 +01:00
1 parent d8d635e1ee
commit 1515b3e291
12 files changed
+92 -13

No files matched your search

+6 -1
View File
@@ -292,7 +292,12 @@ export class CandidateQueueRepository {
...row.prepared,
physiqueTargeting: { ...targeting },
};
result.retained += retain.run(JSON.stringify(refreshed), now, row.postId).changes;
result.retained += 1;
const previous = row.prepared.physiqueTargeting;
const snapshotMatches = previous?.enabled === targeting.enabled
&& previous.minScore === targeting.minScore
&& previous.maxScore === targeting.maxScore;
if (!snapshotMatches) retain.run(JSON.stringify(refreshed), now, row.postId);
}
return result;
})();