Three gaps a mutation pass found, all in terms nothing asserted.
The install step's `if:` was pinned on one of its two conjuncts. Losing
`steps.target.outcome == 'success'` from it specifically is worse than
losing it elsewhere: a matrix leg whose label is absent skips `Set target
branch`, so the merged-backport guard skips too, so
`steps.guard.outputs.already_merged` is the empty string and `!= 'true'`
is true. The install step would then run on a leg whose checkout has
skipped -- no working tree -- and its `sed` on
hack/backport-git-shim.sh would fail on a missing file under `set -eu`.
A red `previous` leg on every PR carrying only `kind/backport`, sitting
next to a delivered backport. The pin is now the whole condition on all
three gated steps, plus each conjunct's own count.
The first attempt at that pin asserted three occurrences of the conjunct
where the file has four -- the guard's own gate is
`steps.target.outcome == 'success'` alone, since it is what decides
`already_merged` and cannot also test it. Three is exactly what the
mutant produces, so the pin agreed with the mutant and disagreed with
the file: green on the mutation it was written to catch, red on HEAD.
Instrumenting the count is what showed it; reading it again would not
have.
The wrapper's passthrough listed `--continue`, `--skip` and `--quit`
beside `--abort`, and only `--abort` was asserted. Those three are
unreachable from the pinned action, so dropping them broke nothing and
nothing reported it. Asserted on the message rather than the exit code,
because the exit code does not discriminate -- measured on git 2.55,
`--continue` and `--skip` answer 128 either way and differ only in
whether git says "--empty cannot be used with".
And docs/release.md's manual cherry-pick fallback, in the section
directly below the new one, walked an operator into the same wall the
wrapper removes for the bot: without the two flags, a commit that is
empty or already upstream stops the pick with "The previous cherry-pick
is now empty" and no hint that carrying on is the right move.
Assisted-By: LLM
Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>