fix(blocks/firecrawl): yield declared json_data output for JSON scrape format#13401
fix(blocks/firecrawl): yield declared json_data output for JSON scrape format#13401ly-wang19 wants to merge 1 commit into
Conversation
|
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout. (15)
🧰 Additional context used📓 Path-based instructions (3)autogpt_platform/backend/**/*.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/backend/backend/blocks/**/*.py📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
autogpt_platform/{backend,autogpt_libs}/**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (17)📚 Learning: 2026-02-05T04:11:00.596ZApplied to files:
📚 Learning: 2026-03-16T16:32:21.686ZApplied to files:
📚 Learning: 2026-04-23T12:55:26.122ZApplied to files:
📚 Learning: 2026-02-26T17:02:22.448ZApplied to files:
📚 Learning: 2026-03-05T15:42:08.207ZApplied to files:
📚 Learning: 2026-03-16T16:30:11.452ZApplied to files:
📚 Learning: 2026-03-16T16:30:23.196ZApplied to files:
📚 Learning: 2026-03-16T16:30:11.452ZApplied to files:
📚 Learning: 2026-03-16T16:35:40.236ZApplied to files:
📚 Learning: 2026-03-31T15:37:38.626ZApplied to files:
📚 Learning: 2026-04-15T02:43:36.890ZApplied to files:
📚 Learning: 2026-05-23T05:29:43.085ZApplied to files:
📚 Learning: 2026-04-22T11:46:04.431ZApplied to files:
📚 Learning: 2026-04-22T11:46:12.892ZApplied to files:
📚 Learning: 2026-05-07T18:48:14.242ZApplied to files:
📚 Learning: 2026-05-26T14:24:34.866ZApplied to files:
📚 Learning: 2026-06-11T19:39:10.493ZApplied to files:
🔇 Additional comments (2)
WalkthroughTwo single-line fixes in the Firecrawl integration: both ChangesFirecrawl Output Key Alignment
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is ❌ Your patch check has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## dev #13401 +/- ##
==========================================
- Coverage 74.31% 74.22% -0.09%
==========================================
Files 2528 2531 +3
Lines 191018 191500 +482
Branches 18851 18937 +86
==========================================
+ Hits 141959 142145 +186
- Misses 44974 45243 +269
- Partials 4085 4112 +27
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
/review |
Background
The Firecrawl
ScrapeandCrawlblocks declare ajson_dataoutput, but theScrapeFormat.JSONbranch yields the undeclared name"json":Every other format branch yields its declared output name (
markdown,html,raw_html,links,screenshot,screenshot_full_page,change_tracking). Because"json"isn't a declared output,Block._execute→output_schema.validate_field("json", ...)→get_field_schemaraisesValueError: Invalid property name json(backend/blocks/_base.py). So selecting the JSON format crashes both blocks on a normal, first-class enum option (ScrapeFormat.JSON).Changes
Yield the declared
json_dataoutput name in theScrapeFormat.JSONbranch of bothfirecrawl/scrape.pyandfirecrawl/crawl.py. The data access (scrape_result.json/data.json) is already correct — only the output key was wrong.Testing
Verified by inspection: the
Outputschemas declarejson_data(notjson); all sibling format branches yield their declared names; andget_field_schemaraisesValueErrorfor any undeclared output name. Minimal one-line fix in each block, no behaviour change for other formats. (These two blocks currently ship withouttest_input/test_outputfixtures, which is why the JSON path wasn't exercised bytest_available_blocks— happy to add fixtures in a follow-up if preferred.)