Repository navigation
feat(crawl): make --depth optional; defaults are 100 pages and 100 items - #33
Closed
gonzalo-zenrows wants to merge 1 commit into
Closed
gonzalo-zenrows wants to merge 1 commit into
gonzalo-zenrows wants to merge 1 commit into
Conversation
The Crawl API no longer requires depth. Without it a crawl has no depth limit: it follows links until max_pages or max_items stops it, or nothing is left to open. An explicit depth is still 1 to 100000. max_pages and max_items now default to 100. crawl create sends depth only when --depth is set, and a crawl without one carries no depth field in its output. The local page-cap check counts the new default of 100 when --max-pages is unset. Help, README, the crawl skill and the registry say so, and acceptance check 21 expects 100. Check 1 also checks that a create without --depth sends no depth.
StefanoGuerrini
self-requested a review
October 13, 2026 07:02
StefanoGuerrini
marked this pull request as ready for review
October 13, 2026 07:02
StefanoGuerrini
approved these changes
Oct 13, 2026
Contributor
|
Folded into #31, which now carries this change, so the crawl command ships as one pull request. Generated by Claude Code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
zenrows crawl createno longer requires--depth. Without it the CLI sends nodepth, and the crawl follows links until--max-pagesor--max-itemsstops it. The documented defaults for both caps go from 10 to 100. Stacked on #31: merge after it.What the task asked for
The Crawl API changes
POST /v1/crawlsin three ways:depthis optional. Left out or null, the crawl has no depth limit. It follows links untilmax_pagesormax_itemsstops it, or it runs out of links to open. An explicit depth is still 1 to 100,000. Anything else gets 422invalid_parameter.max_pagesandmax_itemsdefault to 100 instead of 10. The caps stay at 100,000.depthcomes back from create, get and list with nodepthfield. A crawl created with one still echoes it.How the check confirmed it
npm run typecheckis clean andnpm testpasses 352 of 352. One new test checks that a create without--depthsends onlyurland prints a crawl with nodepth. Another checks thatcreateCrawlleavesdepthout when unset. A third counts an unset--max-pagesas 100 againstmax_pages_per_run. The offline half of acceptance check 1 now also creates without--depth, and check 21 expects 100.How to try it
The second command sends no
depth, and once the API change is live the crawl comes back with none.Provenance
depthonly when set, the way the command already treats--max-itemsand--max-pages.DEFAULT_MAX_PAGEScopies the API default for the local policy check, so it follows the API to 100.Review
Human must verify:
Record owed
None in this repo. The changelog entry for the new defaults ships with the API.
Deviations
max_pages_per_runpolicy below 100, a create without--max-pagesis now refused locally withPOLICY_LIMIT_EXCEEDED, since the API would fetch up to 100 pages.READMEand skill examples keep--depth 1: it is the cheap advice, and the acceptance check that runs theREADMEexamples depends on it.