Skip to content

resolver downloads a branch/SHA candy ref then falls back to a tag, silently #1201

Open

Description

@aitrawog

Symptom

A candy pinned to a branch or a 40-character SHA is downloaded and then discarded. The consumer builds from an older tag instead, with no error.

Measured in opencharly/distro-cachyos, box/nvidia pinned to layer-nvidia:fix/nvidia-ctk-repo:

$ charly box generate nvidia
Downloading github.com/opencharly/layer-nvidia:fix/nvidia-ctk-repo...
Notice: candy github.com/opencharly/layer-nvidia resolved to multiple git tags with differing content…
Notice: candy github.com/opencharly/layer-nvidia resolved to multiple git tags with differing content…
rc=0

$ grep -rl 'install nvidia-ctk from the Arch extra repo' .build/_candy/
(no output)                       # the downloaded ref's content is nowhere

$ ls -d .build/_candy/*nvidia*
.build/_candy/nvidia.7766a9d06ec5fe8c276c091a68fb72cea12688e3
.build/_candy/nvidia.v2026.320.1938      # the tag it fell back to

The generated Containerfile confirms the fallback: no line from the pinned branch appears, and the package line is the bare nvidia-container-toolkit the old candy emitted.

Reproduction

  1. Pin any @github.com/…:<branch> or @github.com/…:<40-char-sha> in a box's candy: list.
  2. charly box generate <box> — note the Downloading … line followed by the tag-resolution Notice.
  3. grep .build/_candy/ for a string that exists only on the pinned ref — it is absent, and .build/<box>/Containerfile lacks the ref's contribution.

charly cache clear does not change the outcome (measured: git-ref cache cleared — the next resolution is fresh, same fallback afterwards). charly cache status reports entries: 532 (latest tags + default branches + resolved SHAs + downloads), so resolved SHAs are meant to be supported.

Why it matters

It makes a producer-first landing order impossible to verify locally. A consumer's bed can only run against a tag, and a tag only exists after a merge — so a candy PR cannot present the fresh-rebuild check-image proof that the review gate requires before that merge. That is the deadlock recorded on opencharly/layer-nvidia#23.

It also means an edit can be "verified" for many rounds against an artifact built from a different revision; this cost a substantial amount of wasted work here.

Suggested direction

Either honour a non-tag ref in the @github resolver, or fail loud and by name when a pinned ref cannot be resolved to content — the current behaviour is a silent fallback, which is the more damaging half.

Filed from

opencharly/layer-nvidia#23.

Assisted-by: DeepSeek Harness ollama-cloud deepseek-v4.1-flash (analysed on a live system)

Activity

  1. added
    category:delivery
    type:fix
    on Nov 23, 2026
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

    category:deliverytype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions