diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index 33767f4..7d52b44 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -35,10 +35,6 @@ name: canary # `profile_locked` (exit 5), which says nothing about the site or the code. on: schedule: - - cron: "23 6 * * *" - # Mondays: the same jobs, WITH the paid secrets (proxy, Scraping Browser, - # captcha key). On the daily run above those secrets read as empty, so - # it takes the free no-secret route and bills nothing. - cron: "23 6 * * 1" workflow_dispatch: @@ -78,8 +74,8 @@ jobs: # the step from failing the job; it does not touch the shell's errexit. continue-on-error: true env: - SPINNY_CDP_ENDPOINT: ${{ (github.event_name != 'schedule' || github.event.schedule == '23 6 * * 1') && secrets.SPINNY_CDP_ENDPOINT || '' }} - TWOCAPTCHA_KEY: ${{ (github.event_name != 'schedule' || github.event.schedule == '23 6 * * 1') && secrets.TWOCAPTCHA_KEY || '' }} + SPINNY_CDP_ENDPOINT: ${{ secrets.SPINNY_CDP_ENDPOINT }} + TWOCAPTCHA_KEY: ${{ secrets.TWOCAPTCHA_KEY }} run: | set +e python3 playwright_scraper.py \ diff --git a/CHANGELOG.md b/CHANGELOG.md index 8713961..3361597 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,9 +15,7 @@ with it, so nobody discovers it from a bill or from a diff. ### Changed -- CI only: the canary's optional paid secrets `SPINNY_CDP_ENDPOINT`, `TWOCAPTCHA_KEY` now reach it only on a new weekly - run (Mondays 06:23 UTC) and on a manual dispatch. The daily run keeps its - schedule and takes the free route without them, so it bills nothing. +- CI only: the canary now runs weekly (Mondays 06:23 UTC) and on a manual dispatch, with its optional secrets `SPINNY_CDP_ENDPOINT`, `TWOCAPTCHA_KEY` passed on every run; the daily schedule is removed. ## [0.2.0] — 2026-10-15 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 023796f..6221b8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -106,9 +106,9 @@ Then the rest of the presentation, in the order that matters: 1. `python3 smoke_test.py` green, and the canary dispatched at least once by hand before the badge is trusted. Unlike its siblings this canary needs **no credential** — the site serves a bare GitHub runner, measured — so it - is scheduled daily as well. The optional `SPINNY_CDP_ENDPOINT` secret, - when set, routes the weekly (Monday) run and a manual dispatch through the - Scraping Browser API (the daily run never uses it, so it bills nothing); no step is + is scheduled weekly (Mondays) as well. The optional `SPINNY_CDP_ENDPOINT` secret, + when set, routes the scheduled run and a manual dispatch through the + Scraping Browser API; no step is gated on it, so the canary keeps working the day it expires. 2. The repo description, homepage and topics set: a description naming what the site publishes and the 2Captcha Scraping Browser API, the 2captcha.com diff --git a/README.md b/README.md index eb11087..926b70e 100644 --- a/README.md +++ b/README.md @@ -458,7 +458,7 @@ engine absent" reads exactly like a passing run. Fixtures are real captures, trimmed to whole cards and verified to parse identically to the untrimmed original before being committed. -`canary.yml` runs one real listing daily and asserts the row floor, the price +`canary.yml` runs one real listing weekly (Mondays) and asserts the row floor, the price coverage, the two price bases, the uniqueness of `page`+`position`, the site's own advertised total and the run status (the assertions are in `.github/canary_check.py`; they test the parser and never a share of cars the diff --git a/smoke_test.py b/smoke_test.py index 810d383..00a703b 100644 --- a/smoke_test.py +++ b/smoke_test.py @@ -1738,13 +1738,9 @@ def test_canary_separates_access_from_defect(): # on it, or the canary quietly stops running the day it expires. ok &= check("no step is gated on the optional secret", "HAVE_CDP" not in wf) - # It is a paid route, so it reaches the run on the weekly (Monday) - # schedule and on a manual dispatch only; the daily run reads it empty. ok &= check("...and the secret still reaches the run through the " "environment, never argv", - "SPINNY_CDP_ENDPOINT: ${{ (github.event_name != 'schedule' || " - "github.event.schedule == '23 6 * * 1') && " - "secrets.SPINNY_CDP_ENDPOINT || '' }}" in wf + "SPINNY_CDP_ENDPOINT: ${{ secrets.SPINNY_CDP_ENDPOINT }}" in wf and "--cdp-endpoint" not in wf.split("run:")[-3]) return ok