Skip to content

The canary would have gone red every day once the secret expired - #5

Merged
jehrr merged 2 commits into
mainfrom
canary-access-vs-defect
Sep 10, 2026
Merged

jehrr merged 2 commits into
mainfrom
canary-access-vs-defect

Conversation

@jehrr

@jehrr jehrr commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Petr asked whether it is even worth setting the ETSY_CDP_ENDPOINT secret,
given the endpoint dies within a day. Checking the code rather than assuming:
he is right, and the canary was the thing at fault.

test "$code" = "0" failed the job on any non-zero exit. So:

  • An expired secret (exit 5) painted the badge red every day until someone
    refreshed it. A credential is not forever — this was going to happen
    whatever endpoint was configured.
  • An intermittent block (exit 3) did the same. Measured 2026-09-09/10 on
    one account: a fresh profile served three full pages in the morning, and
    that evening two fresh profiles were refused with t=bv through all their
    retries while a third served a shop front in full, twice. Same code, same
    zone, same URLs.

A check that is always red teaches everyone to ignore checks — worse than
having no check. This repo's own notes say so twice.

Access conditions are now warnings; defects stay red

exit meaning badge
0 got in, data checked pass
3 blocked before parsing warning — access
5 endpoint refused warning — access, usually an expired secret
6 partial, usually a mid-run block warning — access
1 crashed red
2 the workflow's own arguments are wrong red
4 served a page and parsed zero rows red — the tile anchor moved, which is exactly what this canary is for

A warning must not read as a pass either, so each one also writes to the step
summary in words: the canary did not test anything this time. And the
data assertions are now gated on the run having actually got in — on a
blocked run there is no output file, and a missing file would fail for the
wrong reason.

Verified by running it, not by reading it

The real bash block was extracted and executed for every exit code:

exit  0 -> job passes | ok      | tested=true  | summary: no
exit  1 -> job FAILS  | error   | tested unset | summary: no
exit  2 -> job FAILS  | error   | tested unset | summary: no
exit  3 -> job passes | warning | tested=false | summary: YES
exit  4 -> job FAILS  | error   | tested unset | summary: no
exit  5 -> job passes | warning | tested=false | summary: YES
exit  6 -> job passes | warning | tested=false | summary: YES
exit 99 -> job FAILS  | error   | tested unset | summary: no

A test does the same, so this cannot regress.

The README now carries a table of what the badge means on this site —
including that a green badge from a blocked run is not evidence the parser
still works.

566 offline checks.

jehr added 2 commits September 10, 2026 10:13
Petr asked whether it is even worth setting the ETSY_CDP_ENDPOINT secret,
given the endpoint dies within a day. Checking the code rather than assuming:
he is right, and the canary was the thing at fault.

`test "$code" = "0"` failed the job on ANY non-zero exit. So:

  * AN EXPIRED SECRET (exit 5) painted the badge red every day until someone
    refreshed it. A credential is not forever, so this was going to happen
    whatever endpoint was configured.
  * AN INTERMITTENT BLOCK (exit 3) did the same. Measured 2026-09-09/10 on
    one account: a fresh profile served three full pages in the morning, and
    that evening two fresh profiles were refused with t=bv through all their
    retries while a third served a shop front in full, twice. Same code, same
    zone, same URLs.

A check that is always red teaches everyone to ignore checks, which is worse
than having no check — this repo's own notes say so twice.

ACCESS CONDITIONS ARE NOW WARNINGS; DEFECTS STAY RED

  0  got in, data checked            pass
  3  blocked before parsing          warning — access
  5  endpoint refused                warning — access, usually an expired secret
  6  partial, usually a mid-run block warning — access
  1  crashed                         RED
  2  the workflow's own arguments    RED
  4  served a page, parsed ZERO rows RED — the tile anchor moved, which is
                                     exactly what this canary is for

A warning must not read as a pass either, so each one also writes to the step
summary in words: the canary did not test anything this time. And the data
assertions are gated on the run having actually got in — on a blocked run
there is no output file, and a missing file would fail for the wrong reason.

Verified by running the real bash block for every exit code, not by reading
the YAML: 0 passes, 3/5/6 warn without failing and write a summary, 1/2/4/99
fail. A test does the same so this cannot regress.

README now has a table of what the badge means on this site, including that a
green badge from a blocked run is NOT evidence the parser still works.

566 offline checks.
Petr's question, answered by the constraint rather than by preference. A
Scraping Browser endpoint on this account does not survive a day, and a daily
cron against a credential with that lifetime has only two outcomes:

  * a RED badge every day, if a dead endpoint fails the job — which the
    previous commit already fixed;
  * a GREEN badge every day that has tested nothing, now that it does not.

The second is the more dangerous, because green reads as "the parser still
works" and nobody opens the run page to find the warning.

So the schedule is off and the canary is dispatched by hand, with a fresh
secret, when the answer matters — before a release, or when someone reports a
missing column. That is honest about the coverage: the offline suite runs on
every push and pins the parser against real captures, and this workflow is
the only thing that can catch Etsy changing its markup.

The badge is relabelled "canary (on demand)" so it does not imply a daily
check, and the README says plainly why. A test asserts there is no cron and
that the reason is written down — restoring the schedule is a legitimate
change the day a long-lived credential exists, and this makes it a decision
rather than a habit.

569 offline checks.
@jehrr
jehrr merged commit 8cc4dec into main Sep 10, 2026
7 checks passed
@jehrr
jehrr deleted the canary-access-vs-defect branch September 10, 2026 08:20
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