Skip to content

feat(command): externalize charly box build-mode verbs to command:box (candy/plugin-box) - #89

Merged
atrawog merged 2 commits into
mainfrom
feat/p15-residual-folds
Jul 13, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/p15-residual-folds

Conversation

@atrawog

@atrawog atrawog commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

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. Core BoxCmd stays 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 validated

What moved (Unit A — command:box)

  • generate → InvokeProvider(build:generate) (candy/plugin-build; the SAME path deleted dispatchBoxGenerate took — single impl, no dup).
  • new → sdk/kit.ScaffoldCandy/ScaffoldProject/AddBox directly (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/list retained in core (render the full project-resolved graph; externalize at K1). Excluded verbs untouched: build/merge/labels/feature.
  • Wired the compiled-in NestedCommandProvider path (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); cleaned validateLibvirt dead vars + its unused cfg param.

Retired plan rows (RDD-verified false premises → boundary-law residue)

#1 arbiter_host.go + HostArbiter and #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 = empty box group). Cross-ref validators → #46.

R10 (fully tested and validated)

check-commands-local PASS (VM-nested, calver 2026.194.0820, all steps ok):

PASS box-new-validate-generate exit=0  (box new→candy→box→validate→generate → real Containerfile; command:box end-to-end)
PASS box-pkg-dispatches        exit=0  (box pkg nested-command dispatch)
+ settings-list / candy-help / clean-dry-run PASS

Delta re-gate after rebase onto c1fcaa6 (#33 + D2 + sdk 2977d5c): go test ./... charly ok 60.9s + plugin-box ok · go build RC0 · 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 plugins gitlink 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

atrawog added 2 commits July 13, 2026 10:36
… (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
@atrawog

atrawog commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

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. command:box is a clean command-plugin externalization via the generic NestedCommandProvider mechanism: the parent word "box" is DATA the plugin declares (CommandParent()), consulted generically by the host's parent != "" guard — no per-kind branch, TestNoSinglePluginAPISurface passes. cli.Box.Plugins = nestedCmds["box"] is legitimate CLI-spine grammar wiring (mirrors the landed check pattern). Every retained core surface cites a tracked K-wave exit and is marked in-code (inspect/list → K1; __box-validate/__box-pkg reentries → K1-doomed; arbiter_host/host_build_* → K1/K2/K5; unified.go validators → #46) — tracked residue, not silent keeps. No new concrete-kind leak into the kernel.

Ground-truth (re-run / re-derived by me, not trusted):

  • R10 — CROSS-CHECKED on disk: .check/check-commands-local/2026.194.0820/summary.yml exists, ok: true, 5 steps all ok (total 90s); check-live.log shows box-new-validate-generate exit=0 (scaffold→validate→generate→real Containerfile) and box-pkg-dispatches exit=0 genuinely ran — the new-functionality coverage, no silent skip. Would FAIL without the change.
  • Go gates (my own re-run @ d886733 tree) — gofmt clean · go build charly+plugin-box RC0 · go vet RC0 · go test ./... charly ok 58.5s + plugin-box ok + pluginsgen (TestPluginsGenReproducible) · golangci-lint 0 issues (charly + plugin-box).
  • SDD @100% — task cue:gen on the committed tree = clean NO-OP (reproducible); no hand-edited *_gen.go; plugin-box correctly ships NO schema (pass-through CLI args, InputDef==""); no new *_wire.go/params struct; no @go(-) added.
  • R5 — my git grep (GenerateCmd/NewProjectCmd/NewBoxCmd/NewCandyCmd/dispatchBoxGenerate/validateDNS/validateBaseReferences) → only accurate past-tense provenance COMMENTS; no stale live refs; no transitional/dual-mode path (the __box-* reentries are the SOLE path, not a legacy dual-mode).
  • R3 — generate → single build:generate impl (old dispatchBoxGenerate deleted); new → shared sdk/kit scaffold engine. No duplication, no sibling candies.
  • Security (T1–T4) — diff↔description match; plugin-box go.mod = standard sdk-only dep profile, zero charly-core import; no secrets/egress/weakened-gate; no manipulation.

Decision: APPROVED. Reconciled the plugins gitlink to the merged #43 main (a309283) per B6, finalized CalVer 2026.194.1124. Merging (squash) + tagging.

Assisted-by: Claude (analysed on a live system)

@atrawog
atrawog merged commit 8d76b07 into main Jul 13, 2026
@atrawog
atrawog deleted the feat/p15-residual-folds branch July 13, 2026 11:26
atrawog added a commit that referenced this pull request Jul 17, 2026
/#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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant