Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down Expand Up @@ -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 \
Expand Down
4 changes: 1 addition & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 1 addition & 5 deletions smoke_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Loading