Repository navigation
test(crawl): add a first-install acceptance test for the crawl command - #32
Merged
Merged
Conversation
acceptance/crawl/ builds the release artifact from this checkout, installs it in a clean container the way a new user would, and runs every Crawl feature against the live API: README example, create, wait, results, content, download, stop, errors, naming and docs. One JSON result per check and a markdown report land in acceptance/crawl/out/ (git-ignored). It is kept out of the published package.
The naming check now covers content_id, the argument of the content operation, so a client that names it differently fails check 17. The MCP surface calls crawl_content with content_id.
…al before the API as a pass on check 14 Check 9 read content from the crawl check 20 stops; a stop that lands before any page is fetched left nothing to read. It now falls back to a one-item html crawl that runs to the end. Check 14 passes when the client refuses the gated output format before calling the API, as well as on the API's 422.
StefanoGuerrini
force-pushed
the
feat/crawl-command-v2
branch
from
October 12, 2026 14:09
1e0ff65 to
86d3e57
Compare
StefanoGuerrini
force-pushed
the
test/crawl-acceptance
branch
from
October 12, 2026 14:09
92f28e5 to
8cbed3d
Compare
StefanoGuerrini
marked this pull request as ready for review
October 12, 2026 14:23
Contributor
Author
|
Merged into the feature branch with a merge commit. It ships to main with #31. |
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.
Stacked on #31 (
feat/crawl-command-v2).Summary
This PR adds an acceptance test for the
zenrows crawlcommand of@zenrows/cli. It installs the release artifact the way a new user does and runs every Crawl feature against the live API. It stays in its own PR, so the feature PR stays focused.What it does
acceptance/crawl/run.shbuilds the release artifact from this checkout:npm install -gof thenpm packtarball. It installs the artifact in a clean container with digest-pinned images. The container gets no source, no build caches and no tokens, and it gets the key by name only. The run follows the read-me (README) Crawl quickstart, then runs checks 1 to 21 and the CLI extras. Each check writes one JSON result with statusPASS,FAILorSKIP. A markdown report lands inacceptance/crawl/out/, which git ignores. Thefileslist inpackage.jsonkeeps the harness out of the published package.The CLI extras check that every subcommand prints JSON with
--json. They check that Ctrl-C duringcrawl waitprints the resume hint and exits 130. They also check that the CLI rejects--waitand--htmlas unknown flags.acceptance/crawl/README.mdgives the expected result of each check, the pinned versions, and how to read the report.Three checks changed after the first commit:
--output-format json. A refusal before the API (INVALID_USAGE) now counts as a pass, as does a 422 (CRAWL_INVALID_REQUEST).content_id.Cost and safety
Every crawl uses
depth1 andmax_pages10 or less. A run starts five crawls, and check 9 can start one more. A run has at most 2 crawls active at a time, because an account has 3 active jobs, shared with Batch. If a create gets a 429, the run waitsRetry-Afterand tries again. A clean-up step stops every crawl the run started, also when a check fails or on Ctrl-C. The script never prints the key. Before it ends, it scans every file underout/for the key.How to run it
The host needs bash, git and Docker, and a key with Crawl access.
The report is
acceptance/crawl/out/crawl-first-install-report.md. Its verdict is "ready" when it has no blocker or major finding.Squash-merge with the title as the message: the branch commits carry trailer lines that should not land.