Skip to content

Three inherited defects, found while auditing a new sibling repo - #7

Merged
jehrr merged 1 commit into
mainfrom
fix-inherited-defects
Sep 10, 2026
Merged

jehrr merged 1 commit into
mainfrom
fix-inherited-defects

Conversation

@jehrr

@jehrr jehrr commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Found by auditing tokopedia-scraper against the family notes, then verified here before patching.

  1. --fingerprint failed on every invocation. The engines' --fp-tags default was Windows,Chrome,Desktop, which the fingerprint API rejects with HTTP 400 — while fingerprint_client.py's own --tags help has always said ONE OS-family tag. Measured against the live API: Windows succeeds; Windows,Chrome,Desktop, Chrome and Desktop each 400. Present in all four repos in this family; each gets its own branch.
  2. A copied .env.example read as configured. The placeholder check was a literal set, so it missed the two credentialled URLs documented with {braces}. cp .env.example .env then connected to cb.2captcha.com with {login}-zone-… as its username and got a 401. mediamarkt-scraper has the same hole; amazon and farfetch do not use braced placeholders and are unaffected — checked, not patched blind.
  3. RETRY_ON_BLOCKED was a policy nothing enforced. No engine read it; all three computed their budget from BLOCK_RETRIES_WITHOUT_POOL alone, so setting it False changed nothing.

All three are pinned by checks. 581 offline checks green, credential grep clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_0193w6TZpMqmbfERNZAGdtv3

None of these is Etsy-specific; all three came from the shared core and
were found by auditing tokopedia-scraper against the family notes, then
checked here before being patched.

1. --fingerprint FAILED ON EVERY INVOCATION. The engines' --fp-tags
   default was "Windows,Chrome,Desktop", and the fingerprint API rejects
   it with HTTP 400 ("Request parameters are invalid") — while
   fingerprint_client.py's own --tags help has always said ONE OS-family
   tag, not a list, and that Chrome/Desktop/Mobile are each rejected. The
   engines' default contradicted the client's documentation.

   Measured against the live API on 2026-09-10:

       Windows                  OK
       Windows,Chrome,Desktop   400
       Chrome                   400
       Desktop                  400

   This is the same root cause as the "documented --tags example returns
   400" defect the family notes already record — that fix reached the
   client's docstring and not the engines' default. Present in all four
   repos in this family; each is being fixed on its own branch.

2. A COPIED .env.example READ AS CONFIGURED. The placeholder check was a
   literal set, so it caught `your_2captcha_api_key_here` and missed the
   two credentialled URLs, which .env.example documents the way the vendor
   does — with the parts you fill in in braces:

       ws://{login}-zone-scraping_browser-…-pid-{profileId}:{password}@…
       http://{user}:{password}@na.proxy.2captcha.com:2334

   So `cp .env.example .env` and a run connected to cb.2captcha.com with
   the string `{login}-zone-…` as its username and got a 401 — a confusing
   failure a long way from its cause, which is exactly what the credential
   rule exists to prevent. Any `{…}` left in a value now reads as unset,
   while ETSY_URL (no credential, a working default) stays usable.

   mediamarkt-scraper has the same hole. amazon-scraper and
   farfetch-scraper do not use braced placeholders and are unaffected —
   checked rather than patched blind.

3. RETRY_ON_BLOCKED WAS A POLICY NOTHING ENFORCED. A constant with a
   paragraph of justification that no engine read: all three computed
   their budget from BLOCK_RETRIES_WITHOUT_POOL alone, so setting it False
   changed nothing. Same defect as dead code that looks load-bearing. Now
   consulted by all three.

Each of the three is pinned by a check, so none can come back quietly.
581 offline checks, all green; the credential grep is clean.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0193w6TZpMqmbfERNZAGdtv3
@jehrr
jehrr merged commit 7a5e8d8 into main Sep 10, 2026
7 checks passed
@jehrr
jehrr deleted the fix-inherited-defects branch September 10, 2026 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants