Skip to content

fix(search): avoid unrelated articles for empty searches - #256

Open
sahilshingate01 wants to merge 1 commit into
c2siorg:mainfrom
sahilshingate01:codex/avoid-unrelated-search-fallback
Open

sahilshingate01 wants to merge 1 commit into
c2siorg:mainfrom
sahilshingate01:codex/avoid-unrelated-search-fallback

Conversation

@sahilshingate01

Copy link
Copy Markdown

Bug

Keyword searches that found no matching articles fell back to returning the entire article collection, so the agent could present unrelated results as matches.

Root cause and fix

The scraper explicitly replaced an empty keyword-search result with all stored articles. Removed that fallback so an empty search remains empty; the all-articles path for non-search requests and generic-keyword fallback remain unchanged.

Testing

Updated the scraper regression test to assert an empty search does not return unrelated articles.

Assisted-By: OpenAI Codex

Generated-By: OpenAI Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant