Repository navigation
Report parser failures as exit 5, atomic outputs, and a canary that must return rows - #1
Merged
Merged
Conversation
…canary prove the site serves rows - A listing where SHEIN states products but none parse exits 5 (stop_reason parser_found_nothing) instead of 4 "empty". - JSON, CSV and .meta.json are written through a temp file + fsync + rename; new files follow the umask, existing files keep their mode. - CSV cells starting with = + - @ TAB CR LF are apostrophe-escaped (CSV only); csv_cells_escaped is recorded in the sidecar. - Selenium and pyppeteer use the same validators as Playwright: negative retries/delays/budgets are rejected with exit 2. - SHEIN_URL from .env no longer overrides a typed --query/--category. - Canary: the GitHub-runner job expects SHEIN's refusal and fails on anything else; a daily canary-live job needs SHEIN_CDP_ENDPOINT and must return rows. - diff_runs compares JSON and CSV runs of the same rows as equal; .gitignore covers capture directories by kind; tests.yml runs ci_checks.py; README drops the unmeasured "credentials last about a day" claim. - Comments, workflows and the changelog no longer cite private notes; a new offline check keeps them out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jehrr
marked this pull request as ready for review
October 15, 2026 22:20
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
mainat1eb8327(unchanged since the audit).Problems and resulting behaviour
/risk/action/limitand went greencanary-datacentre (refusal expected): exit 3 is a notice; 1/2/4/5 or < 10 rows are red. New dailycanary-live: needs theSHEIN_CDP_ENDPOINTsecret and fails with::error::when it is missing; 3/4/5 or thin rows are red. Assertions moved to.github/canary_assert.pyso they can be run and tested offlinesum=500with no parseable products: exit 4,status: emptystop_reason: parser_found_nothing; a listing stating 0 is still exit 4. Scraper API path now records the stated total toojson.dumpleft[{"partialos.replace, cleanup; json, csv and.meta.json. New file0o666 & ~umask, existing file keeps its mode=HYPERLINK(...),+cmd,@SUM(A1)written verbatimcsv_cells_escapedin the sidecar under the caller'sextra--retries -1(0 navigations, exit 4) and negative delays/budgetspage_flow.positive_int/nonnegative_int/nonnegative_float; exit 2 naming the flag.--proxy-block-retriesvalidated in all three.envURL silently replaced a typed--query dress--query/--categoryis typed; still fills--urlwhen nothing is typed (page_flow.prefer_typed_target, called afterenv_config.apply_envin every engine)canary-cdpwas dispatch-only--allow-emptyrate-limited run recordedstop_reason: blockedrate_limited; README wording matchesdiff_runsJSON vs CSV of identical rows:changed: 3changed: 0--fp-tagshelp said'Windows,Chrome'ONE OS-family tag, e.g. 'Windows'tests.ymlran a narrower inline grep.github/ci_checks.py; the scan refuses to pass after reading 0 filescaptures/a.html, rootdump.htmlnot ignoredcaptures/ dumps/ out/ runs/ tmp/ ...,/*.htmlexceptlanding.html); pinned both ways--pages/--concurrency/--modeRepo description shortened from 29 to 25 words (
gh repo edit).Evidence
.git, no.github).python3 <engine>.py --query x --retries -1->error: argument --retries: must be >= 0in all three engines.ci_checks.py:credential scan passed (43 files);--sample-checkOK.PYTHONDONTWRITEBYTECODE=1, no__pycache__): each fault turned the suite red on the named check, 13 of 13 — parser-failure detection off; rate_limited reason reverted;write_jsonback toopen(..., "w"); flat0o644mode; CSV escape off; housekeeping merged over caller's extra; selenium--retries type=int; typed-target helper disabled; a citation re-added; canary judge excusing exit 4; diff_runs reading raw CSV;captures/removed from.gitignore; tests.yml back to a grep.Not changed
--max-solves): documented design, all call sites checked before purchase (audit L10, owner decision).--cdp-endpoint+--proxyand--scraper-api+ browser flags still warn and drop rather than refuse (L9, low).setUserAgent/ client hints (L4) and the Fingerprint API's current tag rules (L3 beyond the help text): need live/keyed checks.smoke_test.pyremains allowlisted wholesale in the credential scan (L5 remainder).results.sumon a genuinely empty search. The new rule assumes it does not; no empty-search capture exists to check.Needs the owner
canary-livewill be red until aSHEIN_CDP_ENDPOINTrepository secret is added (optionallyTWOCAPTCHA_KEYfor the/risk/challengesolve). That is intended: it is the only job that proves SHEIN still serves rows.🤖 Generated with Claude Code