Skip to content

publish-verify: the artifact gate has no demonstrated red state, and the one it had just aged out #930

Closed

Description

@bpalermo

verify-published-artifacts.sh is the gate that catches a commit whose publish run was cancelled at queue time and pushed nothing (#880). It has never been shown to fail on purpose.

Why this surfaced now

1e31e3a (#924) published unsigned images — a genuine, naturally-occurring red input. The scheduled sweep caught it and filed #929, then went green on its own three runs later without anything being fixed:

RECENT_WINDOW="${RECENT_WINDOW:-24 hours ago}"
RECENT_GRACE="${RECENT_GRACE:-2 hours ago}"

scripts/verify-published-artifacts.sh:88-89

The commit aged out of the window. That is right for a backstop — a rolling window is what stops it alarming forever about a commit nobody will republish — but it means the one red input we had was temporary, and we are back to a gate whose failure path is asserted rather than demonstrated.

What is and is not already covered

The script does guard against the empty-input flavour of vacuity, and deliberately:

Both stop the script passing while checking nothing. Neither shows it fails when it checks something that is genuinely missing. Those are different claims, and only the second is the one #880 rests on.

The shape of a fix

verify_commit takes any commit-ish, so a fixture does not need the sweep to happen to catch something:

scripts/verify-published-artifacts.sh <commit-ish> [<commit-ish>...]

Options, roughly in order of preference:

  1. A unit-ish test that drives verify_commit against a commit with no published artifacts and asserts exit 1 plus the MISSING … lines — the negative control, run every CI pass, no registry round-trip needed if the GHCR query is seam-able.
  2. Name 1e31e3a explicitly as a permanent fixture commit. Cheapest, but it is a real commit on main whose meaning is "we chose not to republish this" (publish: artifacts missing for a commit on main #922), and pinning a gate to it makes that decision load-bearing forever.
  3. Assert the negative half of the layout check while here: today publish-verify asserts the signature tag is present but never that the other layout's tag is absent, so a half-migrated digest reads healthy. Related but distinct — noted for context, not to be bundled in.

Option 1 is the one that actually discharges #853 for this gate.

Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions