Skip to content

a box cannot compose an in-development candy: discover:-ing a candy repo panics the generator (CandyMapKey == "") and no local-source ref exists for candy: #999

Open

Description

@aitrawog

Problem

A box cannot compose a candy that lives in an in-development worktree. Two walls,
both measured while building the openwebui 0.12.3 image from a local candy checkout:

1. discover: on a candy repo panics the generator

A candy repo (root charly.yml declaring a candy: node, with no candy/<name>/
directory) can be reached from another project with:

discover:
  - path: /abs/path/to/.worktrees/<slug>/pod-openwebui
    recursive: true

The candy then registers with an empty identity, and charly box generate panics:

panic: … deploykit.(*Generator).CandyCopySource … CandyMapKey == ""

Isolated against a control: the same box with the candy named as a bare-local
candy/<name>/ copy generates cleanly, and with a pinned @github ref generates
cleanly — only the discover:-of-a-candy-repo shape panics. So the failure is the
candy's identity not being derived from the discovered tree, not the box.

2. A box's candy: list cannot name a local source tree at all

openwebui:
  candy:
    base: fedora
    candy:
      - openwebui          # bare name → only resolves inside candy/<name>/
      - '@github.com/opencharly/pod-openwebui:v2026.293.1849'   # merged ref only

There is no accepted form for "the candy at this path". The only ways to test an
unmerged candy in an image today are (a) a byte-identical copy into candy/<name>/ with
provenance hashes, or (b) a --dev-plugin-style local override, which exists for
compiled plugins but not for candies.

Why it matters

This is the in-development loop for every candy: charly box build from the candy's own
repo cannot produce an image (a candy repo has no box), and a consuming box can only
reference a merged, tagged ref. So an author proving a candy change live must
hand-copy it and prove the copy — which is exactly the duplication the "one canonical
implementation" rule exists to prevent, and it risks a proof about a tree that is not the
one being landed.

Suggested fix

  1. Derive a discovered candy's identity from its own node name: (the same default
    kind:skill now uses when name: is omitted) instead of leaving it empty, and
    replace the panic with a validate error naming the offending tree.
  2. Accept a local source ref in a box's candy: list — a ./path or path@ref form
    resolved like the existing @github/@oci refs — so an unmerged candy can be built
    into an image without copying it.

Measured context

Found while landing opencharly/pod-openwebui#12 (open-webui 0.9.5 → 0.12.3) and
#14 (python-layer pin + HTTP readiness): the build project there composes
candy/openwebui/ as a byte-identical copy of the frozen worktree, with sha256 equality
of openwebui-entrypoint / pixi.toml / pixi.lock / charly.yml recorded in
candy-provenance.txt and re-verified before the commit that carries the runtime change.

Agent: lead
Assisted-by: DeepSeek Harness 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