The default answers "does this fix reach a release branch", and the one
thing holding it up is that the label is seeded on `opened` and on no
other action. Deleting that gate looks like removing an inconsistency —
every other label in the file is re-applied on every run — and it goes
green: the PR that gets a label still looks right, and the PR whose
label a maintainer removed simply gets backported anyway.
The logic is JavaScript inside a github-script step, so the choice was a
shape pin or a runtime. A shape pin does catch that deletion, and it
cannot tell a live guard from a dead one: a condition reordered behind an
`||`, or an exclusion list present and never consulted, both satisfy a
grep. So the primary tests extract the step's script verbatim out of the
YAML and run it under node the way github-script does, over a synthetic
event payload whose `action` field was checked against GitHub's recorded
pull_request deliveries. Nothing is mirrored, so nothing can drift.
node is not guaranteed on the runner `make unit-tests` uses, and a soft
skip that leaves zero coverage is how that pattern fails, so the
structural pins at the end of the file cover the same invariant in a form
that always runs.
Verified as a ladder rather than assumed: 6 of 13 tests go red on the
pre-change workflow, and each of six mutations is caught — the gate
rewritten as `!== 'synchronize'`, a scope dropped from the exclusion
list, `!breaking` dropped, `!backportMatch` dropped, `opened` dropped
from `types:`, and the exclusion list computed but never read. That last
one is the case a shape pin waves through. Green under both
hack/cozytest.sh and Bats 1.14.0.
Assisted-By: Claude <noreply@anthropic.com>
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>