Repository navigation
Description
Category
category:delivery
Type
type:fix
Remedy / files the remedy will touch
plugin-deploy-pod candy/plugin-deploy-pod/config_setup.go — persist ports and project-declared volumes in ONE locked deploy-entry mutation (or write image: with the ports) so no unloadable intermediate entry exists; add an arm for a deploy absent from the per-host config.
Cited design decision or org-rulebook rule (or none)
none — the degraded-load guard's own message is the evidence.
What happens
A first-time charly config <name> on a deploy that is not yet in ~/.config/charly/charly.yml leaves a partial entry (only resolved_port:, no image:) in the per-host config, and then its own volume-persistence step refuses to write:
$ charly -C /tmp/nr-genproof config nrgenproof
charly: error: command "config": deploy:pod config: InvokeProvider deploy:pod op=config-setup:
rpc error: code = Unknown desc = persisting project-declared volumes:
refusing to write /home/atrawog/.config/charly/charly.yml — it holds 2 deploy entr(y|ies) but
only 1 load; this binary would erase the 1 a degraded load dropped
The file after the failure:
comfyui-cdi -> ['image', 'port', 'resolved_port', 'network', 'security', 'volume_project_checked']
nrgenproof -> ['resolved_port'] # no image: — the loader rejects the entry
image: is mandatory on a pod deploy, so the entry charly config just wrote cannot load; the next writer's degraded-load guard then sees "2 entries, 1 load" and refuses. The deploy can never be configured: every retry re-creates the same partial entry.
The deploy in question is a plain pod with one bind volume (~/…/charly.yml: pod: {image: ghcr.io/opencharly/immich-cdi:2026.328.1448, disposable: true, volume: [external bind]}). Reproduced three times, including with a fresh deploy name, after removing the leftover entry each time.
Mechanism
Two writes in one config run, in this order: (1) resolved ports persisted into the per-host overlay, creating an entry that has no image: yet; (2) project-declared volumes persisted through SaveDeployConfig, whose data-safety guard re-reads the file, cannot load entry (1), and refuses — correctly, but the file it protects was written moments earlier by the same command.
Why it matters
Any deploy that is not already in the per-host config — a first deploy, a renamed deploy, a fresh host — cannot be configured at all. That includes the operator's Immich deploy and every new box.
Remedy
plugin-deploy-pod (config_setup.go's resolve/volume-persistence sequence): persist the ports and the volumes in ONE locked mutation of the deploy entry (or write the entry with its image: before the ports), so no intermediate state exists that the guard would treat as data loss. Add an arm: configure a deploy absent from the per-host config and assert one loadable entry.
Non-blocking or blocking
Blocking for any new deploy (no first-time config completes); it does not affect already-configured deploys. Filed because the fix is in this plugin's resolve/persist sequence, not in the caller.
Agent: immich-consolidation · Claude Code session 113f762e-5d70-484a-9ed9-e34c6423c926
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
Activity
aitrawog commentedon Nov 24, 2026
HOLDING
HOLDING opencharly/sdk#640 — this issue blocks that PR's live end-to-end proof: a deploy absent from the per-host config cannot be configured at all, which is why the
charly config→ systemd half of its evidence is missing. The generator-level proof in that PR stands on its own.The fix is in this repo's resolve/persist sequence (
config_setup.go): persist the ports and the project-declared volumes in ONE locked mutation of the deploy entry, so no unloadable intermediate entry exists.Next update: 2026-11-25, or when this issue's fix lands, whichever comes first.
Agent:
immich-consolidation· Claude Code session113f762e-5d70-484a-9ed9-e34c6423c926Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
Agent:
immich-consolidation· Claude Code session113f762e-5d70-484a-9ed9-e34c6423c926Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
aitrawog commentedon Nov 24, 2026
STATUS
#95 implements this fix:
ensureDeployEntryImagewrites the deploy entry'simage:in its own locked mutation before ports / caps / project-declared volumes, so no unloadable intermediate entry exists and the degraded-load guard never fires on this run. Verified live on a fresh deploy name (before: the guard error in this issue; after: exit 0 and a complete, loadable entry) and covered by two unit arms. This issue is cleared on the blocking side as soon as #95 lands.'Next update: on #95 merge, or 2026-11-25, whichever comes first.
Agent:
immich-consolidation· Claude Code session113f762e-5d70-484a-9ed9-e34c6423c926Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
Agent:
immich-consolidation· Claude Code session113f762e-5d70-484a-9ed9-e34c6423c926Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
fix(config): write the deploy entry's image before any other per-depl…
aitrawog commentedon Nov 24, 2026
RESOLVED
#95 merged and the fix is in:
ensureDeployEntryImagewrites the deploy entry'simage:in its own locked mutation before ports / caps / project-declared volumes, so a first-timecharly configleaves no unloadable entry and the degraded-load guard never fires on this run. Verified live before/after in #95. Closing.Agent:
immich-consolidation· Claude Code session113f762e-5d70-484a-9ed9-e34c6423c926Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)