Repository navigation
Exit 5 for content never obtained, exit 2 for usage errors, CSV formula guard, umask-respecting outputs - #4
Merged
Merged
Conversation
…la guard, umask-respecting outputs - finish_run: zero rows exit 4 only for stop reasons meaning the listing was read to its end; any other reason (failed page, item with no item, profile never parsed, a reason added later) exits 5. - URL/host/robots/--mode/--from refusals are argparse errors (exit 2), checked in parse_args before a browser starts; run() raises a SystemExit(2) subclass. - Atomic writer: new files 0o666 & ~umask, existing files keep their mode. - CSV: text cells starting = + - @ TAB CR LF get a leading apostrophe after list/dict serialisation; csv_cells_escaped recorded in the sidecar. - Selenium: typed --cdp-endpoint exits 2; one from .env is ignored with a notice. - scan_secrets --worktree reads untracked, non-ignored files, skips pyvenv.cfg directories, fails when it read nothing. - pyppeteer CDP connect bounded at 30 s. - Private section references and sibling-repo pointers removed; suite guard added. requirements-playwright aligned with the extra; .gitignore covers non-.html dump names. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tions A page that stayed walled bought one solve per exit (2 by default, N+1 with --proxy-block-retries N). solve_wall, the only purchase point shared by all three engines, now draws from a per-URL allowance (page_flow.SOLVES_PER_PAGE) checked before buying; rotation re-fetches the page without resetting it. Refusals are counted in transport_facts.solves_refused_by_budget. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Missing TWOCAPTCHA_KEY, AVITO_PROXY or AVITO_BROWSER_ACCOUNT_ID now fails the job with an error naming each one; a live run that does not exit 0 is red. The data check requires sku, url and title on every row instead of a seller-name share, which depends on the category's private/company mix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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@5426c9f(v1.0.2). Every fix has a planted-fault control that turns the offline suite red on the named check.Behaviour changes (lead the next release notes)
finish_runreturned 4 for every unblocked zero-row run; a probe gavepage_load_timeout/pages_failed/no_profile/transport_error → 4, and a fake-driver item run on a page with no item exited 4. Now onlycompleted / pagination_exhausted / no_new_products / single_page_modekeep 4; any other reason (including one added later) is 5. Blocked stays 3.--mode, two URLs outside item mode and an unreadable--fromwereSystemExit("msg")(exit 1;--frommissing was a traceback). Now checked inparse_argsviaparser.error, andrun()raises aSystemExitsubclass with code 2.0600(mkstemp + replace). New files now get0o666 & ~umask; an existing file keeps its mode (rows, sidecar, attempt sidecar).--proxy-block-retries 1, 4 at 3.solve_wall(the only purchase point; all three engines share it) now draws from a per-URL allowancepage_flow.SOLVES_PER_PAGE = 1, checked BEFORE buying, not reset by retries or rotation. Refusals are counted astransport_facts.solves_refused_by_budget. Same probe now: 1 solve, rotations still happen, exit 3. Note: the README's measured case where a fresh exit's second token was accepted would now end blocked; that is the family rule.AVITO_CDP_ENDPOINTfrom.envmade every Selenium run exit 5transport_error. A typed--cdp-endpointis now exit 2; one from the environment is ignored with a notice.Other fixes
= + - @ TAB CR LF(after list/dict joining) get a leading'in CSV only; numbers untouched; JSON unchanged;csv_cells_escapedin the sidecar (callerextrastays undertransport_facts, not overwritten).tools/scan_secrets.py --worktree: also reads untracked non-ignored files, skips dirs holdingpyvenv.cfg, prints the file count, fails when it read 0 files (was "clean" with no.git).asyncio.wait_for).§10,§21in 4 files) and sibling-repo pointers in comments removed; new suite guard fails on such citations (tokens assembled so the guard does not match itself). Release notes v1.0.0–v1.0.2 checked: none contained citations.requirements-playwright.txt→playwright>=1.44(matches the extra);.gitignorecovers*_p[0-9]*.txt/.htmdumps.Canary (owner request 2026-10-15)
TWOCAPTCHA_KEY,AVITO_PROXYorAVITO_BROWSER_ACCOUNT_IDfails the job with::error::naming each one. A live run that exits anything but 0 (3 blocked, 4/5, 6) is red. The data check no longer asks for a ≥50% seller-name share, which depends on the category's merchandising; it requiressku,urlandtitleon every row, alongside the existing checks (≥100 rows, complete, ≥3 pages, ≥90% priced, region_slug, unique sku and page+position).test_canary_cannot_go_green_without_scraping, with 3 controls, each RED on its named check: an error downgraded to a warning, the rc gate disabled, the sku/url/title loop emptied.Evidence
requirements.txt):smoke_test.py→ 576 checks (after the budget commit; 570 before), 0 failed, 6 skipped (engines absent). Per engine venv (no browser download): selenium 587/0 failed, pyppeteer 585/0, playwright 587/0, each skipping only the absent engines.ci_checks.py --help-check / --secret-check / --sample-checkok.PYTHONDONTWRITEBYTECODE=1,__pycache__removed per run), all RED on the named check, green after restore: exit-5 rule removed; chmod removed; existing-mode read removed; CSV apostrophe removed; sidecar count removed;UsageErrorcode reverted to message; parse_args URL check removed; env endpoint not dropped; typed endpoint not refused; untracked files not scanned; venv skip removed; zero-file guard removed; a§10re-planted in a comment; budget check disabled,_spend_solvecall removed, allowance not kept in facts (all three RED on "one paid solve for one page", got 4 want 1).Not changed (and why)
--proxy-rotate per-pageimplement-or-remove (F7), fingerprints claim / unusedfingerprint_client.py(F8; "fingerprints" left in the description) — marked owner decisions in the audit.page.authenticatefor a local authenticated proxy (F10) — needs a live check with a proxy; only the connect timeout was added.not_foundstate/exit for HTTP 404 items — open question; it now exits 5 under the general rule.🤖 Generated with Claude Code