Repository navigation
Description
Mechanism. For a ref-based charly deploy add <new-name> <ref> with no inline charly.yml entry, DeployAddCmd.dispatchOne resolves the base box correctly (compileNodePlans returns base = the resolved <ref> selection) but does not put it on the wire: spec.DeployResolveTargetAddRequest carries Node: nil and Target, and the host's hostBuildResolveTargetAdd synthesizes &spec.DeployNode{Target: req.Target}. The pod deploy plugin's prepare-venue then derives the base box name as p.Image, falling back to p.Name (the deploy name), because the node has no Image. Overlay generation is scoped to that name, so a deploy name that differs from the ref fails:
charly: error: command "deploy": deploy-dispatch add: deploy plugin: deploy-dispatch add: prepare venue: InvokeProvider deploy:pod op=prepare-venue: rpc error: code = Unknown desc = plugin-deploy-pod prepare-venue: build-generate-resolve: rpc error: code = Unknown desc = InvokeProvider build:generate op=resolve: build generate resolve: scoping generation to requested boxes: unknown box "verify-baked-control"
Measured (charly at 2b7de1e0 + opencharly/charly#1038's connect fix, plugin-pod@main, plugin-deploy-pod@main built as a baked deploy:pod provider, isolated HOME/XDG_*):
| command | outcome |
|---|---|
charly deploy add verify-baked-control check-pod --tag 0.0.0-none |
resolution now PASSES (provider served); fails at unknown box "verify-baked-control" |
charly deploy add verify-scan-control check-pod --tag 0.0.0-none |
same, project-scan provider |
charly deploy add check-pod check-pod --tag 0.0.0-none (existing node) |
resolution passes; fails later at overlay short-name "check-pod" did not resolve — the name and box match here, so the defect is masked |
Missed control. Every existing test/bed deploys a name that is ALSO the box/entry name (check-pod, arch, …), where p.Image/p.Name coincide. No test asserts that deploy add <name> <ref> with name != ref scopes generation to the REF.
Blast radius. Any ref-based deploy whose name differs from the box/image (Pattern B arbitrary deploy names, and every deploy add <fresh-name> <box>). Before opencharly/charly#1038 this path was unreachable (it failed at substrate resolution), so the defect was latent; the connect fix exposes it.
Root fix. Thread the already-resolved base box to the resolver: synthesize the wire node with Image: base in dispatchOne (the value compileNodePlans already returns), so the substrate's prepare-venue scopes generation to the ref rather than the deploy name. No spec-wire change is needed — Node.Image is already the field the pod plugin reads.
Agent: containerd-crabbox-program/fix1038 · session 8b1c01cf-7f79-4a75-bff8-240415a06208
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
Activity