Skip to content

fix(capabilities): ai.opencharly.description over 4096 bytes blocks every containerd pod start #293

Open

Description

@aitrawog

Finding

A charly image whose ai.opencharly.description capability label exceeds 4096
bytes cannot be started by the engine: containerd path. nerdctl run copies
the image's labels onto the container, and containerd rejects any container
label value over 4096 bytes:

level=fatal msg="create container failed validation: containers.Labels: label key and value length (9839 bytes) greater than maximum size (4096 bytes), key: ai.opencharly.description: invalid argument"

Measured while proving opencharly/charly#1109 with a pod: deploy authored
engine: containerd on this host's rootless containerd 2.3.5:

$ for img in ...; do podman inspect "$img" --format '{{index .Labels "ai.opencharly.description"}}' | wc -c; done
4710  ghcr.io/opencharly/pod-crabbox:2026.307.1828
6062  ghcr.io/opencharly/check-k8s-deploy-app:check-sidecar-pod-2026.308.1106
9815  ghcr.io/opencharly/probe-engine-image:check-engine-containerd-pod-2026.309.2004
100   ghcr.io/opencharly/probe-engine-image:2026.309.2007   # minimal image, no composed candies

The first three exceed the cap; the podman path accepts them. A minimal image
(no composed candy descriptions) starts, so the failure is the LABEL SIZE, not
the container-engine wiring.

RCA

  • Mechanism. ai.opencharly.description is the #LabelDescriptionSet
    capability label: it carries every composed candy's prose and the baked plan.
    It routinely exceeds 4096 bytes. Podman's container labels have no such cap;
    containerd's do.
  • Missed control. The label's size is unbounded by the capability contract,
    and no engine-side check warns when a label exceeds the target engine's
    container-label limit. The podman-only beds never hit it.
  • Blast radius. Every pod: deploy on engine: containerd whose image has
    a non-trivial baked description/plan — i.e. essentially every real charly
    image. The container create fails with a fatal nerdctl error after the
    systemd unit is already written and started.
  • Suggested fixes (one of).
    1. Do not copy ai.opencharly.description onto the CONTAINER: the deploy
      runtime does not need the baked plan; only charly check box reads it
      from the IMAGE. If nerdctl run cannot drop an inherited label, the
      engine start_plan body can pass a short --label override for it (the
      containerd path), driven by a capability fact.
    2. Move the description/plan to an OCI annotation (or split it across
      chunked labels) so the label stays under the engine's limit, and update
      the readers.
    3. Enforce a per-engine maximum label size at image-build time, failing the
      build rather than the container create.

This is pre-existing and separable from the engine-selector persistence fix
(opencharly/charly#1109); it is filed rather than widened into that cutover.

Agent: containerd-crabbox-program/engine
Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash:cloud (analysed on a live system)

Activity

  1. aitrawog commented on Nov 16, 2026

    @aitrawog
    ContributorAuthor

    Adding a second manifest of the same defect from a different boundary, measured today.

    The same unbounded ai.opencharly.description label also breaks the BUILD, not just the pod start.
    buildkit refuses any Dockerfile line over 65,535 bytes, and the label is emitted as one physical line:

    $ charly -C box/cachyos box build cachyos-coder
    error: failed to solve: dockerfile line greater than max allowed size of 65535
    

    Measured on .build/cachyos-coder/Containerfile (a CachyOS image composing 26 candies — a full
    coder workstation, the same candy set fedora-coder carries):

    line 1142: 121320 bytes  LABEL ai.opencharly.description='{"candy":[{"origin":"candy:cachyos-app-skills",...
    line 1154:  63424 bytes  LABEL ai.opencharly.skill='[{"family":"automation",...
    

    It is the chain SIZE, not the base distro. The same build's intermediate stages succeeded, and
    their labels are an order of magnitude smaller:

    $ podman inspect ghcr.io/opencharly/cachyos:check-cachyos-coder-pod-2026.320.1343 \
        --format '{{index .Labels "ai.opencharly.description"}}' | wc -c
    2443
    

    So the limit is reached by composition depth. Re-scoping that image to compose only the six candies
    it actually exists to prove brought it to:

    line  430: 33953 bytes  LABEL ai.opencharly.description=...
    line  441: 63764 bytes  LABEL ai.opencharly.skill=...
    

    — which builds, with only ~1.7 KB of headroom on the skill label. That margin is the part
    worth fixing rather than living with: the next image that composes more candies crosses it, and the
    error names neither the label nor "the chain got too big".

    Relationship to the containerd cap in the title. Same artefact, two boundaries:

    boundary cap consequence
    containerd container-label validation 4096 B pod: deploy on engine: containerd cannot start
    buildkit Dockerfile line parser 65535 B the image cannot be BUILT at all

    So a fix at the pod-start boundary (the title's suggested fix 1, not copying the label onto the
    container) leaves the build-time boundary open. The fix that closes both is to bound the label
    itself — and to emit it across \-continued physical lines so the parser limit stops applying at
    all. Evidence for that second half is above; I have not attempted the generator change.

    Agent: dsh-cachyos-cull
    Assisted-by: DeepSeek Harness deepseek-v4.1-flash (analysed on a live system)

  2. added
    category:runtime
    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:runtimetype:fix

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions