Repository navigation
Exit 5 when a page never arrives, one paid solve per page, Scraper API payload fixes - #3
Merged
Merged
Conversation
…I payload fixes - A run that never obtained its page exits 5, not 4; a 404/410 address is stop_reason not_found (was blocked in Playwright, empty in the mirrors); pyppeteer passes the HTTP status to the classifier. - Scraper API client: waitFor sent as an object, target status read from http_code, x-debug logged with credentials masked. - One paid captcha solve per page across retries and exit rotations, in all three engines. - Output files take the umask mode (existing files keep theirs); CSV cells that would run as a formula are escaped, counted in the sidecar. - Typed --category/--site-locale beat an environment GIVENCHY_URL; negative delays and counts are usage errors. - .env* ignored; credential scan judges repo-relative paths, recognises a venv by pyvenv.cfg, reads JSON-escaped key fields, fails on 0 files. - Canary fails instead of skipping green on a block. - Issue templates, CONTRIBUTING, review prompt and log text describe this site; two helper scripts for another site removed; private-note citations replaced by the rule in plain words, with a guard. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jehrr
marked this pull request as ready for review
October 15, 2026 13:00
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.
Fixes from the 2026-10-14 family-rules audit of
main@59227a0.What changed, with evidence
waitForis now sent as an object. The status comes fromhttp_code; the API'sstatusverdict is only logged.x-debugis redacted before it is logged.fetch_htmlwithrequests.poststubbed: the payload'swaitForis a dict,{"status":"warn","http_code":403}gives 403 (it used to raiseTypeError), and the plantedws://u:SECRET@…is absent from the logfinish_run: zero rows, not blocked and not complete gives exit 5. A complete reason withpages_failedset is now partial.page_load_timeout,proxy_failedand an unnamed reason each give 5. A served empty page gives 4. The old check that pinnedstop_reason="empty"→ 4 (a reason no engine sets) now usessingle_page_mode, and a comment explains the change.page_flow.SolveBudget(SOLVES_PER_PAGE = 1) is created once per page before the exit-rotation loop. Every call site checksremaining(), and the handler callsbudget.spend()beforesolve_recaptcha()._atomic_writechmods the temp file beforeos.replace._csv_escaperuns after list joining, touches strings only, and mergescsv_cells_escapedunder the caller'sextra..gitignore.env*plus!.env.examplegit check-ignore:.env.bak,.env.localand.env.saveare now ignored, and.env.exampleis still committablerelative_to(REPO).parts. A venv is detected bypyvenv.cfg, andKEY_SHAPED_FIELDtolerates\". The scan fails when it scanned 0 files.venv/ancestor is now scanned,myenv/pyvenv.cfgis skipped, an escapedapiKeyfield is reported, and an empty tree failstyped_urlbeforeenv_config.apply. Typed--category/--site-localenow build the URL.GIVENCHY_URLexported,--category skincare --site-locale gbgives/gb/skincare/in every engine. With no flag typed, the environment value is still used.not_foundstate for 404/410, or the site's own error page (pageContext … "type":"error","ns":"error") when no status is available. It is terminal and not retried; the engines stop before parsing, and pyppeteer now passes the status./fr/fr/makeup/lips/and a made-up/us/makeup/<x>/both return 410 with that page context, and the empty/es/maquillaje/sets-de-regalo/returns 200 with"ns":"category". The trimmed fixture classifies the same as the full capture.tools/waf_probe.shandtools/verify_browser_api.sh; both measured transfermarkt and called--mode market-values. Rewrote the issue-template modes, CONTRIBUTING, the review prompt, the selenium/pyppeteer--concurrencymessage, thescraper_api_clientcoverage log, and thepage_flow/playwrightcomments..sh/.toml/.example. Itsschema.org/Personword could never match because the text is lowercased first; that is fixed.test_no_private_citationsbuilds its tokens from pieces..envinstead of flags::error::.gh repo editVerification
pip checkis clean in each.ci_checks.py --allis green.PYTHONDONTWRITEBYTECODE=1and the cache cleared. Every one turned the suite RED on the expected named check, with no crash, and the restored tree is green. They cover: umask, CSV off, CSV on numbers, extra precedence, the exit-5 rule, pages_failed, waitFor string, status verdict, raw x-debug, the budget call site, a budget reset per exit, the inner budget guard, the no-pool crash, not_found by status / body / engine / sac, typed URL, negative delay, absolute-path scan, venv by name, zero-scan, escaped JSON key,.env*, citation reintroduced, and donor vocabulary.Not changed
page.authenticate, CDPignoreHTTPSErrors) needs a live run through a proxy or CDP endpoint.--pages >1is reported and ignored rather than refused) and F17 (meaning ofscraper_api_client --retries) are owner decisions.[Unreleased]..env*backups are still not scanned, because they are now gitignored and the scan skips ignored files by design.🤖 Generated with Claude Code