Repository navigation
Safer output files, a diff that sees article changes, stricter flags, a canary that cannot skip green - #1
Merged
Merged
Conversation
- Output, CSV and sidecar writes are atomic (temp file + fsync + rename), keeping an existing file's mode and giving a new one 0o666 & ~umask. - CSV formula cells get a leading apostrophe; csv_cells_escaped in the sidecar, merged under the caller's extra keys. - PERPLEXITY_URL no longer overrides a typed --discover / --urls-file; .env.example ships it commented out. - diff_runs compares article content (changed) and counters (counters_changed) instead of always-null price columns. - Selenium and pyppeteer reject negative --retries, --retry-delay, --delay-between-pages, --max-solves, --proxy-block-retries. - Credential scan reports and floors its file count and now scans smoke_test.py; env_config's report prints only a secret's length. - Comments, check labels, the CI review prompt and the changelog state rules in this repo's own words; a smoke check keeps private citations out. - Canary fails with ::error:: when PERPLEXITY_CDP_ENDPOINT is missing. Co-Authored-By: Claude Opus 5.5 <[email protected]>
jehrr
marked this pull request as ready for review
October 15, 2026 21:15
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 (base
41048f4, unchanged since the audit).Problems and resulting behaviour
write_json/write_csv/write_metatruncated in place; an interrupted write left 10 bytes of JSON and a 1-byte sidecar. Now: temp file in the target's directory, flush + fsync,os.replace, temp removed on error; new file0o666 & ~umask, existing file keeps its mode.= + - @TAB CR LF get a leading'(CSV only, numbers untouched, JSON unchanged);csv_cells_escapedin the sidecar, merged under the caller's extra keys.PERPLEXITY_URLhijacked typed flags. With it in env/.env,--discover topor--urls-filesilently ran one article with exit 0. Now the variable fills--urlonly when neither is typed;.env.exampleships it commented out.diff_runs.pycould never report a change. It compared only price/currency, which are always null here. It now reportschanged(title, author, summary, dates, section/word/source counts, slug, image), which--fail-on-changeacts on, andcounters_changed(views/likes/forks, informational). Tracked names are validated againstProductat import.--retries -1(zero navigations, then exit 5) and negative delays and--max-solves. All three engines now sharepage_flow.nonnegative_int/floatfor--retries,--retry-delay,--delay-between-pages,--max-solvesand--proxy-block-retries(exit 2, with an error naming the flag; 0 stays legal).MIN_FILES_SCANNED) and no longer exemptssmoke_test.py; that file's credential-shaped test values are built from pieces.env_configreport. It now prints a secret's length only, not its first and last characters..gitignore, the workflows and the CHANGELOG, including the released section (citations only; nothing else there changed). The Claude review prompt now states the invariants inline instead of pointing at a file CI never has. A smoke check fails if a citation comes back; its tokens are assembled from pieces.captcha_solver.py,scraper_api_client.py,output_writer.py,selenium_scraper.py,smoke_test.py) and a person's name are rewritten or removed. Selenium's timeouts are now stated as shared with the other engines and not separately measured.PERPLEXITY_CDP_ENDPOINTsecret does not exist. A missing secret now fails the job with::error::. The existing assertions are unchanged: exit 0,status: complete, row floor, and non-nullsku/title/section_count/sources_json/published_at.Evidence
smoke_test.py66/66,test_regressions12 OK,ci_checks.pypassed (43 files),--sample-checkOK.<engine>_scraper.py --discover top --retries -1exits withargument --retries: must be >= 0in all three engines.PYTHONDONTWRITEBYTECODE=1and__pycache__cleared. Each one went red on the named check, and the suite went green again after restoring:0o644mode → atomic check;--retries type=int→ negative-flag check;ci_checks"read only N files";smoke_test.py→ci_checksfailed.Not changed
--allow-emptywriting over good output on a blocked run (F13), and inert flags such as--max-solves/--min-score(F10): product decisions.gotostatus not passed to classification (F15): low; it needs a live run to avoid misreading a clearing challenge.captcha_solver.py: owner decision, left as they are.462e5f8: history is not rewritten.🤖 Generated with Claude Code