Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.
TypeScript ai-agentai-resume-analyzerapplication-trackerapplication-tracking-systematscareerjob-applicationjob-automationjob-huntingjob-searchjob-seeker-toolsjob-trackerjob-trackingjobsearchjobseekersmcpollamaresumeresume-reviewself-hosted
fix(automations): drop the Greenhouse keyword floor to 1, log true floor counts, relabel unset titles
Khuram Niaz4ed3235cbd92
diff --git a/__tests__/greenhouse-pipeline.spec.ts b/__tests__/greenhouse-pipeline.spec.tsindex 1d12d8c..68c8441 100644--- a/__tests__/greenhouse-pipeline.spec.ts+++ b/__tests__/greenhouse-pipeline.spec.ts@@ -47,6 +47,9 @@ describe("runGreenhousePipeline", () => {);const result = runGreenhousePipeline(jobs, config, [], { k: 2, cap: 4 });expect(result.funnel.relevant).toBe(4);+ // The uncapped count stays visible so the log can't report the cap as+ // though it were the floor result.+ expect(result.funnel.floorSurvivors).toBe(10);expect(result.toAnalyze.length + result.toSaveUnanalyzed.length,).toBe(4);diff --git a/__tests__/greenhouse-rank.spec.ts b/__tests__/greenhouse-rank.spec.tsindex f178e01..bf66d7c 100644--- a/__tests__/greenhouse-rank.spec.ts+++ b/__tests__/greenhouse-rank.spec.ts@@ -68,7 +68,7 @@ describe("scoreJob", () => {expect(components.keywordHits.sort()).toEqual(["node", "react"]);});- it("false-positive suppression: off-title role with one stray keyword ranks low and fails floor", () => {+ it("false-positive suppression: off-title role with one stray keyword ranks below the real one", () => {const sales = scoreJob(job({ title: "Account Executive", description: "react to client needs" }),["Frontend Engineer"],@@ -84,7 +84,9 @@ describe("scoreJob", () => {[],);expect(real.score).toBeGreaterThan(sales.score);- expect(passesFloor(sales.components)).toBe(false);+ // A stray hit clears the minimum-signal floor; ranking, not the gate, is+ // what keeps it out of the top-K.+ expect(passesFloor(sales.components)).toBe(true);expect(passesFloor(real.components)).toBe(true);});@@ -195,19 +197,13 @@ describe("passesFloor", () => {).toBe(true);});- it(">=2 keyword hits passes", () => {- expect(- passesFloor({ ...base, titleHits: [], keywordHits: ["react", "node"] }),- ).toBe(true);- });-- it("1 stray keyword + no title fails", () => {+ it(">=1 keyword hit passes", () => {expect(passesFloor({ ...base, titleHits: [], keywordHits: ["react"] }),- ).toBe(false);+ ).toBe(true);});- it("unconventional title rescued by 2 keyword hits", () => {+ it("unconventional title rescued by a keyword hit", () => {expect(passesFloor({...base,diff --git a/src/components/automations/AutomationList.tsx b/src/components/automations/AutomationList.tsxindex ea021b0..5410acf 100644--- a/src/components/automations/AutomationList.tsx+++ b/src/components/automations/AutomationList.tsx@@ -206,7 +206,7 @@ export function AutomationList({<span className="font-medium text-foreground">Titles:</span>{" "}- {ghTitles.length ? ghTitles.join(", ") : "Any"}+ {ghTitles.length ? ghTitles.join(", ") : "Not set"}</span><span><span className="font-medium text-foreground">diff --git a/src/lib/constants.ts b/src/lib/constants.tsindex f35b6f8..59af825 100644--- a/src/lib/constants.ts+++ b/src/lib/constants.ts@@ -104,7 +104,7 @@ export const APP_CONSTANTS = {MAX_GREENHOUSE_COMPANIES: 25, // per automationGREENHOUSE_LISTING_CAP: 50, // safety ceiling applied after the relevance floorGREENHOUSE_FLOOR_MIN_TITLE_HITS: 1,- GREENHOUSE_FLOOR_MIN_KEYWORD_HITS: 2,+ GREENHOUSE_FLOOR_MIN_KEYWORD_HITS: 1,GREENHOUSE_TITLE_WEIGHT: 0.6,GREENHOUSE_SKILL_WEIGHT: 0.4,GREENHOUSE_FETCH_TIMEOUT_MS: 25_000, // per-board AbortController timeoutdiff --git a/src/lib/scraper/automation-run/atsRun.ts b/src/lib/scraper/automation-run/atsRun.tsindex 8e515ee..0ac8f5f 100644--- a/src/lib/scraper/automation-run/atsRun.ts+++ b/src/lib/scraper/automation-run/atsRun.ts@@ -104,6 +104,20 @@ export async function runAtsRun(}const resumeSkills = extractResumeSkills(resume);++ // The distinct pool scoreJob actually ranks against. Surfacing it makes a+ // thin search visible instead of showing up only as an unexplained zero.+ const termCount = new Set(+ [...config.keywords, ...resumeSkills]+ .map((t) => t.trim().toLowerCase())+ .filter(Boolean),+ ).size;+ automationLogger.log(+ automation.id,+ "info",+ `${label} Ranking against ${termCount} search term(s) (${config.keywords.length} keyword(s) + ${resumeSkills.length} resume skill(s))`,+ );+const pipeline = runGreenhousePipeline(dedupedJobs, config, resumeSkills, {corpus: jobs,k: config.topK,@@ -117,10 +131,14 @@ export async function runAtsRun();}+ const capped =+ pipeline.funnel.floorSurvivors > pipeline.funnel.relevant+ ? ` (capped to ${pipeline.funnel.relevant})`+ : "";automationLogger.log(automation.id,"info",- `${label} ${pipeline.funnel.relevant} jobs cleared the relevance floor`,+ `${label} ${pipeline.funnel.floorSurvivors} jobs cleared the relevance floor${capped}`,);const buildFunnel = (analyzed: number, highlighted: number): string => {@@ -150,15 +168,21 @@ export async function runAtsRun(};if (pipeline.funnel.relevant === 0) {+ // Re-rank the pre-dedup corpus so an exhausted board (everything that+ // matches is already saved) reads differently from a search that matches+ // nothing at all. Only pays for itself on this zero path.+ const beforeDedup = runGreenhousePipeline(jobs, config, resumeSkills, {+ corpus: jobs,+ k: config.topK,+ });let reason: string;- if (pipeline.funnel.located === 0) {+ if (beforeDedup.funnel.relevant > 0) {+ reason = `all ${beforeDedup.funnel.relevant} matching job(s) on these boards are already in your list — no new postings since the last run`;+ } else if (pipeline.funnel.located === 0) {reason = `none of the ${jobsDeduplicated} new job(s) matched your location filter (${config.locations.join(", ")})`;} else {const checked = pipeline.funnel.located ?? jobsDeduplicated;- const criteria = config.targetTitles.length > 0- ? `target titles (${config.targetTitles.join(", ")})`- : "your search criteria";- reason = `${checked} new job(s) were ranked but none matched ${criteria} closely enough to clear the relevance threshold`;+ reason = `none of the ${checked} job(s) checked contained any of your ${termCount} search term(s)`;}automationLogger.log(automation.id,diff --git a/src/lib/scraper/greenhouse/pipeline.ts b/src/lib/scraper/greenhouse/pipeline.tsindex bd59263..72e750c 100644--- a/src/lib/scraper/greenhouse/pipeline.ts+++ b/src/lib/scraper/greenhouse/pipeline.ts@@ -24,6 +24,7 @@ export interface PipelineResult {funnel: {deduped: number; // jobs handed in (already deduped by the runner)located: number | null; // survivors after strict location gate (null if off)+ floorSurvivors: number; // jobs clearing the floor, before the cap ceilingrelevant: number; // floor survivors after the cap ceiling (== total saved)};}@@ -78,6 +79,7 @@ export function runGreenhousePipeline(funnel: {deduped,located: located ? located.length : null,+ floorSurvivors: floorSurvivors.length,relevant: capped.length,},};diff --git a/src/lib/scraper/greenhouse/rank.ts b/src/lib/scraper/greenhouse/rank.tsindex 95593af..2e45daa 100644--- a/src/lib/scraper/greenhouse/rank.ts+++ b/src/lib/scraper/greenhouse/rank.ts@@ -142,8 +142,10 @@ export function scoreJob(};}-// The relevance floor. Keep a job iff it has real signal:-// >=1 target-title token match OR >=2 distinct keyword/skill hits.+// The minimum-signal floor. Keep a job iff it hit at least one of the user's+// terms: a target-title token, or a keyword/resume-skill. Ranking (sort + cap ++// top-K) picks the winners; this only keeps jobs with no relationship at all to+// the search out of the LLM budget.// Tests presence (the component arrays), not the weighted magnitude, so it is// invariant to weight tuning.export function passesFloor(c: PrerankComponents): boolean {