Skip to content

charly box build exposes no per-step output and no cache bypass, so a changed RUN cannot be verified #1202

Open

Description

@aitrawog

Symptom

charly box build offers no way to see a build step's output, and no way to force a cold rebuild. When a layer's RUN is emitted correctly but its effect is absent from the resulting image, there is no sanctioned way to find out why.

Measured

A candy plan step (opencharly/layer-nvidia, merged as #24, tag v2026.322.1139) installs a package that supplies /usr/bin/nvidia-ctk. Every artefact says it should work:

$ podman inspect ghcr.io/opencharly/nvidia:2026.322.1210 \
    --format '{{index .Labels "ai.opencharly.description"}}' | grep -o 'nvidia-ctk from the Arch extra repo'
nvidia-ctk from the Arch extra repo           # the candy parsed with the step

$ grep -n 'pacman -Sy --noconfirm extra' .build/nvidia/Containerfile
45:pacman -Sy --noconfirm extra/nvidia-container-toolkit   # emitted, in the final stage

$ sed -n '35p' .build/nvidia/Containerfile | fold -w 120
RUN --mount=type=bind,from=nvidia,source=/,target=/ctx … sh -c 'SH=/bin/sh; [ -x /bin/bash ] && SH=/bin/bash; exec "$SH"' sh <<'OVCMD'
                                              # a well-formed heredoc; the step is inside it

$ podman run --rm --entrypoint sh …/nvidia:2026.322.1210 -c 'pacman -Sl extra | head -1'
extra 0ad 0.28.0-3                            # the extra repo is reachable

$ podman run --rm --user 0 --network host --entrypoint sh <same image> \
    -c 'pacman -Sy --noconfirm extra/nvidia-container-toolkit; ls -l /usr/bin/nvidia-ctk'
-rwxr-xr-x 1 root root 13466568 … /usr/bin/nvidia-ctk   # the command works by hand

And yet:

$ podman run --rm --entrypoint sh …/nvidia:2026.322.1210 -c 'ls /usr/bin/nvidia-ctk; pacman -Q nvidia-container-toolkit'
ls: cannot access '/usr/bin/nvidia-ctk': No such file or directory
nvidia-container-toolkit 1.20.1-1.1

Why it cannot be diagnosed with the current tooling

$ charly -C . box build --help | grep -E '^\s+--'
      --host=STRING
      --host-identity-file=STRING
      --host-option=HOST-OPTION,...
      --repo=OWNER/REPO[@REF]
  • No --progress / --verbose: the build's per-step output is not reachable, so whether that RUN executed and what it printed is unknowable from outside.
  • No --no-cache: a changed RUN cannot be forced to re-execute, so "the step ran and failed" cannot be separated from "the step was served from cache".

Reaching around it with a hand-rolled podman build -f .build/nvidia/Containerfile is exactly the ad-hoc path R3 forbids, and it would produce an image no charly gate knows about. So a user is stuck between an unwitnessable build and a forbidden workaround.

Suggested direction

Either flag would do; both would be better:

  1. --progress plain|auto forwarded to buildctl, and the per-step output captured to a file the user can read.
  2. --no-cache (and/or a documented way to invalidate a single layer), so a changed RUN can be proven to execute.

This is the same class as the "a skipped check reads green" pattern: the mechanism exists, the evidence does not.

Filed from

opencharly/distro-cachyos work on box/nvidia while landing opencharly/layer-nvidia#24.

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

Activity

  1. aitrawog commented on Nov 18, 2026

    @aitrawog
    ContributorAuthor

    Refinement from the reporting session — the one hypothesis still standing, and why the obvious refutation is weaker than it looks.

    I had argued a cache hit was refuted because consecutive builds produced different image IDs:

    2026.322.1142  47d2a602abd5
    2026.322.1205  47d2a602abd5
    2026.322.1210  47d2a602abd5
    …              6c7f06097ded
    …              edf2e210c863
    

    That argument is wrong. The ai.opencharly.description OCI label — which does contain the new plan step — is baked by a LABEL instruction that sits outside the cached RUN, so a label change alone yields a new image ID while the layer produced by the changed RUN is still served from cache. Different ID therefore does not prove the RUN re-executed.

    Consistent with every observation to date:

    • the candy parsed with the step (label carries it)
    • the step is emitted (Containerfile:45, inside a well-formed heredoc RUN in the final stage)
    • the extra repo is reachable (pacman -Sl extra lists packages)
    • the command installs the binary when run by hand in that same image
    • and the built image still reports nvidia-container-toolkit 1.20.1-1.1 with no /usr/bin/nvidia-ctk

    A cached RUN explains all five. But I cannot prove it, and that is precisely the gap this issue describes: without --no-cache there is no way to distinguish "the step ran and failed" from "the step never ran".

    If a maintainer can run one cold build, the question closes either way in a single step.

  2. 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