Repository navigation
Report markup drift as a parser failure; typed query flags win over a .env URL - #1
Merged
Merged
Conversation
…n over a .env URL - A served page that still says it has rows (rows in its markup, a More link, a comment count, a profile page) and parses to none is now a failed page, stop_reason parser_found_nothing: exit 5 with nothing gathered, exit 6 after earlier pages. It used to read as an empty answer (exit 4) or as the end of the list (complete, exit 0, with part of the data). - HACKERNEWS_URL is commented out in .env.example, and a URL from the environment no longer refuses typed --feed/--item/--user/--mode in any entry point. - Key masking covers clientKey: / "key": shapes in errors and x-debug. - Comments, docstrings and the canary state their reasons in their own words; a suite check rejects references to unpublished documents. - Docs: credential lifetime claim retracted; Selenium's 403 -> exit 5 noted. - CI matrix: 3.9 and 3.14. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jehrr
marked this pull request as ready for review
October 15, 2026 13:01
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.
Problems
#hnmainand notr.athingwas classifiedemptyeven while it still carried its own More link, and a page that had rows but parsed to none only logged a warning. Measured before the change with the realnews/news2fixtures andathingrenamed on page 2:status: complete,stop_reason: end_of_listing, 30 rows, exit 0. The same drift on page 1 gave exit 4.cp .env.example .envbroke every query flag. The example setHACKERNEWS_URL,env_config.applyfilledargs.url, andbuild_querythen refused--feed show,--item 1and--mode user --user dangwith exit 2 in all four entry points..env.example, the CDP 401 hint), Selenium's 403 → exit 5 undocumented, key masking limited tokey=form, comments about other sites' columns, CI matrix stopping at 3.12.Resulting behaviour
stop_reason: parser_found_nothingand a saved<out>_pageN_debug.html. Page 1 → exit 5; later page → exit 6 (partial), earlier rows kept. The site's own short "nothing" sentences and a real page past the end (no rows, no More link, e.g.?p=27) are unchanged: exit 4 /end_of_listing.HACKERNEWS_URLships commented out. Each entry point recordstyped_urlbefore.envis applied, and a URL from the environment is dropped when a query flag or--modewas typed. A typed--urlwith a query flag is still refused._KEY_IN_TEXT_REinscraper_api_client.pyandfingerprint_client.pyalso masksclientKey: …and"key": "…".no shipped file cites the private instruction files or their sections(tokens assembled from pieces).diff_runs.UNTRACKED_FIELDSloses three names no row class has;tests.ymloffline matrix is["3.9", "3.14"]; canary's exit-4/5 messages describe the new parser-failure case.[Unreleased]leads with a blockquote for the exit-code change.Evidence
scraper_api_client.parse_argswithHACKERNEWS_URLexported:--feed show→ listing/show,--mode user --user dang→ user/dang,--item 1→ item/1, no flags → listing/news; typed--url … --feed show→ exit 2.PYTHONDONTWRITEBYTECODE=1,__pycache__removed between runs), each RED on the named check, green after restore:page 2 drifted: exit 6, partial, parser_found_nothinggot(0, 'complete', 'end_of_listing', []);typed_url = args.url→an environment URL and a typed --feed: the flag winsfails;output_writer.py→no shipped file cites the private instruction files…names that file;=only → threea key in the shape … is maskedchecks fail.Canary (owner's request)
Before and after: daily, ungated (no secret needed;
gh secret listshows none, and none is required), four jobs that run the real site with Playwright and go red on any exit other than 0 (3, 4, 5 and 6 each fail with::error::). The asserted thresholds are parser floors (85/90 listing rows, 60 comments, 1 profile, non-null core fields, unique page+position, rank order). The last 10 scheduled runs were green with real rows (2026-10-14: 90 + 90 listing rows, 71 comments, 1 profile). Only the exit-4/5 messages were changed here.Not changed
--solve-captcha/--captcha-api/--min-scoreand warn-not-refuse for--proxy/--fingerprintwith--cdp-endpoint(owner decision, F7)..env*files (F12): a design note, and the files are ignored by.gitignore.🤖 Generated with Claude Code