Repository navigation
Run contract: bad --gl is usage, true last-page reason, real screenshot count, --out paths - #9
Merged
Merged
Conversation
…ot count, --out paths Five defects from a manual test of v0.2.0, each reproduced first. - A `--gl` Play does not serve was exit 3. Play answers `gl=USA`, `xx` or `12` with its own HTTP 400 page (1.7 KB, no store images), which was read as a block: fresh-browser retries, exit 3, and advice to buy a proxy. It is now a `bad_request` page state — from the status, or from the page's own heading where Selenium has no status — and the run stops with exit 2 naming the flag, without retrying. `--gl` is also checked for shape (two letters, upper-cased) before any browser starts; `ZZ` is well-formed and Play does serve it, so no list of countries is kept here. The Scraper API path returns 2 for the same page instead of falling through to "0 products". - `screenshot_count` was 1 on every app row: the app page wraps its screenshots one level deeper than a grid tile, and the wrapper was counted. 9 for WhatsApp and 8 for Minecraft in the captures; 0 of 223 grid tiles change. - `stop_reason` was overwritten with `completed` whenever the page budget was met, including when the page that met it added nothing — the true reason is `no_new_products`. Every other assignment in both loops sits before a `break`, so the line could only overwrite; it is removed from the grid and the reviews loops. Status and exit code are unchanged. - `--out x.json` wrote `x.json.json`; a trailing `.json`, `.csv` or `.meta.json` is now dropped from the prefix. - `--out` and `--dump-html` into a missing directory: the dump failed mid-run and was reported as `navigation_failed`, exit 5, about a page that had been fetched. Missing directories are now created, `~` is expanded once so the directory made and the file written agree, and a path that cannot be created is exit 2 before a browser starts. The committable-captures check now uses `git check-ignore --no-index`. Without it a tracked file is never reported, so the check only held until the fixture was committed — found by a control that went silent once the control harness started committing its disposable copies. Verified: - live, Playwright, Selenium and pyppeteer: `--gl xx` exit 2 with no block retries; `--gl USA` exit 2 before launch; `--category TOOLS --pages 3 --out new/deeper/tools.json --dump-html dumps/x/p` writes tools.json / .csv / .meta.json and three dumps, `complete`, `no_new_products`; `--mode app --app-id com.whatsapp` gives screenshot_count 9. - fake-driver runs through `engine_core.main` for each behaviour; Play's 400 page captured verbatim as a fixture and used as a second control for the asset-count signal. - eight controls, each planted in a disposable copy against a green baseline and caught by its named check. The earlier PR's controls were re-run on the same harness with a baseline as well. - offline suite green with core requirements and in each engine venv; credential scan clean. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VrpkXSoXyZMGV5nqF9JV6P
This was referenced Oct 22, 2026
Merged
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.
Problem
Five defects from the manual test of v0.2.0, each reproduced before fixing:
--gl USA→ exit 3 after fresh-browser retries and proxy advicescreenshot_count= 1 on every app rowstop_reason: completedwhen the last page added nothingcompletedwhenever the page budget was met, overwritingno_new_products(also present in the reviews loop)--out x.json→x.json.json,x.json.csv--outis a prefix and was used literally--dump-htmlinto a missing directory →navigation_failed, exit 5Behaviour after
bad_request(HTTP 400, or Play's 400 heading + no store images where Selenium has no status). The run stops with exit 2 naming--gl, no retries, no proxy advice.--glis shape-checked (two letters) before any browser starts; no country list is kept, sinceZZis well-formed and Play does serve it. The Scraper API path returns 2 for the same page.screenshot_countunwraps single-element wrappers: 9 for WhatsApp, 8 for Minecraft; 0 of 223 grid tiles in the captures change.stop_reasonassignment sits before abreak, so the line could only overwrite. Status and exit code are unchanged — only the reason was wrong..json/.csv/.meta.jsonis dropped from--out.--outand--dump-htmlcreate missing directories (~expanded once, so the directory created and the file written match); a path that cannot be created is exit 2 before a browser starts.Also: the committable-captures check now uses
git check-ignore --no-index. Without it, a tracked file is never reported, so the check only held until the fixture was committed. A control went silent once the control harness began committing its disposable copies, which is how this was found.Evidence
--gl xx→ exit 2, 0 block retries, 0 hints;--gl USA→ exit 2 before launch;--category TOOLS --pages 3 --out new/deeper/tools.json --dump-html dumps/x/p→tools.json,tools.csv,tools.meta.json+ 3 dumps,complete / no_new_products;--mode app --app-id com.whatsapp→screenshot_count9.engine_core.mainfor each behaviour. Play's 400 page is committed verbatim as a fixture and is also a second control for the asset-count signal.🤖 Generated with Claude Code
https://claude.ai/code/session_01VrpkXSoXyZMGV5nqF9JV6P