Repository navigation
Description
Category
category:delivery
Type
type:fix
Remedy / files the remedy will touch
candy/plugin-pod's remove/start orchestration (remove_orchestration.go and the --keep-deploy half): either keep the rendered run plan so a kept deploy is startable, or make start resolve and apply it; if the refusal IS the intended contract, the flag's documented behaviour and the check-sidecar-pod step sidecar-pod-roundtrip-final (a config step between remove and start) must say so
Cited design decision or org-rulebook rule (or none)
AGENTS.md R1 (a filed non-blocking finding) and the bed step as the control over the --keep-deploy promise
Classification
Non-blocking — genuinely separable; left unclaimed for a later session to pick up.
Evidence (verified: commands with output, file:line, measurements)
Evidence — remove --keep-deploy drops the run plan, so the next start refuses
The bed's own verdict (PR #1304's run, bed run 2026.331.1254)
$ grep -o '\[sidecar-pod-roundtrip-final\].*' .check/check-sidecar-pod/2026.331.1254/check-live.log
[sidecar-pod-roundtrip-final] exit=1, want 0 (stderr: plugin plugin-example-structkind: served from /home/atrawog/.cache/charly/plugin-build/views/plugin-example-structkind-8408bb195d4f6668 (build sha256:2da1045a9d9c0f0c50dfbac2…
The live instrument: a HEALTHY pod, no killed update, no load
Run from the charly-beds worktree with the binary 2026.331.1233, against the bed's own
disposable: true deploy, in an ISOLATED per-host overlay (CHARLY_DEPLOY_CONFIG) so the
operator's real ~/.config/charly/charly.yml is never written. Plugin-preamble lines are
filtered from the capture; each [rc=N] is the charly command's own exit status.
$ ./bin/charly deploy add check-sidecar-pod
[rc=0]
$ ./bin/charly config check-sidecar-pod
[rc=0]
$ ./bin/charly start check-sidecar-pod
[rc=0]
$ ./bin/charly status --json
[rc=0]
# remove --keep-deploy (the step before the failing one)
$ ./bin/charly remove check-sidecar-pod --keep-deploy
[rc=0]
# THE DECISIVE HALF: start after remove --keep-deploy
$ ./bin/charly start check-sidecar-pod
charly: error: command "start": deploy-dispatch start: deploy plugin: InvokeProvider deploy:pod op=start: rpc error: code = Unknown desc = plugin-deploy-pod start: resolve plan: not configured; run 'charly config check-sidecar-pod' first
[rc=1]
$ ./bin/charly status --json
[rc=0]
$ ./bin/charly remove check-sidecar-pod
[rc=0]
$ ./bin/charly deploy del check-sidecar-pod
[rc=0]
The pod is healthy and running before the remove --keep-deploy (start rc=0 and
status --json rc=0 above). The very next start fails with rc=1, and status --json
still answers rc=0 afterwards, so the deploy entry is readable: what is gone is the run plan.
Mechanism
charly remove <pod> --keep-deploy removes the container AND the generated run plan, keeping
only the charly.yml deploy entry. charly start <pod> resolves that plan before it starts
anything and refuses when the plan is absent:
charly: error: command "start": deploy-dispatch start: deploy plugin: InvokeProvider deploy:pod op=start: rpc error: code = Unknown desc = plugin-deploy-pod start: resolve plan: not configured; run 'charly config check-sidecar-pod' first
The flag's name promises a startable deploy, but the half it keeps is only the YAML entry; the
plan is dropped. The bed's sidecar-pod-roundtrip-final step (charly start <pod> && charly status --json) asserts exactly the flag's promise, and so it fails on a healthy pod, with no
help from the never-hang kill that preceded it in the bed run.
Cleanup
The instrument tore down everything it created through the owning verbs (remove, then
deploy del, which destroyed the VM member and deleted both deploy entries).
Mechanism
charly remove --keep-deploy removes the container AND the generated run plan, keeping only the charly.yml deploy entry; the following charly start resolves the plan first and refuses: plugin-deploy-pod start: resolve plan: not configured; run charly config first (rc=1). Reproduced on a HEALTHY running pod, with no killed update and no load, in an isolated per-host overlay, so the failure is the flag's promise, not the earlier never-hang kill.
Missed control
No gate on charly main runs check-sidecar-pod's check-live: the bed was blocked at [config] since the sdk VmCrossRef regression until opencharly/sdk#651, and no unit test covers the remove --keep-deploy then start round-trip; the bed step is the only control on the flag's promise.
Blast radius
Any charly remove --keep-deploy followed by charly start on a pod deploy; the check-sidecar-pod bed step sidecar-pod-roundtrip-final, which fails on a healthy pod. Operators who read --keep-deploy as "the deploy stays startable" get a refusal.
Root fix
Decide the contract once: keep the run plan under --keep-deploy (so start needs no config), or make start resolve+apply the plan. Then prove it on check-sidecar-pod, and reconcile the bed step (and the flag help text) with the chosen contract.
Spike (its result, or none with the reason)
none needed for the RCA — it was SETTLED live: the remove-then-start sequence was run against the bed's own disposable deploy in an isolated overlay, healthy pod, and the next start returned rc=1 with the plan-missing error (pasted in the evidence). The fix's own spike is the re-run of check-sidecar-pod after it.
Agent: retire-closure · Claude Code session 71fef01d-a7c7-4bed-8517-016cc2df4432
Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)
Activity