Files
ersatztv/scripts/tests
timothy 20b5785b61 fix(744,835): main-only push trigger for ci-image.yml, and a guard for persist-credentials
`ci-image.yml`'s `push` trigger had no `branches:` filter. Gitea resolves a `push`
workflow's definition from the pushed branch, so any branch push touching
`docker/ci/**` or the workflow file itself executed that branch's own YAML — no PR,
no review, no status check — on a docker-capable runner holding the credential that
writes `ersatztv:prod` and the `ersatztv-ci:<sha>` five `container:` jobs run.
`ci.actions-credential-scoping` bounds what such a job may DO; it never bounded
whether it runs.

The tradeoff is decided, not asserted away. Branch publishing was load-bearing —
`ci-image-pin` is blocking, so a PR changing `docker/ci/**` cannot move its pin
without an image published from the branch first. That capability moves to
`workflow_dispatch` on the branch, and the resulting three-step (push the docker/ci
commit as HEAD, dispatch, commit the pin bump) is documented in ci-cd.md.

`.gitea/workflows/ci-image.yml` leaves both its own `paths:` and `ci-image-pin`'s
`expected` in the same change, and that is forced rather than preferred: under
`branches: [main]` a self-triggering path can only publish AFTER the merge, so
`expected` would advance to a commit no image exists for and redden a blocking job
on EVERY subsequent PR. It is also what makes this PR landable — with the old
`expected`, editing this file re-points it at this commit and `ci-image-pin` goes
red for a change altering zero bytes of the image. Cost recorded in the pin job, in
ci-cd.md and in the new record: a build-recipe change living only in ci-image.yml no
longer republishes.

With both mechanical blockers gone, `ci-image.yml`'s checkout takes
`persist-credentials: false` — the sixteenth of sixteen — which is what #835 was
waiting for. Its guard therefore ships with NO exemption list: population derived
from the git index, both `.yml` and `.yaml`, a parser-completeness cross-check
against a text scan so an unreachable step list is reported rather than silently
uncovered, anti-vacuity in both directions, and a declared clause mutation on the
guarded artifact re-run every suite.

fixes #744
fixes #835
Decisions-Edit: yes
2026-08-27 20:01:37 +02:00
..