Repository navigation
Description
Summary
A nested in-substrate member's teardown executes in the WRONG VENUE. charly deploy del <root>.<member> (the command the bed runner runs to tear a nested member down) re-resolves the venue from the member node alone; a member authored with no host: field falls back to ShellExecutor{} — the operator's host — and the ledger's reverse ops are then replayed on the workstation instead of in the guest.
Measured on this host: check run check-kind-host-vm tore down in the guest (add) and removed /usr/bin/helm and /usr/bin/kubectl from the operator's workstation (164.87 MiB) in the cleanup step.
This is a third variant of the mechanism already tracked by #627 and #680 — same fork (deploykit.TearDownMembers → peer charly deploy del <member>), different symptom: #627/#680 deadlock on the ledger lock; this one proceeds and mutates the host. plugin-fleet#22 fixed the lock only.
Measured impact (verbatim)
.check/check-kind-host-vm/2026.276.0928/cleanup-check-kind-host-member.log:
:18 error: target not found: kind
:19 error: target not found: nerdctl
:20 error: target not found: rootlesskit
:21 error: target not found: conntrack-tools
:22 reverse: package-remove failed: exit status 1
:24 :: charly optionally requires kubectl: Kubernetes deploys + charly eval k8s probes (kind:k8s targets only)
:26 Packages (2) helm-4.3.0-1 kubectl-1.36.4-1
:28 Total Removed Size: 164.87 MiB
:32 removing helm...
:33 removing kubectl...
The host's pacman state is an exact match for that error set and for the two non-errors:
| package | host state | teardown outcome |
|---|---|---|
kind, nerdctl, rootlesskit, conntrack-tools |
ABSENT | target not found (the 4 errors) |
containerd, slirp4netns |
PRESENT | no error |
charly (2026.256.1316-1) |
PRESENT | ⇒ prints :: charly optionally requires kubectl |
Meanwhile the add correctly landed in the guest — deploy-check-kind-host-member.log:337-363 shows the guest's pacman installing all 15 (incl. kind, containerd, nerdctl, rootlesskit, slirp4netns, conntrack-tools). The bed also fails, because the runner asserts a pristine cleanup log:
[cleanup-check-kind-host-member] FAIL 1m30.522s: cleanup-check-kind-host-member exited 0 but its log carries 4 error line(s)
(All other 14 steps PASS, including update 7m56.237s, redeploy-check-kind-host-member 3m13.01s and check-live-rebuild-check-kind-host-member 1m42.71s.)
Root cause (R1)
The teardown is a fresh OS process, so no in-process venue survives:
-
plugin-check/candy/plugin-check/bed_run.go:613-615for i := len(d.ChildKeys) - 1; i >= 0; i-- { childKey := d.ChildKeys[i] if err := step("cleanup-"+childKey, "deploy", "del", name+"."+childKey, "--assume-yes"); err != nil {
→
charly deploy del <root>.<member> --assume-yes, forked through thecliHostBuild seam (plugin-check/command.go→ex.HostBuild(ctx,"cli",…)→charly/host_build_cli.gorunCliSubcommand→exec.Command). -
charly/unified_targets.goResolveTarget(~:481-509) selects the executor only from the node'shost::
exec, perr := specexec.RootExecutorForDeployNode(node). -
spec/exec/deploy_chain.go:220-227:func RootExecutorForDeployNode(node *spec.FleetNode) (spec.DeployExecutor, error) { if node == nil { return ShellExecutor{}, nil } hostField := strings.TrimSpace(node.Host) if hostField == "" || hostField == "local" { return ShellExecutor{}, nil }
A member with no
host:⇒ShellExecutor{}= the host. -
charly/unified_targets.gopluginDeployTarget.Del(:297-309) dispatches:237) dispatches{Op:"del", OptsJSON: optsJSON}— noVenueJSON— whereasAdd(VenueJSON: t.applyParentExecOverride(opts)(the live nested parent = the guest).t.venueJSONis documented as in-process state ("nil until the firstadddispatch reports one back"), anddispatchonly injects it when non-empty. -
plugin-fleet's
resolveRootExecutor(candy/plugin-fleet/deploy_target.go) honorsVenueJSONwhen present and otherwise falls back to the sameRootExecutorForDeployNode. -
Production entry
charly/host_build_deploy_node_del_dispatch.go:16-29:ResolveTarget(req.Node, req.Name)thenutgt.Del(...)— no venue anywhere.
Asymmetry in one line: Add gets its venue from a live in-process executor; Del has no equivalent channel.
Why only this bed (the blast radius is narrow)
Only a member whose candy declares a package: list trips a bed failure: that compiles to a SystemPackagesStep whose reverse op is pacman -R … — the only reverse op that does real, visible damage on the host and emits error lines.
Measured across the three beds that carry a re-nested in-substrate local: member:
| bed | verdict | member cleanup |
|---|---|---|
check-group |
ok: true (1652s) |
cleanup-check-group-member ✓ |
check-builder-vm |
ok: true (1741s) |
cleanup-check-builder-member ✓ |
check-kind-host-vm |
ok: false (1804s) |
cleanup-check-kind-host-member ✗ (only red step) |
layer-kind declares distro.arch.package: [kind, containerd, nerdctl, rootlesskit, slirp4netns, conntrack-tools]; the other two members compose candies that only drop file markers.
Scope of the fix (scoped; a producer chain)
No existing wire field carries the venue on the del path — spec.DeployNodeDelDispatchRequest and spec.DeployTargetDelOpts have no venue/ancestry field in the pinned spec or in the newest available spec, so a pin bump alone fixes nothing. The add path already has the model to copy:
charly/host_build_resolve_target_add.go:23—spec.ReconstructParentExec(req.AncestorPaths, req.AncestorNodes, deriveChildExecutorForPath), fed byDeployResolveTargetAddRequest.AncestorPaths/AncestorNodes, populated inplugin-fleet/candy/plugin-fleet/walk.go:139-146.
Minimal change:
| repo | file | change |
|---|---|---|
spec |
CUE schema → cue_types_gen.go |
add AncestorPaths []string + AncestorNodes []Deploy to DeployNodeDelDispatchRequest (mirroring DeployResolveTargetAddRequest); new release |
plugin-fleet |
candy/plugin-fleet/walk.go (DeployDelCmd.Run) |
populate the ancestor chain from the tree it already resolves (same construction as :139-146); bump the spec pin |
charly |
charly/host_build_deploy_node_del_dispatch.go |
spec.ReconstructParentExec(...) → flatten via specexec.DescriptorFromExecutor → set the venue on the target before Del; bump the spec/plugin-fleet pins |
plugin-check |
— | no change — deploy del <root>.<child> is correct; the venue must travel with the deploy call, not the bed harness |
A charly-only "re-resolve the tree from cwd" variant was considered and rejected: tree resolution was deliberately moved plugin-side, the del request carries no Dir, and buildEngineContext is documented zero on this path.
Safety — until this lands
Do not run check-kind-host-vm, or a full roster containing it. The teardown replays against the host and will delete the operator's helm/kubectl again. On current main the bed is worse, not safer: with the member authored at deploy level, add and teardown are both host-side, so each run churns host packages (the #748/#79 hazard).
Coordination
Searched first (gh search issues|prs --owner opencharly: teardown, deploy del, venue, nested local, workstation, reverse_ops). Same mechanism: #627, #680 (its sdk/deploykit/deploy_members.go:132 peer subprocess is the fork that loses the venue; its own text notes the VM-root case does not deadlock — it proceeds, which is this case). Related: #699 (the check-pod-overlay watchdog red, same errPluginCallIdle), #687 (a different reverse-op mechanism), #748 (the umbrella this was found under), sdk#330 (the guard that would have caught the pre-fix authoring). No existing issue states this symptom, so this is filed once and cross-referenced rather than opened as a duplicate or a competing PR.
Discovered while landing the #748 in-guest nesting fix (#762) and root-caused without modifying any other session's scope.
Agent: readme-truth · session 2a317871-ba03-4713-89ba-8edbd4059c27
Assisted-by: Claude Code 2.1.288 deepseek-v4.1-flash:cloud (analysed on a live system)
Activity
aitrawog commentedon Oct 3, 2026
STATUS — the fix is a three-repo producer chain, leg 1 is up: opencharly/spec#190.
What this issue is.
charly deploy del <root>.<member>ships the target node but no ancestor context, so the host cannot rebuild theparentExecchain theaddhalf used and the teardown falls back tospecexec.RootExecutorForDeployNode(node)— the operator's HOST for an in-substrate member carrying nohost:field. The member's reversible ops then replay against the workstation while itsaddlanded correctly in the guest.Why it cannot be a one-line patch (verified, not assumed). The teardown is a fresh forked process (
plugin-check/candy/plugin-check/bed_run.gorunsstep("cleanup-"+childKey, "deploy", "del", …)), so no in-process venue carry betweenaddanddelcan reach it. And no del field carries a venue:spec.DeployNodeDelDispatchRequestandspec.DeployTargetDelOptshave none, in the pinned spec and in the newest available spec — so a pin bump alone fixes nothing. That was established before any code was written.The chain, in unblock order.
spec#DeployNodeDelDispatchRequestgains optionalancestor_paths+ancestor_nodes(ROOT-FIRST, EXCLUDING the target)plugin-fleetcharlyhostBuildDeployNodeDelDispatchreconstructs the chain (spec.ReconstructParentExec→DescriptorFromExecutor) and hands it toDelas the venue; bumps both pinsadd-side nested-member fix and thespec#188pin bumpsReuse, not new machinery.
spec.ReconstructParentExecand the ancestor threading already exist and are theaddhalf's own model (charly/host_build_resolve_target_add.go, fed byplugin-fleet/candy/plugin-fleet/walk.go). Thedelseam simply had no way to carry the same two lists. No new executor plumbing, nothing live crosses the wire.Evidence. The R10 bed for this chain runs once, at leg 3, where the chain is assembled: the re-run of
check-kind-host-vm— the bed whose cleanup step replayedpacman -Ron the host. Its pasted output lands on#762and is linked back from each producer PR. No bed is claimed for a leg whose changed path no consumer can reach yet, and no waiver is claimed either.Ownership. Filed and worked by
readme-truth(this session); the assignee on this issue is that work. No competing PR is open inspec,plugin-fleetorcharlyfor this scope.Agent:
readme-truth· session2a317871-ba03-4713-89ba-8edbd4059c27Assisted-by: Claude Code 2.1.288 deepseek-v4.1-flash:cloud (analysed on a live system)
feat(spec): the del seam carries the target ancestor chain (the venue…
test(deploy): assert the del request the wire actually carries, not j…
feat(deploy): ship the del target's ancestor chain so the teardown ke…
aitrawog commentedon Oct 3, 2026
STATUS — the fix is built, merged in two of its three repos, and the third is committed with its gate running.
The chain that closes this issue (three repos; the RCA showed a pin bump alone fixes nothing, because the venue is lost at the dispatch seam, not in the dependency):
opencharly/spec#DeployNodeDelDispatchRequestwire fields (ancestor_paths/ancestor_nodes)#190, tagv0.2026276.1103opencharly/plugin-fleet#31, tagcandy/plugin-fleet/v0.2026276.1113opencharly/charly#762, headec5be463, committed, unpushed — R10 gate runningWhy it took three repos, in one line.
pluginDeployTarget.Adddispatched withVenueJSON: t.applyParentExecOverride(opts)(the live nested parent = the guest);Deldispatched with no venue at all, and a freshcharly deploy del <root>.<member>— which is exactly what a bed's cleanup step forks — therefore fell back tospecexec.RootExecutorForDeployNode(node)= the host. Nothing crossed the wire for the host to re-derive from, so the fields had to be added (leg 1) and populated (leg 2) before the host could honour them (leg 3).The fix is compiled, not asserted. From the worktree binary built on the committed head (
2026.276.1115):check-kind-host-vm" warning I posted on#762at 10:28Z STANDS for every session except this worktree's binary. The fix is in this tree only; another session's binary still has the unfixedDeldispatch, so running that bed elsewhere would still replaypacman -Ragainst the workstation and remove the operator'shelm/kubectlagain. The warning is lifted project-wide only when#762merges. I am running it here, and only here, precisely because the binary above proves the venue path.R10 evidence so far, on the final tree
29c75ea6(binary2026.276.1115),check-kind-host-vmbeing the bed whosecleanup-check-kind-host-memberstep is this issue:check-group— PASS, 15/15ok: true, 0ok: falsecheck-builder-vm— PASS, 15/15ok: true, 0ok: falsecheck-kind-host-vm— running (2026.276.1228);vm-build✓,vm-create✓,deploy-add✓, member live-probing. This is the run that must turncleanup-check-kind-host-membergreen — the step that was the only red one in the pre-fix run (2026.276.0928,ok: false, 14/15 green, fourtarget not foundthen the host's ownhelm/kubectlremoved).check-pod-overlay— queued solo.Next, in order: bed 3 reports → bed 4 reports → one push of
#762→pr-validatorPASS arms native auto-merge (squash, nogh pr merge) →tag-on-mergemints the CalVer → this issue closes with that tag and the merged-PR link, as aRESOLVEDon this thread.Agent:
readme-truth· session2a317871-ba03-4713-89ba-8edbd4059c27Assisted-by: Claude Code 2.1.288 deepseek-v4.1-flash:cloud (analysed on a live system)
fix(charly): the teardown of a nested member keeps its venue (charly#…
Merge origin/main into feat/nested-members-748, and bump the #765 con…
aitrawog commentedon Oct 4, 2026
STATUS — leg 3 is up:
opencharly/charly#762at head24832128, with the three-repo chain complete on both of its producers.The chain, and where each leg stands:
opencharly/spec#DeployNodeDelDispatchRequestwire fields (ancestor_paths/ancestor_nodes)#190, tagv0.2026276.1103opencharly/plugin-fleet#31, tagcandy/plugin-fleet/v0.2026276.1113opencharly/charlyDelthe parent executor#762, head24832128Leg 3's seam, precisely. The
addhalf already handsAdda live parent executor viaEmitOpts.ParentExec(which is what makes an in-substrate nested member deploy into its parent's venue).Delhad no equivalent: the del dispatch carried noVenueJSONat all, soresolveRootExecutorfell through tospecexec.RootExecutorForDeployNode(req.Node)— the operator's host for a member with an emptyhost:— and replayed the member's reversible ops there.charly/host_build_deploy_node_del_dispatch.gonow runsspec.ReconstructParentExec(req.AncestorPaths, req.AncestorNodes, deriveChildExecutorForPath)and applies it throughapplyDelParentExec, thedeltwin ofapplyParentExecOverride. An empty ancestor list leaves the previous behaviour untouched, and a lifecycle substrate is skipped exactly as theaddhalf skips it — so nothing is over-reached.Proof, and its honest bound. Six assembled disposable beds ran on this head; the per-bed
summary.ymlverdicts are in the PR's §3. Four of them —check-group,check-builder-vm,check-kind-host-vmandcheck-pkg-uninstall— are red atdeploy-addonopencharly/sdk#342, a regression already onorigin/main, filed and claimed by this session, disclosed on the PR before the beds finished and then confirmed by all four with a byte-identical signature.check-kind-host-vmis the bed whose whole-tree teardown forks the freshdeploy delthis leg repairs, so its green run is the run that matters here, and it cannot execute past step 3 until#342lands. That is why the tier is capped atanalysed on a live system, and it is disclosed rather than implied.charly/pr-validatoris running on#762. I will report the verdict here.Agent:
readme-truth· session2a317871-ba03-4713-89ba-8edbd4059c27Assisted-by: Claude Code 2.1.288 deepseek-v4.1-flash:cloud (analysed on a live system)
Merge origin/main (7de504f) into feat/nested-members-748
aitrawog commentedon Oct 4, 2026
STATUS —
charly#762is now at head8d2c9e69(pushed6ee0aec6..8d2c9e69), the exact tree the six-bed R10 roster ran on, and it closes this issue. The last note on this thread named24832128, which is two heads stale.What moved. One authored commit,
8d2c9e69— thego mod tidythe review asked for, dropping the two superseded pin pairs the merge's union had left behind. Andmainadvanced 8 commits (7de504ff → ae1b7977) while the roster ran, includingcharly#769, which replaced the CI lint step with the curated invocation (( cd charly && golangci-lint run ./... )) — the fix forcharly#767, whererun ./charly/...from the repo root silently selected the root baseline config and never ran the curated set.So the body does not merge main — it measures it. The base delta is provably inert for this change (zero file overlap with this diff; the merge's own stat is the same ten files and the same
+261/−80as this head's diff;deploy:pod's ref byte-identical), so moving the head would invalidate six bed runs to buy nothing. Instead §2b″ builds the merge in a throwaway worktree and runs the whole CIgojob from main's ownci.ymlagainst it: testsexit=0, tools sweep clean, and the curated lint0 issues.exit=0 on a cold cache — the one thing §2b′ could not answer. Disclosure, not absorption.Roster on this head, each read from its own
summary.yml:check-pkg-uninstall10/10,check-group15/15,check-builder-vm15/15,check-kind-host-vm15/15,check-commands-local6/6 — allok: true, zero failed steps.check-pod-overlayis run and listed withok: falseon itsupdatestep, a step from which no changed statement is reachable (a top-levelpod:deploy has no ancestor chain, so both changed venue seams return on their first guard); its red is acharly#699watchdog kill, routed tocharly#650.The fresh
charly/pr-validatorrun on8d2c9e69is the gate. I will report its verdict on this thread.Agent:
readme-truth· session2a317871-ba03-4713-89ba-8edbd4059c27Assisted-by: Claude Code 2.1.288 deepseek-v4.1-flash:cloud (fully tested and validated)
aitrawog commentedon Oct 4, 2026
STATUS — head pointer correction, because this thread would otherwise send the next reader to a superseded commit:
charly#762is ateb3ad4b0, not8d2c9e69. TheSTATUScomment above is mine and it is now stale —8d2c9e69is the head's merge parent.gh pr update-branchproducedeb3ad4b0=8d2c9e69+ today'sorigin/main(ae1b7977); local andorigin/feat/nested-members-748agree (verified byfetch).Why this matters here and not only on the PR: the verdict that blocked
#762(5983498036) turns on exactly this. Its block is that the R10 roster "ran on8d2c9e69, the head's second parent — a different tree", and that a file-by-file "the base move is inert" argument does not substitute for re-earning the proof on the tree that ships. So the six-bed roster is being re-earned on the head's own tree right now, one tree / one binary / one sequence:eb3ad4b0;charly version=2026.277.1829, and that stamp is a pure function of the head commit —scripts/bootstrap-charly.shandscripts/calver.shderive it only from the HEAD commit's UTC date ("the build clock is never consulted"), and the merge-parent roster recorded the matchingversion=2026.277.1417;19:21:20Z; the merge-parent roster took 3 h 19 m end to end, so ETA ≈23:20Z;summary.ymlgoes onto the PR thread as its own comment, whichever way it lands; §3 of the body is then rewritten in one revision to be the head's roster.Nothing else about this issue's fix has changed. The diff is still exactly 10 files / +261 −80 against
ae1b7977, and the re-nested members, the#765teardown venue and the#771declared-minus-installed witness are exactly as described above. The head moved because the base moved, not because the fix did.Agent:
readme-truth· session2a317871-ba03-4713-89ba-8edbd4059c27Assisted-by: Claude Code 2.1.288 deepseek-v4.1-flash:cloud (fully tested and validated)
fix(charly): land the #748 nested in-guest member fix with its #765 d…
aitrawog commentedon Oct 5, 2026
RESOLVED —
opencharly/charly#765is closed by the merge ofopencharly/charly#762.charly/pr-validatorPASS)48f075ca39c68f3f0c367a28c56000ebe2959d6fv2026.278.0912(written bytag-on-merge, tag points at the merged HEAD)What shipped: the del path re-derives its venue from the ancestor chain host-side in
charly/host_build_deploy_node_del_dispatch.go, so a nestedcharly deploy del <root>.<member>forks into the guest instead of mutating the workstation. Proven on the shipped head: the forkeddeploy delteardown runs green in three beds —check-group,check-builder-vmandcheck-kind-host-vmeach end withcleanup-<member>ok: true/errors: 0, each log endingRemoved external deploy <id> (local)(pasted in §3).The completing half of this chain is the charly-side change; every producer leg it pins was merged and tagged before it (the chain is tabulated in the PR body's
## Depends onsection). Closing by hand becauseCloses #765is parsed by GitHub but does not auto-close.Agent:
readme-truth· session2a317871-ba03-4713-89ba-8edbd4059c27Assisted-by: Claude Code 2.1.288 deepseek-v4.1-flash:cloud (fully tested and validated)