Repository navigation
Atomic output writes, CSV formula guard, one paid solve per page, 404 is not a block - #20
Merged
Merged
Conversation
… is not a block
- Output writers (incl. the sidecar and last-attempt file) write a temp file
beside the target, fsync and rename; modes follow the umask, existing files
keep theirs.
- CSV cells beginning with = + - @ TAB CR LF get a leading apostrophe (CSV
only); csv_cells_escaped in the sidecar, under the caller's extra.
- page_flow.SolveBudget: one paid captcha solve per page across retries and
rotations, asked before every purchase in all three engines.
- HTTP status reaches the classifier (Playwright, pyppeteer); new not_found
state. Amazon's 404 page was read as the throttle page and reported exit 3.
- Credential scan judges exclusions on the repo-relative path and fails on 0
files scanned; braced {...} .env values read as unset; negative
--proxy-block-retries and negative scraper_api_client counters rejected.
- README lists the engine-only flags (checked both ways); references to
documents outside the repo removed; stale comment and unused constant gone.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The daily canary already runs ungated from a bare runner and fails on exit 3/4/5/6 or zero rows (last 10 scheduled runs green; 2026-10-14: 77 rows, 3/3 pages, complete). Two comments still recommended a green ::notice:: skip if runners were ever refused; they now say to require AMAZON_PROXY and fail with an ::error:: naming it instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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 audit of
main@62a92f8.Problems and resulting behaviour
write_json/csv/run_meta/last_attemptopened with"w"; a failed write left a 5-byte invalidout.jsonover a 703-byte good oneos.replace, unlink on error; new file0o666 & ~umask, existing file keeps its mode=HYPERLINK(...),-5,@SUMwritten raw= + - @ TAB CR LFget'in CSV only; numbers and JSON untouched;csv_cells_escapedin the sidecar, merged under callerextrapage_flow.SolveBudget(1/page) asked before every purchase, all 3 engines, both solver call sites each; not reset on rotation: 1 solve/dp/B0DEADDEAD, HTTP 404, 2.3 KB) carries the throttle page's "automated access" comment, so it was classified throttled → retried → exit 3 blockedgoto()status; new terminalnot_foundstate (404/410 or the page's ownalt="Sorry! We couldn't find that page), not retried, not rotated, no solve,stop_reason: not_found, exit 5…/venv/r:0 files scanned, nothing credential-shapedpath.relative_to(REPO).parts; 0 files scanned is now a failurews://{login}-zone-…read as configured{...}reads as unset; warning names the variable only--proxy-block-retriesmade the per-exit loop run 0 times; scraper_api_client accepted negative--retries/--retry-delay(negative delay →time.sleeptraceback after a billed attempt).gitignore, CHANGELOG; donor repo named incaptcha_solver.py; stale--mode variationscomment; unusedUNIQUE_BY_SKU_MODESAlso removed an accidentally duplicated "CI" bullet in
[Unreleased].Evidence
pip checkclean, that engine's group ran). Playwright venv (no browser download): green, including the new behavioural checks that drive_fetch_one_pagewith a faked page and a counting solver (1 solve over 3 exits; 404 →not_found, no solve, also with no pool).ci_checks.py --allgreen (35 files scanned).PYTHONDONTWRITEBYTECODE=1, each RED on the named check (18/18): writer opening its target directly; flat 0644; missing chmod; CSV escape removed; escape before list join; extra overwritten by writer stats; Playwright amazon solve unguarded (behavioural check bought >1); budget created per exit (static check; behavioural check crashes); Selenium reCAPTCHA unguarded; pyppeteer status dropped; not_found check removed; scan on absolute parts; braced placeholder accepted; negative block retries accepted; scraper_api negative retries accepted; private citation in README; section-sign reference in code; undocumented engine flag./dp/and a search page classifyokwith the new marker.Canary (owner request 2026-10-15)
Before:
canary.ymlalready runs ungated, daily, from a bare GitHub runner with no secret and fails on exit 3/4/5/6, on zero rows and on parser-level floors (rows, price share, field coverage, pages, status). Last 10 scheduled runs green; the 2026-10-14 artifact holds 77 rows, 3/3 pages,complete. No repo secret exceptCLAUDE_CODE_OAUTH_TOKEN;AMAZON_PROXYis optional and not set.After: only comments changed — two comments (canary.yml variation job, weekly.yml header) recommended a green
::notice::skip if runners were ever refused; they now say to requireAMAZON_PROXYand fail with an::error::naming it. Dispatched on this branch: https://github.com/2scraper/amazon-scraper/actions/runs/38694465697 — success, live-run 73 rows / 3 pages / complete, variation canary 1 row complete (csv_cells_escaped: 0in both sidecars).Not changed
gh release edit, the rest is byte-identical. v0.1.0–v0.1.2 had none. Released CHANGELOG sections: only citation removals.--fingerprint/--locale: documented, not added (owner decision).🤖 Generated with Claude Code