From 71f34853fd1c18df4923978c749ef7c7db93ddad Mon Sep 17 00:00:00 2001 From: ilia Date: Sat, 16 May 2026 17:57:20 -0400 Subject: [PATCH] fix(discovery): use textMatchesKeyword for single deal-breaker tokens Passing a string into textMatchesAnyKeyword caused keywords.some is not a function when search profile deal-breakers were applied after extract. Co-authored-by: Cursor --- orchestrator/src/server/pipeline/steps/discover-jobs.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/orchestrator/src/server/pipeline/steps/discover-jobs.ts b/orchestrator/src/server/pipeline/steps/discover-jobs.ts index a29d5b8..b4f6f38 100644 --- a/orchestrator/src/server/pipeline/steps/discover-jobs.ts +++ b/orchestrator/src/server/pipeline/steps/discover-jobs.ts @@ -15,7 +15,10 @@ import { isSourceAllowedForCountry, normalizeCountryKey, } from "@shared/location-support.js"; -import { textMatchesAnyKeyword } from "@shared/keyword-match.js"; +import { + textMatchesAnyKeyword, + textMatchesKeyword, +} from "@shared/keyword-match.js"; import { resolveBlockedCompanyKeywordsFromStoredString } from "@shared/resolve-blocked-company-keywords.js"; import { inferCountryKeyFromSearchGeography, @@ -164,7 +167,7 @@ function filterJobsBySearchProfile(args: { if ( dealBreakers.length > 0 && - dealBreakers.some((breaker) => textMatchesAnyKeyword(haystack, breaker)) + dealBreakers.some((breaker) => textMatchesKeyword(haystack, breaker)) ) { return false; }