Skip to content

Canary knows exit 5, refusal names the country, dumps are 0600 - #19

Merged
jehrr merged 1 commit into
mainfrom
canary-exit5-and-dump-perms
Oct 15, 2026
Merged

jehrr merged 1 commit into
mainfrom
canary-exit5-and-dump-perms

Conversation

@jehrr

@jehrr jehrr commented Oct 7, 2026

Copy link
Copy Markdown
Collaborator

Three small findings from the 2026-10 audit of the 2parser mirror, each re-checked against this code before changing it.

Found while checking: the daily canary is red in 28 of the last 30 runs (here and in the mirror), all Unexpected exit code 5. Exit 5 means the page was never obtained, which points at an expired MEDIAMARKT_PROXY secret. The secret itself needs refreshing by a person; this PR does not fix that. It only makes the canary say what happened.

  • canary.yml: add the missing 5) branch. README's exit table described 5 only as "Remote API error", now corrected.
  • page_flow.BLOCK_COUNTRY_HINT, logged by all three engines on a refusal: the 403 body is the same for a datacentre address and a residential one in the wrong country (README: a German address is accepted by .de/.es/.pl, refused by the other seven).
  • output_writer.open_private: raw dumps (--dump-html, _debug.html) were created with the default umask. All 15 writers in four files use it now.
  • README: note on the macOS system-Python urllib3/LibreSSL warning.

Evidence: smoke_test: OK. New check test_dumps_private_canary_and_block_hint. Controls planted one by one, each went red on its named check: plain open() back in selenium, 5) removed from canary, hint removed from pyppeteer, chmod broken. One control (os.open mode alone) stays green by design, because the chmod after it duplicates it; the os.open mode only closes the window before the chmod, which a test cannot see.

Not changed, and why: lock files (would disable the canary's daily test of new releases); the canary's dump artifact (it is the debugging tool, per the comment in the workflow); which repo is canonical vs the 2parser/mediamarkt-parser mirror (undecided). Unchanged because unproven: no live run, since there is no working residential exit here.

🤖 Generated with Claude Code

Three small findings from the 2026-10 audit, each checked against the code:

- canary.yml: its exit-code switch had no branch for 5, so a stale
  MEDIAMARKT_PROXY secret read "Unexpected exit code 5". It now says the page
  was never obtained and what to check. README's exit table still described 5
  as "Remote API error" only.
- page_flow.BLOCK_COUNTRY_HINT, logged by all three engines on a refusal: the
  403 body is identical for a datacentre address and a residential one in the
  wrong country, so the line names both causes.
- output_writer.open_private: raw page dumps were created with the default
  umask. All 15 dump writers in four files now use it.
- README: note on the macOS system-Python urllib3/LibreSSL warning.

New smoke check for all four, each controlled by planting its fault and
confirming the named check goes red.

Not changed: lock files (they would disable the canary's daily test of new
releases), the canary's dump artifact (it is the debugging tool), the
mirror/canonical-repo question (undecided).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@jehrr
jehrr force-pushed the canary-exit5-and-dump-perms branch from 6268856 to 0fa7d78 Compare October 15, 2026 21:59
@jehrr
jehrr merged commit e04f89c into main Oct 15, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant