Skip to content

fix(crw): skip non-dict data rows from fastCRW - #2008

Closed
Bartok9 wants to merge 1 commit into
assafelovic:mainfrom
Bartok9:fix/crw-source-row-guards
Closed

fix(crw): skip non-dict data rows from fastCRW#2008
Bartok9 wants to merge 1 commit into
assafelovic:mainfrom
Bartok9:fix/crw-source-row-guards

Conversation

@Bartok9

@Bartok9 Bartok9 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Summary

fastCRW data list entries are assumed dicts; non-dict rows crashed result normalization.

Verification

python -m pytest tests/retrievers/test_crw_source_guards.py -q
# 2 passed

Comprehension called .get on every data[] item; non-dict rows crashed the
full search. Require list+dict shape before reading url/markdown.
@assafelovic

Copy link
Copy Markdown
Owner

The same defect is now fixed in main via #2074 — the version from #1923 was the one taken, so this one is redundant rather than unwanted.

Thanks for finding and fixing it; the report was genuinely useful even where the patch wasn't the one that landed. Closing as superseded.

Bartok9 pushed a commit to Bartok9/gpt-researcher that referenced this pull request Aug 23, 2026
Consolidates 20 single-file PRs from @Bartok9 into one reviewable change.
Every provider parsed its JSON response with strict indexing, so one
malformed row from an upstream API aborted the whole search rather than
skipping that row: non-dict entries, missing link/href/url keys,
non-list result containers, and null nested objects.

Squashed from assafelovic#1839 assafelovic#1852 assafelovic#1917 assafelovic#1918 assafelovic#1921 assafelovic#1922 assafelovic#1923 assafelovic#1931 assafelovic#1932
assafelovic#1933 assafelovic#1934 assafelovic#1937 assafelovic#1938 assafelovic#1940 assafelovic#1946 assafelovic#1947 assafelovic#1958 assafelovic#1999 assafelovic#2007 assafelovic#2013.
Each was applied and run against the full suite individually before
being stacked. Duplicates that targeted the same file (assafelovic#1914 assafelovic#1920
assafelovic#1962 assafelovic#2001 on searchapi, assafelovic#1971 on serper, assafelovic#2006 on serpapi, assafelovic#2008 on
crw, assafelovic#2009 on getxapi, assafelovic#1995 on xquik, assafelovic#1998 on bing, assafelovic#2000 on bocha)
are superseded by the version kept here.

Co-Authored-By: Bartok9 <noreply@github.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

2 participants