Skip to content

publish-verify: ghcr tag pagination can drop a tag while a publish is writing tags (transient false MISSING) #985

Closed

Description

@bpalermo

Found while building #930's expected-red control (PR #983).

A scripts/verify-published-artifacts.sh --recent run at ~11:24Z on 2026-09-27 reported FAIL: 1 of 260 — the one miss was the cni-install signature tag for d526bf2 (sha256-217b6449…). The tag existed: a re-run minutes later passed 260/260. During the first run a publish (9891ae0, started 11:24Z) was pushing, and the cni-install repo's tag count moved from 898 to 902 between the two scans. ghcr_all_tags (scripts/ghcr-lib.sh) walks the paginated /v2/<repo>/tags/list; a tag inserted while the pages are being fetched can shift the page boundary so an existing tag falls between two pages and is never seen.

Effect: the scheduled sweep can raise a false "artifacts missing" alarm whenever it overlaps a publish. Fix directions: fetch each repo's tag list twice and union when the count moved; or look the specific expected tags up directly (HEAD /v2/<repo>/manifests/<tag>) instead of scanning the list, which is also O(expected) instead of O(all tags). Seen-red: reproduce by inserting a tag mid-scan against a fake registry in check-*.sh (the fake-registry seams from #978/#983 make that a unit test).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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