Repository navigation
Keep good output on a failed write, survive blocks without a proxy, stop on a 404 - #12
Merged
Merged
Conversation
…top on a 404 - Selenium and pyppeteer no longer crash (exit 1) on a blocked page or a dead exit when no proxy pool is configured; they re-fetch like Playwright. - JSON, CSV and the sidecar are written atomically with umask-correct modes; CSV cells shaped like formulas are escaped (csv_cells_escaped). - The HTTP status reaches the classifier; BBB's own 404 is a terminal not_found (also recognised by its title for Selenium). - A BBB_URL from the environment no longer blocks --text/--location. - Counting/waiting flags reject negative values with an argparse error. - The credential scan judges exclusions relative to the repo, fails on a 0-file scan, and reads .env* copies and .json/.csv/.html files. - More dump/capture shapes are gitignored; stale help/docstrings fixed; comments state their reasons instead of citing private documents. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without BBB_CDP_ENDPOINT the profile job now fails with an error naming the secret instead of skipping green, and exit 3, exit 5 or zero rows are red in both jobs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jehrr
marked this pull request as ready for review
October 15, 2026 21:14
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
b98079a(main unchanged since; no open PRs).What changes for a user
pool.current/pool.advanceonNone: traceback, exit 1, and rows from earlier pages lost. Both now re-fetch on the same path, as Playwright did. pyppeteer also rotates only for an unusable exit, matching Playwright.write_json,write_csvandwrite_run_metago through one_atomichelper: temp file in the target's directory, flush + fsync,os.replace, unlink on error,newline=""kept for CSV. A new file gets0o666 & ~umask; an existing file keeps its mode.= + - @ TAB CR LFget a leading'in CSV only; numbers and JSON untouched;csv_cells_escapedis merged into the sidecar under the caller'sextra.classify; BBB's 404 (by status, or by its own<title>for Selenium, which has no status) is a newnot_foundstate: no wait, no retry, not blocked,stop_reason: "not_found"(exit 5 with no rows). A marker-less 403 now classifies as blocked. The smoke check that pinned the 404 asunknownis rewritten, with the reason.BBB_URLin.envno longer blocks--text/--location. The typed--urlis captured beforeenv_config.apply; an environment URL is a default the query flags replace. A typed--url+--textis still exit 2..env.exampleshipsBBB_URLcommented out.--pages,--concurrency(≥1),--delay,--retry-delay,--proxy-block-retries(≥0) in all three engines;scraper_api_client.py --retries/--retry-delay(≥0, 0 stays legal there),--timeout(≥1). argparse names the flag.path.relative_to(REPO).parts(a clone under avenv/ancestor scanned 0 files and said ok); a 0-file scan fails;.env*copies and.json/.csv/.html/.toml/...are read. The pyvenv.cfg detection and allowlists are unchanged.*.page[0-9]*,/*.html(exceptlanding.html),live/ out/ output/ runs/ results/ tmp/ scratch/ dumps/.--allow-emptyhelp no longer claims "exit 4 either way"; stale "stream reset / no challenge ever observed" text in--solve-captchahelp and docstrings;ci_checks --sample-checkno longer counts a nonexistentoriginal_price; ashop_ratingexample.§N), with the rule stated in place; a new suite guard (tokens assembled from pieces) fails if they return. Release notes v1.0.0/v1.0.1 contained none, so none were edited.Evidence
ci_checks.py --allclean._fetch_one_pageof all three engines with the driver library stubbed (so they run in the core-only CI job too): blocked page and dead exit withpool=None, served 404 fetched once, status 404 reaching the classifier; realparse_argsof all three engines for the env-URL and negative-flag cases; injected write failures; modes under umask 022/002/077 and an existing 0640 file.PYTHONDONTWRITEBYTECODE=1,__pycache__removed each time), all 16 went red on the named check and green on restore: atomic write, chmod removed, CSV escape off, extra-merge order reversed, Selenium pool guard, pyppeteer load guard, not_found off, Playwright status dropped, typed-URL logic off,--pages type=int, API--retries type=int, absolute-path exclusion, zero-scan guard,.env*scan, a planted citation,*.page[0-9]*removed.Not changed (and why)
--allow-emptyoverwriting good output on a blocked/failed run (F10), refusing vs warning for--fingerprint/--concurrencywith--cdp-endpointand the README's "refused" wording (F11), version/tag1.0.2(F14), profile canary exit-5 policy (F16), shared fetch loop (T10): owner decisions.🤖 Generated with Claude Code