Repository navigation
pyppeteer survives a failed load without a proxy; a late challenge can be solved - #6
Merged
Merged
Conversation
…n be solved - pyppeteer: a page that never loads with no --proxy ends as a load failure, not AttributeError/exit 1; rotation only for an unusable exit with a pool. - Solve allowance is claimed immediately before the paid request, so a detection that buys nothing no longer uses up the page's one solve. - Credential scan: skip list tested on the repo-relative path, zero files scanned is a failure, .env* backups/.json/.csv are read. - --pages/--concurrency >= 1, --delay/--retry-delay/--proxy-block-retries >= 0, refused by name in every engine. - .gitignore covers NAME.pageN dumps, root *.html and working dirs. - .env.example ships KOSE_URL commented out. - Canary: the Scraping Browser job fails with an error naming the missing secret instead of passing on a skip; exit 5 over CDP is red. - Comment fixes; no shipped file cites private notes, with a suite guard. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jehrr
marked this pull request as ready for review
October 15, 2026 21:15
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 audit of
main@8b8b839(v0.2.0).Problems and resulting behaviour
puppeteer_scraper.pycalledpool.advance(...)on aNonepool after--retriesfailed navigations, so the run ended with AttributeError and exit 1. It now rotates only on an unusable exit (ERR_PROXY_*) and only whenhas_pool, the same as the other two engines._SolveBudget.spendcounted every call tohandle_captcha_if_present. The pre-classification call, which detects nothing on a normal page, used upSOLVES_PER_PAGE = 1, so a challenge first seen after classification was never solved. Nowhandle_captcha_if_present(..., budget)callsbudget.claim()immediately beforesolve_recaptcha. Detecting nothing, content already rendered, or no key claim nothing. A failed purchase still counts. There is no reset on retry or rotation.build//dist/(med). Exclusions are now tested onpath.relative_to(REPO).parts, and a scan with zero files fails..env*backups,.json,.csv,.toml,.cfgand.iniare read. Thepyvenv.cfgvenv detection is unchanged.page_flow.at_least_one,non_negative_intandnon_negative_secondstypes, used in all four engines and inscraper_api_client.py --retry-delay..gitignoregains*.page[0-9]*,/*.htmland the working-dir kinds. No tracked file becomes ignored (git ls-files | git check-ignore --stdin --no-indexis empty)..env.exampleshipsKOSE_URLcommented out. The env-example checks were adapted and pin this.parser_found_nothingexit comment (it is 5), the donor column names, the "discounted" summary (now "priced"), the Cloudflare wording, the undated 403-vs-residential claim, "304 is all of" now dated, and the old banned product word incaptcha_solver.py.CLAUDE.md/§N/ "playbook" reference was removed from tracked files, including README,--help,.gitignore, workflows and the released 0.1.1 CHANGELOG line. Each rule is restated or the citation dropped. New guard:check_no_citations_of_private_notes(tokens assembled from pieces). The v0.1.1 release title is now "v0.1.1 — audit pass", and one sentence of its body changed; the rest is byte-identical.::error::namingKOSE_CDP_ENDPOINTwhen the secret is absent, and exit 5 over CDP is red, not a warning. The retracted "credentials live about a day" text is removed.smoke_test.py -vcrashed on a non-string detail. Fixed.Evidence
Offline suite results:
No browser download in any of them; run with
PYTHONDONTWRITEBYTECODE=1and__pycache__removed.New checks:
check_a_page_that_never_loads_without_a_proxy_does_not_crash(timeout and dead-proxy errors,pool=None, all three engines),check_the_solve_allowance_is_spent_only_on_a_purchase(late challenge gives 1 purchase, always-challenge gives 1, failing solver gives 1; stub solver, no network),check_the_credential_scan_reads_a_clone_under_any_parent,check_counts_and_pauses_refuse_negative_values,check_no_citations_of_private_notes.Planted-fault controls, each red on the named check and green again after restore:
if load_failed and ...: pool.advancepuppeteer_scraper: a timeout with no --proxy does not raise(AttributeError, as in the audit)playwright_scraper: a challenge seen only after classification is solved(got 0, want 1)path.partsa key planted in a clone under build/ is caught(anddist/)a scan that read no files fails.env*reading removeda key in an untracked .env.bak is caught--pages type=intselenium_scraper: --pages goes through page_flow.at_least_onenon_negative_intaccepting -1non_negative_int('-1') is refusedCLAUDE.mdplanted in READMEREADME.md:342 cites private notes§planted in product_parserproduct_parser.py:361 cites private notesCLI:
http_scraper.py --pages 0giveserror: argument --pages: must be at least 1.--delay -1,--proxy-block-retries -1and--retry-delay -2each givecannot be negative, as do the three browser engines andscraper_api_client.py --retry-delay -1.Not changed, and why
blocked, no throttle state) and F9 (x-debug JSON key fields): marked as owner decisions in the audit, and both unmeasured on this site.[Unreleased].--retries 0,diff_runs: already compliant, verified by the audit.🤖 Generated with Claude Code