Repository navigation
fix(check): build a nested child's deploy key from its root - #128
Conversation
bedAdd converted the whole `<root>.<child>` address through deployKeyForBed, which splits at the FIRST dot. That is the namespace boundary only for a namespaced root; for a non-namespaced root it is the root/child boundary, so `check-containerd-vm.check-containerd-vm-member` became the nonexistent key `check-containerd-vm/check-containerd-vm-member` and the bed failed at `deploy add` before any check ran (#127). Convert the root with deployKeyForBed and then append the child, and use that path at all five nested-child deploy/redeploy call sites. Add the missing local-root-with-nested-child test, asserting the whole argv; the namespaced-root arm is asserted unchanged. Closes #127 *Agent: `containerd-crabbox-program/w14` · session `8b1c01cf-7f79-4a75-bff8-240415a06208`* *Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)*
Review — PASSWhat the change doesThe diff converts the nested-child deploy ref correctly: I traced both arms against
A child containing its own dot is also handled correctly in both arms ( Tests
Scope & cleanliness
Comments / sign-offThere are zero comment threads, so no maintainer sign-off exists and none is claimed. The change stands on its own evidence: a test that fails without the mechanism change and passes with it, plus a coherent, self-consistent refactor. No secrets, injection, new dependencies, or privilege changes. No blocking findings. Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
|
Post-merge finding filed: Agent: |
Summary
Fixes #127: a bed whose root is not namespaced could not deploy a nested child member.
bedAddhanded the whole<root>.<child>roster address todeployKeyForBed, which splits at the FIRST dot. That dot is the namespace boundary only for a namespaced root; for a non-namespaced root it is the root/child boundary, socheck-containerd-vm.check-containerd-vm-memberbecame the nonexistent keycheck-containerd-vm/check-containerd-vm-memberand the bed failed atdeploy addbefore any check ran.The mechanism fix converts the ROOT with
deployKeyForBedand then appends the child, via one newbedAddChild(root, child, tag)helper used by all five nested-child deploy/redeploy call sites (VMLocalChildKeys, kubevirtChildKeys, the pod arm'sChildKeys, and both fresh-rebuild redeploy loops). The namespaced-root arm is unchanged:openclaw.check-openclaw-pod+childstill yieldsopenclaw/check-openclaw-pod.child.The missing control named in the issue is closed: the new test asserts the whole argv for a non-namespaced root with a nested child, and the namespaced arm is asserted alongside it.
How tested
Throwaway minimal fixture (not committed), mirroring the failing bed shape: a non-namespaced bed with a nested local child.
Pre-fix, the mangled key fails verbatim (real
opencharly/layer-containerdmanifest, whose only VM bed ischeck-containerd-vm):Same mechanism on the minimal fixture:
The corrected dotted key resolves live at the deploy resolver:
The new test fails against the pre-fix mechanism, and the namespaced arm stays green (mutant =
bedAddChildreverted tobedAdd([]string{root + "." + child}, tag); the mutant line was present in the file before this run):Post-fix, both arms pass:
Full gate on the committed tree (
git status --shortempty before the run):Repo structural gate and the repo's own disposable bed (run on the same tree content that became this commit):
Scope of the live proof, stated honestly: the host
charlybinary used for the bed exercises its bakedcommand:checkplugin, not the changed source. So the bed is the repo's structural smoke, not proof of this diff. The diff's proof is the mutant-killed argv test plus the live deploy-resolver run above (mangled key rejected, corrected key accepted). A fresh-rebuild R10 bed that links this plugin source is thecheck-localwitness inopencharly/charly, which this repo'sAGENTS.mdnames and which is not part of this bounded PR.Namespaced arm: green post-fix, and green against the mutant too (which is exactly why the pre-fix test suite missed the defect).
Branch diff (
origin/main...HEAD): 3 files, +78/−17.Rulebook compliance
git-workflow,go,strict-policy,root-cause-analyzer,check,plugin, andagentsbefore any code/git action; read the repo'sAGENTS.md.TestBedAddChildConvertsTheRootBeforeAppendingTheChild, and the test is proven able to fail with a mutation that only reverts the mechanism.bedAddChildbuilds the child ref by converting the root and appending, and all five nested-child call sites use it;bedAddandbedAddChildshare one argv assembler (bedAddResolved). No sibling implementation is left behind.git grep -nF 'bedAdd([]string{name + "." + childKey}' HEAD→ no output,rc=1; the five replacements are present (git grep -n 'bedAddChild(name, childKey' HEAD | wc -l→5). The remainingname+"."+childKeyisdeploy del, whose dotted-path resolver is the correct address for it..worktrees/w14-plugin-check-bedkey/plugin-checkoff freshorigin/main;git statusread before staging; no force-push, no hook bypass, no submodule edit, no push tomain.charlybinary rebuild was required or claimed; no runtime OS dependency added.1953fb2/ treee426187;gofmtclean, build/vet/test green,box validate0 warnings, repo bed PASS with 0 warnings. One cutover, one commit.Change classification
Plugin-library Go source + tests (
command:checkbed runner). Not a schema, pin, gitlink, docs, or runtime OS-dependency change. Class gate: modulego build/go vet/gofmt/go test, repocharly box validate, and the repo's host-local disposable bed.Filed issues
None — no finding was separable from this change. (The brief's sibling
plugin-check#100remains a separate, already-filed defect at a different call site and is not touched here.)Closes #127
Agent:
containerd-crabbox-program/w14· session8b1c01cf-7f79-4a75-bff8-240415a06208Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)