Skip to content

Legacy filter: US state abbr '"in"' false-matches ', India' #19

@Mayank-glitch-cpu

Description

@Mayank-glitch-cpu

Bug: In backend/src/services/job-filter.ts, the US_LOCATION_TOKENS list includes ', in' as a substring match for Indiana. This accidentally matches ', India' on Indian job locations, causing Bangalore/Hyderabad/Mumbai roles to pass the US-only filter.

Same issue likely affects ', or' (Oregon vs. 'and'-like fragments) and ', tn' etc. to a lesser extent.

Scope: Legacy backend pipeline. The MCP server port in mcp-server/src/lib/filter.ts already uses a word-boundary regex to fix this.

Fix for legacy: Replace substring matching for two-letter state abbreviations with a word-boundary regex like /,\s*(ca|ny|...)(?![a-z])/i. Mirror the port.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions