Symptom
The manual "drift remedy" deploy (re-running the deploy phase to fix a published-but-undeployed image) can complete green while pinning nothing and recording nothing. An operator running it to force prod onto a specific image has no guarantee anything rolled, and no audit line saying what happened.
Mechanics (two defects that compound)
-
Empty tag silently means "whatever
:latestis".build.yml(trigger-deployoutputs, ~line 498) falls through to''when the docker-release lane didn't run in that invocation:apps_image_tag: ${{ inputs.phase == 'deploy' && inputs.apps_image_tag || needs.docker-release.outputs.apps_tag || '' }}deploy-swarm-prod.ymlthen exportsGAIA_IMAGE_TAG: ${{ inputs.apps_image_tag }}and the compose file's${VAR:-latest}default takes over. Whether prod actually moves then depends on Swarm's image digest re-resolution, not on anything the workflow asserted. The remedy's whole purpose is an explicit pin; the empty-tag path defeats it while still reporting success. -
The audit line is skipped in exactly that case. The deploy-event log step (
deploy-swarm-prod.yml:200) is gated oninputs.apps_image_tag != '' || inputs.bots_image_tag != '' || inputs.grafana_image_tag != ''— so the all-empty run is the only deploy that writes no audit event. The least-specified deploy is the least-recorded one.
Proposed fix (fail loud, no magic)
- Add a guard step at the top of the deploy job: when the run is the manual remedy (
phase == 'deploy') and all three image tags are empty, fail with an error that names how to obtain the tag (gh run view <publish run>→ theapps_tagoutput), instead of proceeding unpinned. - Make the audit-log step unconditional, writing
latest (unpinned)explicitly when that is what deployed, so no deploy path is unrecorded.
An alternative — auto-resolving the newest GHCR sha tag and pinning it — adds magic to a path that is run precisely because state is already confusing; explicit-or-fail is the safer contract.
Found during the Aug 2026 CI/deploy audit work (context: #1089 fixed master deploys being silently skipped; this is the remaining silent path in the manual remedy).
Activity
0No activity yet.