Every logged run (research_run.log/2/3) showed gpt-researcher's free
duckduckgo retriever silently returning 0 source URLs under its concurrent
sub-query fan-out (ddgs swallows the error into an empty list, no exception
raised), while the LLM still wrote a confident, fully unsourced report --
the exact failure this product exists to prevent.
generate_market_brief() now retries the full research pass (fresh
GPTResearcher -> fresh retriever session) with backoff when a pass returns
zero sources, and raises WedgecheckResearchError instead of returning an
unsourced MarketBrief if every attempt still comes back empty. Tunable via
WEDGECHECK_RESEARCH_MAX_ATTEMPTS / WEDGECHECK_RESEARCH_RETRY_BACKOFF_SECONDS.
Also: first commit of this product into version control (requirements.txt,
.gitignore, README) -- it had never left the local filesystem before.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>