Repository navigation
test(crawl): add a first-install acceptance test for the Crawl client - #35
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.
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.
StefanoGuerrini
marked this pull request as ready for review
October 12, 2026 14:03
StefanoGuerrini
force-pushed
the
feat/crawl-client-v2
branch
from
October 12, 2026 14:09
5b18043 to
3522a63
Compare
StefanoGuerrini
force-pushed
the
test/crawl-acceptance
branch
from
October 12, 2026 14:09
a6ad703 to
2767166
Compare
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-client-v2): it adds a test harness only, so the feature PR stays focused.Summary
This PR adds
acceptance/crawl/, a first-install acceptance test for the Crawl client. It installs the release artifact the way a new user does. Then it follows the Crawl quickstart inREADME.mdand checks every Crawl feature against the live API. It writes one markdown report.What a run does
acceptance/crawl/run.shruns these steps:REFwhen you set it.python -m build.README.mdas written. The report lists each change the cost rules need.mypy --strictcheck that reads the package as typed. Each check writes one JSON result with statusPASS,FAILorSKIP.acceptance/crawl/out/crawl-first-install-report.md, then makes sure the key is in no file underout/.The checks cover create, idempotency, wait, get, list, results, content, download, stop, error codes, naming, documentation copy, failed crawls and documented defaults. Some checks point the client at a small local server, so they give the same result on every run.
acceptance/crawl/README.mdlists every check with its expected result.CRAWL_URLhttps://www.scrapingcourse.com/ecommerce/CRAWL_INCLUDE/product/CRAWL_API_BASEhttps://api.zenrows.com/v1REFnode:20,python:3.12-slim,golang:1.25, pinned by digest inversions.envOUT_DIRCost
A run starts five crawls, each with
depth1 andmax_pages10 or less. On the defaultCRAWL_URL, a run fetches about 10 pages, and at most 50. Check 9 can start a sixth crawl, which adds at most 10 pages. At most 2 crawls run at the same time, under the account limit of 3 active jobs. Do not run two copies against one account at the same time.Packaging
pyproject.tomlexcludes/acceptancefrom the sdist, so the harness never ships in the package.How to try it
Run it from the repository root. It needs bash, git and Docker.
Without
ZENROWS_API_KEY,run.shstops and asks for it. The report shows a verdict, a feature matrix and one finding perFAIL. The script never prints the key.Squash-merge with the title as the message: the branch commits carry trailer lines that should not land.