Skip to content

deploy reset is a silent no-op on an entry the loader dropped — the remedy the refusal names cannot be executed #56

Todo

Description

@aitrawog

Category

category:delivery

Type

type:fix

Remedy / files the remedy will touch

plugin-fleet candy/plugin-fleet/config_cmd.go — runFleetReset (:218-260): remove the raw node-form key for the named entry (or fail NONZERO with the charly migrate remedy) instead of reporting success when the key is absent from the loaded map.

Cited design decision or org-rulebook rule (or none)

AGENTS.md R1 (a remedy must be executable) / R3 (no silent no-op); /charly-internals:git-workflow landing discipline

Classification

Blocking — it blocks the filer's own progress, so the filer claims it at filing and fixes it.

Evidence (verified: commands with output, file:line, measurements)

# the entry this session found on a live host (pod deploy written without `image:`)
$ sed -n '/^check-service-status:/,+2p' ~/.config/charly/charly.yml
check-service-status:
    pod:
        resolved_image: check-service-status-overlay:cabc723f3910

# every later write is refused by the degraded-load guard
$ charly config immich-cdi -i homeproof
charly: error: command "config": deploy:pod config: InvokeProvider deploy:pod op=config-setup:
  rpc error: code = Unknown desc = writing the deploy entry's image: refusing to write
  /home/<user>/.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 (fix the config first, e.g. `charly migrate`, or remove it
  to regenerate)

# the remedy the message suggests cannot be executed for that entry
$ charly deploy reset check-service-status
No overrides for box "check-service-status"
$ echo $?
0
# (the entry is still there; only a bare `charly deploy reset` with NO box removes it, by
#  os.Remove-ing the whole file — which takes the good entries, provides:, cache: and ledger: with it)

Mechanism

runFleetReset mutates only the LOADED dc.Deploy. An entry the loader dropped (e.g. a pod body with no image:, dropped by ValidateDeployRequiresBox) is absent from that map, so 'if _, ok := dc.Deploy[key]; !ok { return false, nil }' prints 'No overrides for box' and exits 0. Even if it could mutate, sdk's SaveDeployConfig re-reads disk and refuses while len(onDisk.Deploy) < countDeployKeys(root).

Missed control

No test covers reset against a DEGRADED load; the reset path was only ever exercised on a config whose entries all load.

Blast radius

A degraded per-host config blocks every later charly config / deploy write, and the only documented remedies are unreachable for that entry; the remaining escape deletes the whole file.

Root fix

Reset by raw key against the file's node-form tree, or refuse with a nonzero exit naming charly migrate; add a fixture with one good and one image-less entry.

Spike (its result, or none with the reason)

none yet — the fix's candidates (raw-key removal vs nonzero refusal) are decided by whether a raw-key removal can round-trip the guard; that spike runs in the fix PR.

Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

Activity

  1. aitrawog commented on Nov 26, 2026

    @aitrawog
    ContributorAuthor

    CLAIM

    Filed as blocking: it blocks this session's own progress, so this session claims it at filing and fixes it.

    Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed
    Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)

  2. added
    category:delivery
    type:fix
    on Nov 26, 2026
  3. self-assigned this
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

category:deliverytype:fix

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions