Repository navigation
feat(command): externalize charly box build-mode verbs to command:box (candy/plugin-box) - #89
Conversation
… (candy/plugin-box) P15: the build-mode `charly box` verb HANDLERS (generate/validate/new/pkg) move out of charly core into a new COMPILED-IN command plugin candy/plugin-box, nested under the shared `box` grammar group via the NestedCommandProvider mechanism (core BoxCmd stays the dispatch spine, keeping build/merge/labels/feature/inspect/list). Seams: generate→InvokeProvider(build:generate), new→sdk/kit.ScaffoldCandy directly, validate/pkg→HostBuild(cli)→hidden K1-doomed __box-validate/__box-pkg. inspect/list retained in core (K1). Zero aliases; no sdk/proto change. Also: validate.go dead-stub sweep (delete empty validateBaseReferences/validateDNS, clean validateLibvirt dead vars + its unused cfg param). The #1 arbiter_host.go + #3 host_build_* plan rows are RETIRED as false premises — RDD-verified as the live host-dependency halves of already-externalized seams; documented in CHANGELOG as boundary-law-justified residue-until-K1/K2/K5. Box-verb R10 check-coverage added to check-commands-local (box-new-validate-generate + box-pkg). R10: check-commands-local PASS (box verbs run end-to-end → real Containerfile; validate.go load path exercised). go test ./... + golangci 0 + gofmt + cue:gen repro all green. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01TWKE7V6Cp9z2YbAfSvXPzs
Merge-time finalize (pr-validator V-P15b): reconcile the plugins gitlink to the merged #43 main (a309283, docs-only R5 sweep) per B6, and stamp the merge-time CalVer (CHANGELOG/2026.194.0751.md -> 2026.194.1124.md, H1 rewritten). Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01Fgfbn9VHa9o4ouPHtJo3eR
pr-validator — APPROVED ✅Change class: charly/sdk Go (code/config) — command-plugin externalization + validate.go dead-stub sweep Independent fresh re-validation (V-P15b; trusts no author claim; re-derived every verdict). Verdict: PASS. Architecture gate — placement: CORRECT. Ground-truth (re-run / re-derived by me, not trusted):
Decision: APPROVED. Reconciled the Assisted-by: Claude (analysed on a live system) |
/#61) Updates the bed-run evidence to the full 7-step check-charly-selftest-pod run (2026.198.2033, post sdk#71 R3/CUE fixes) and documents all 4 check-live failures found there, each independently root-caused: - 2 claude-code failures: a NEW cross-worktree candy-resolution contamination finding (task #61, sequenced post-W9 since the fix lands in this wave's own loader-cone relocation target) — the check-bed's repo-identity-keyed candy cache picked up a sibling worktree's uncommitted higher-CalVer candy via the shared git object store's "newest wins" version arbiter. - 2 pre-existing main defects (MCP box.list.boxes unknown-tool + `charly check --help`'s generic placeholder): baseline-reproduced by two independent parties on clean main; root-caused to buildCLIModel()'s pre-existing inability to reflect dynamic out-of-process command words (PR #89, an ancestor of the W9 fork point) — tracked as task #60. None of the 4 are W9 regressions; the change class's tier stands. Assisted-by: Claude Sonnet 5 (analysed on a live system)
Summary
P15 — the build-mode
charly boxverb HANDLERS (generate/validate/new/pkg) move out of charly core into a new COMPILED-IN command plugincandy/plugin-box, nested under the sharedboxgrammar group. CoreBoxCmdstays the dispatch spine (keeps build/merge/labels/feature/inspect/list + the authoring verbs). Plus a validate.go dead-stub sweep. Advances the v2 plugin-host core direction.Change class: code / config → tier
fully tested and validatedWhat moved (Unit A — command:box)
generate→InvokeProvider(build:generate)(candy/plugin-build; the SAME path deleteddispatchBoxGeneratetook — single impl, no dup).new→sdk/kit.ScaffoldCandy/ScaffoldProject/AddBoxdirectly (scaffold engine already in sdk/kit, refactor(scaffold): consume the box-new engine from sdk/kit (P15 sub-unit) #72). Zero core reentry.validate/pkg→HostBuild("cli")→ hidden K1-doomed core__box-validate/__box-pkg(in-code marked).inspect/listretained in core (render the full project-resolved graph; externalize at K1). Excluded verbs untouched: build/merge/labels/feature.NestedCommandProviderpath (capMeta.cmdParent + CommandParent() + buildUnitInProc srv-interface detection — same pattern as loaderkit.DocParser). Kind-agnostic, boundary-law-clean (TestNoSinglePluginAPISurface passes). Zero aliases; no sdk/proto change.Unit B — validate.go clean leaks
Deleted empty
validateBaseReferences/validateDNS(+ call sites); cleanedvalidateLibvirtdead vars + its unusedcfgparam.Retired plan rows (RDD-verified false premises → boundary-law residue)
#1 arbiter_host.go + HostArbiterand#3 host_build_*were NOT deleted/moved — they are the LIVE host-dependency halves of already-externalized seams (arbiter called by plugin-preempt 8× + the check-preempt-local bed; host_build_* subsystems documented as core). CHANGELOG documents them as residue-until-K1/K2/K5 with tracked exits (arbiter lifecycle legs→InvokeProvider post-K1, GPU legs operator-dropped; host_build_* engine bodies→loadkit/enginekit; retention→enginekit K2/K5). The box spine is transitional (end state = emptyboxgroup). Cross-ref validators → #46.R10 (fully tested and validated)
check-commands-local PASS (VM-nested, calver 2026.194.0820, all steps ok):
Delta re-gate after rebase onto c1fcaa6 (#33 + D2 + sdk 2977d5c):
go test ./...charly ok 60.9s + plugin-box ok ·go buildRC0 · golangci 0 · gofmt clean · cue:gen repro no-op · R5 grep clean (GenerateCmd/NewProjectCmd/NewBoxCmd/dispatchBoxGenerate/validateDNS/validateBaseReferences).Landing note (chain)
Paired with plugins PR opencharly/marketplace#43 (2 skill R5 fixes) — lands FIRST. This PR's
pluginsgitlink is provisionally at the plugins feat HEAD (305b649); reconcile it to the merged #43 main SHA before merging (B6). sdk gitlink is c1fcaa6's 2977d5c (unchanged by P15).Assisted-by: Claude (fully tested and validated)
https://claude.ai/code/session_01TWKE7V6Cp9z2YbAfSvXPzs