Repository navigation
Behaviour changes from the 2026-10-14 audit fixes:
- A URL Amazon answers with "page not found" (HTTP 404) now exits 5 with
stop_reason: not_found. It used to be read as the 503 throttle page
(both carry the same "automated access" comment), retried, rotated and
reported as blocked, exit 3.- CSV cells that begin with
=,+,-,@, a tab or a line break get a
leading apostrophe (CSV only; numbers and the JSON are unchanged). The
sidecar'scsv_cells_escapedsays how many.- At most one paid captcha solve per page, across all retries and proxy
rotations. With a 3-exit pool one page could buy three.- Newly rejected flag values: a negative
--proxy-block-retriesin all
three engines; inscraper_api_client.pya negative--retriesor
--retry-delay, and--timeoutbelow 1. Each is now exit 2.- Output files are now written atomically and keep the permissions plain
open()gave them: new files follow the umask, an existing file keeps its
mode.
Two changes here affect an existing user before anything else does.
A run that never got its page now exits 5, not 4. Exit 4 has always
meant "ran fine, found nothing", and a navigation timeout or a dead proxy
returned it too — so a pipeline could not tell an empty search from a
transport failure, which want opposite responses. If you branch on exit
codes, 5 is now also "we never obtained the page" and not only "the
Scraper API errored". A run that gathered rows and THEN timed out is still
exit 6, unchanged.The
variationscolumn is gone, replaced byparent_asin,
variation_dimensions,variation_countandselected_variation. It read
the rendered size/colour picker and was null on every row of every run —
measured on three live/dp/pages on 2026-09-21, where both of its
selectors matched zero elements on all three. If you parse--mode product
output by column name, read the four new ones; if you read it positionally,
the row is four columns longer.
Fixed
-
Output writers truncated in place.
write_json,write_csv,
write_run_metaandwrite_last_attemptopened their target with"w", so
a failure mid-write left a truncated file (a good 703-byteout.jsonbecame
5 bytes of invalid JSON). They now write a temporary file in the same
directory, fsync it and rename it over the target; a failed write leaves the
previous file byte-identical and no temp file behind. -
CSV formula injection. Third-party text (titles, sellers, bullets, review
bodies) reached the CSV as-is. See the blockquote above. -
No captcha solve budget. The solve sat inside the per-exit loop with
nothing counting it.page_flow.SolveBudget(one per page) is now asked
before every purchase in all three engines. -
Amazon's 404 read as a throttle. The Playwright and pyppeteer engines now
pass the navigation's HTTP status to the page classifier, which has a
not_foundstate; Selenium, which has no status to read, recognises
Amazon's own (English) not-found page. -
The credential scan skipped everything when the clone lived under a
directory namedvenvor.git, because it tested the absolute path. It now
tests the path inside the repo, and fails if it scanned no files at all. -
A
{...}placeholder copied from the docs read as configured in.env
(ws://{login}-zone-…). Any value still containing one now reads as unset,
with a warning that names the variable, not the value. -
README: the flags the engines do not share are listed, instead of a claim
that all three take the same flags; the offline suite now checks that list
in both directions. -
Removed references to documents outside this repository from comments and
the changelog, and a stale comment about a--mode variationsthat does not
exist, plus the unusedUNIQUE_BY_SKU_MODESconstant. -
The Scraper API path (
scraper_api_client.py) failed whenever a wait flag
was given, and never saw the target's status. Measured 2026-09-23 against
the live/tasks/syncendpoint:waitForsent as a JSON-encoded string
(what this client sent) is answered HTTP 422 "params.waitFor must be an
object" and is still billed ($0.0005); sent as an object it is answered
HTTP 200. It is now an object. And the response'sstatusis the API's own
verdict ("success"), while the target site's HTTP code ishttp_code— the
client loggedstatus, so a target 403/503 read "success" in the log (this
engine logs the status and does not classify on it). It now reads
http_code, falling back tostatusonly if that is an integer. After the fix, one live call (--wait-text resultson the README's search URL) answered HTTP 200, upstream 200, 16 rows, status complete. -
The issue templates, TROUBLESHOOTING, SECURITY and
diff_runs.py
describe Amazon. They had been written for another site: the bug-report
tips sent a reader to Farfetch's/shopping/kids/items.aspxhub "which carries no product
JSON-LD", the example wrote--out girlsand expected "96 products"; the
site-change template said the parser "tries JSON-LD first" and asked for a
JSON-LD dump; TROUBLESHOOTING's 0-rows table named Farfetch's
-item-<digits>.aspxlinks and hub; SECURITY named Akamai;diff_runs.py
describedsource_changedas "DOM-corrected versus raw JSON-LD" and its
examples usedgirls_clothing. Amazon publishes no JSON-LD, so all of
these now describe the data-attribute anchors, the/dp/{ASIN}fallback,
AWS WAF, theoffscreen/split/detailprice sources and this README's
measured 16–30 tiles per search page. -
The Scraper API's
x-debugresponse header is redacted before it is
logged.SECURITY.mdnames that header as one of three places
credentials reach a log unmasked, and the client logged it whole: the API
echoes back the task it ran, so a run driven through a credentialed CDP
endpoint put that endpoint's username and password into the log. Both
patterns are global, because a masker that handles the first occurrence
prints the password the other four times and looks like it is working. -
landingAsinandparentAsinare read as an adjacent pair.
parentAsinalso occurs about 11 KB earlier on a detail page, in an
unrelated object, so reading the first occurrence of each was correct on
all three measured pages by luck rather than by structure.
Changed
- A page that was never fetched reports
EXIT_FETCH_FAILED(5) instead of
EXIT_NO_PRODUCTS(4) when the run holds no rows. A live run through a
misconfigured proxy failed to load for 60 seconds and exited 4, telling a
caller the catalogue had been read and was bare. The precedence is
unchanged otherwise: a named challenge still outranks it (3), and rows plus
a later failure is still a partial run (6). 5 rather than a new code
because the family's contract already reserves it for a transport failure,
every repo in the family spells 4 the same way and none defines a 7 — a new
code here would make this the only one whose callers need a per-repo table. - The sidecar counts
recordsand says what one record is. A reviews run
recorded"products": 13for thirteen reviews of one product, which reads
as thirteen products to anything summing the field.recordsis the row
count andrecord_typeisproductorreview, derived from the row
class so a new mode cannot forget to declare it.productsis still
written and still identical, but is deprecated — readrecords. save()names what it saved. "Saved 13 products" for thirteen reviews
was the same wrong claim in the place a human reads; a single row is now
"1 product" rather than "1 products".- Out-of-range numeric arguments are refused (exit 2) rather than acted
on.--retries 0was the worst: the navigation loop is
range(1, retries + 1), so it never ran, and becauseload_failedis
pre-set to False just above it nothing was recorded as wrong either — the
run classified a page it had never fetched and reported success.--pages 0
fetched page 1 anyway (it is fetched outside the page loop) and produced a
sidecar sayingpages_requested: 0againstpages_completed: 1. A negative
delay reachedtime.sleepand became a traceback. The bounds live in one
shared, pure helper, and all three engines consult it, so they cannot
disagree about the same input.--concurrencywas NOT one of these: the
engine that implements it already clamped it. - The Scraper API client goes through the shared
finish_run. It called
saveand hand-spelled its own 3 and 4, so a run through it wrote no
run-metadata sidecar at all — the rows were readable but the status, stop
reason and marketplace were not. It is still not a fourth engine: one page,
no pagination, and success reportssingle_page_mode.EXIT_API_ERRORis
now an alias of the shared constant rather than a second spelling of 5.
Removed
- The
variationscolumn. A column that is null on every row of every
run is worse than a missing one — the same rule that removedprimefrom
this schema, with the measurement written down. Both of its selectors
(#twister .a-button-text,#twisterContainer .a-button-text) matched
zero elements on three live/dp/pages on 2026-09-21. Replaced, not
repaired: see Added.
Added
- Four variation columns on a
--mode productrow, read from the detail
page's own variation state rather than from the rendered picker:
parent_asin,variation_dimensions(the dimensions as the site labels
them for a human, in the site's own order),variation_count(the number
the page itself states, so it can be compared against what was
extracted — the parser warns when they disagree) andselected_variation
(which variant this row is). Measured 2026-09-21: 1, 776 and 9 variants on
the three pages tested, matching the site's stated totals exactly.
The container that replaced the old one is an empty mount point in the
served HTML, so it is only populated after the page's own JavaScript runs;
the state object is in the served bytes either way, which is why it is what
gets read. Scalars rather than the whole variant table because one measured
product publishes 776 variants, and 776 objects in a CSV cell is not a
column anyone can use. <out>.last_attempt.json, written on every run. A failed run
deliberately writes no<out>.meta.json— it also does not overwrite the
previous run's output, and a"failed"sidecar beside good data would
contradict it — which until now left the caller nothing at all to read, so
the exit code was the whole story. A separate filename lets the last good
sidecar and the most recent attempt both be true. Rewritten on success too,
so it is never a stale relic of an old failure.- A check that binds every call into a shared module against the callee's
real signature, which this repo did not have. It catches
two things nothing else here can: a call whose arguments do not fit the
signature, and a call to a name the shared module does not define at all —
both of which reach a live run as a crash on the first fetch while import,
--help,compilealland the undefined-name walk all stay green. It skips
calls using*args/**kwargsrather than guessing, treats a locally-bound
name as shadowing a same-named module, and asserts it found calls to bind
at all so it cannot pass by scanning nothing. Verified by control. - The first variation fixture this repo has had — 1.5 KB carved verbatim
out of a 992 KB live capture and verified to produce byte-identical columns
to the untrimmed page before being committed. There was no twister fixture
at all, which is how the selectors could die unnoticed. Its values are
pinned, not merely counted.
CI
-
A variation canary, reading one real multi-variant product page and
asserting all four columns are populated, that the count is not 1 on a
product picked for having many, and that there is one selected value per
dimension. A floor rather than the measured 776, because a catalogue
legitimately changes size. Dispatch-only until someone runs it from the
default branch and sees which way it goes: a/dp/page was served to a
plain HTTP client from a datacenter address on 2026-09-21, which is a
reason to expect it to pass from a runner and not evidence that it does,
and an unverified live job on a schedule is how a badge goes permanently
red. The promotion steps are written beside it. -
The Python embedded in the workflows' heredocs is compiled by the offline
suite. Both canary jobs assert their results with inline Python, and
nothing checked those bytes until a runner executed them — a syntax error
there costs a full dispatch to discover and, on the scheduled job, reads as
a site-side failure rather than a typo. Four blocks across the two
workflows. Done by dedent rather than by parsing YAML, because PyYAML is
not a dependency of this project. -
The Docker image is now built in CI. Nothing built it before, which is
exactly how three repos in this family shipped an image that died with
ModuleNotFoundErroron every invocation,--helpincluded — the
Dockerfile COPYs an explicit list, which is right, and the list fell behind
the imports. Four steps, each for a distinct failure: the image builds; its
entrypoint runs (theCMDis--help, the invocation a missing module
breaks); Chromium really launches, rather than theplaywright install --with-depslayer merely exiting 0; and the image contains no.env, no
test suite and no fixtures, because a.envbaked into an image is a
credential published to everyone who can pull it. -
claude.ymlpins the CLI to thestablechannel. The fix had already
landed inclaude-code-review.ymlin this repo and never reached its twin,
soclaude.ymlstill let the action installlatest— the release that on
2026-09-08 installed no binary where the action looks, failing every run
with "Claude Code native binary not found". The channel is pinned rather
than a version, so a fixed upstream release needs no edit here. -
SECURITY.mdsaid this project has no releases or version tags; it has
both. "Supported versions" now names the latest release andmain.