Skip to content

feat(bundle)!: charly bundle CLI → compiled-in command:bundle plugin (P13) - #71

Merged
atrawog merged 5 commits into
mainfrom
feat/p13-bundle-plugin
Jul 12, 2026
Merged

atrawog merged 5 commits into
mainfrom
feat/p13-bundle-plugin

Conversation

@atrawog

@atrawog atrawog commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

P13 — the charly bundle CLI becomes the compiled-in command:bundle plugin

The superproject half of P13 (consumes sdk#29, merged: deploykit seams + deploykit.VolumeMount).
The charly bundle … deployment CLI moves out of charly core into a COMPILED-IN
command:bundle plugin candy (candy/plugin-bundle), mirroring the landed P10 command:vm
pattern. The plugin owns the CLI GRAMMAR; the deploy ORCHESTRATION stays in core behind four
new host-build seams that run the existing handlers VERBATIM.

The plugin (candy/plugin-bundle, compiled-in command:bundle)

Owns the full BundleCmd Kong grammar — 9 subcommands (add/del/from-box/show/
export/import/reset/path/status), verbatim tags. Dispatch is IN-PROC via
Invoke(OpRun) (runBundleCommand → kong-parse). Each leaf reaches the host over
hostDeploySeam (the ONE bridge, R3): add/del/from-box → deploy-add/deploy-del/
deploy-from-box; show/export/import/reset/status → deploy-config (op-discriminated);
path → kit.DefaultDeployConfigPath() entirely plugin-side (no seam).

The four host seams (core, class-generic F11 nouns)

host_build_deploy_{add,del,from_box,config}.go reconstruct the renamed core orchestration
struct from the wire request and run its existing Run() VERBATIM. The old CLI types were
renamed to internal host-orchestration structs with Kong tags stripped
(BundleAddCmd→deployAddCmd, …); the BundleCmd group + the old builtin
(plugin_command_bundle.go) are DELETED. Orchestration bodies are byte-identical.

deploy-config is a DISTINCT seam from the entity-scoped config-resolve/config-persist
(whole-file operator management vs single-entity runtime state, zero shared handler code, R3).

Boundary-law outcome + the plan LOC-premise revision

bundle add is the deploy KERNEL DRIVER (loader, InstallPlan compiler, ResolveTarget,
live-executor composition — all Mechanisms that stay core), NOT wrappable capability code. So
net core LOC is ~flat (CLI grammar leaves, seam wrappers enter); the win is ARCHITECTURAL
(command:bundle is now a dual-placement plugin, no charly bundle CLI struct in core). The
original plan counted bundle as ~1710 movable LOC; this is corrected in the CHANGELOG. C15
partial state fold: LoadDeployFile+RemoveBoxDeploy+pure volume naming+VolumeMount →
sdk/deploykit; the rest stays core (loader/flock/migrate/Config-coupled). deploy_ref.go+
reconcile.go stay core (generic Mechanisms — boundary-law verdict recorded).

Verification (this branch)

go build ./... + go test ./... (charly; the 2 box/* tests are submodule-env only) +
golangci-lint run 0 issues + gofmt clean + pluginsgen reproducible + the R5 grep
self-test (every removed Bundle*Cmd returns only CHANGELOG). Live smoke of the
compiled-in command: charly bundle add/path/show/status dispatch through the seams
(exit 0, zero warnings; bundle add runs the byte-identical orchestration). Rebased onto
merged main (P14b #68 alias); sdk pointer bumped to merged sdk main (v0.2026193.1222). The
full disposable-bed roster — bundle add is every bed's entry — is the cross-cutting
acceptance gate.

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

https://claude.ai/code/session_019F9qvuw1b3twtH1HZEGvVY

atrawog added 3 commits July 12, 2026 14:12
… (P13)

The charly bundle deployment CLI moves out of charly core into a COMPILED-IN
command:bundle plugin candy (candy/plugin-bundle), mirroring the landed P10
command:vm pattern. The plugin owns the CLI GRAMMAR; the deploy ORCHESTRATION stays
in core behind four new host-build seams that run the existing handlers VERBATIM.

- candy/plugin-bundle: the BundleCmd Kong grammar (9 subcommands add/del/from-box/
  show/export/import/reset/path/status) dispatched IN-PROC via Invoke(OpRun). Each
  leaf reaches the host over hostDeploySeam (R3): add/del/from-box to
  HostBuild(deploy-add/deploy-del/deploy-from-box); show/export/import/reset/status to
  HostBuild(deploy-config) op-discriminated; path via kit.DefaultDeployConfigPath
  entirely plugin-side (no seam).
- host_build_deploy_{add,del,from_box,config}.go: the four class-generic host seams
  (F11) that reconstruct the renamed core orchestration struct and run its existing
  Run() VERBATIM. The old CLI types were renamed to internal host structs with Kong
  tags stripped (BundleAddCmd to deployAddCmd, etc.); the BundleCmd group + the old
  builtin registration (plugin_command_bundle.go) are DELETED.
- deploy-config is a DISTINCT seam from config-resolve/config-persist (whole-file
  operator management vs entity-scoped runtime state, zero shared handler code, R3).

Boundary-law note: bundle add is the deploy KERNEL DRIVER, not wrappable capability
code, so net core LOC is ~flat (CLI grammar leaves, seam wrappers enter) and the
original plan LOC premise is revised (recorded in CHANGELOG). C15 partial state fold:
LoadDeployFile + RemoveBoxDeploy + the pure volume naming + VolumeMount fold to
sdk/deploykit; the rest stays core (loader/flock/migrate/Config-coupled). deploy_ref.go
+ reconcile.go stay core (generic Mechanisms, boundary-law verdict recorded).

Assisted-by: Claude (analysed on a live system)
Claude-Session: https://claude.ai/code/session_019F9qvuw1b3twtH1HZEGvVY
# Conflicts:
#	charly/charly.yml
#	charly/plugin_command_bundle.go
#	charly/plugins_generated.go
#	go.work
@atrawog

atrawog commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — CHANGES REQUESTED ❌

Change class: charly/sdk Go + compiled-in plugin candy (command:bundle) + sdk submodule pointer bump (runtime class)
Head validated: d30004f737d8e032aa395254ee3cc59d57144582 (fresh clone)

I re-derived the verdict independently from the repo, CLAUDE.md, and the loaded skills — trusting none of the PR's claims. The architecture, code gates, boundary-law, SDD, and R5 identifier sweep all PASS. There is one blocking issue: an R1/R5 documentation-divergence incident.

❌ BLOCKING — R1/R5 documentation divergence (bundle plugin describes seams it does not use / that do not exist)

The command:bundle plugin's own docs and its baked ADE description describe a host-seam architecture that the code does not use.

Actual code — candy/plugin-bundle/bundle_cmd.go calls exactly the 4 real seams:
hostDeploySeam("deploy-add" | "deploy-del" | "deploy-from-box" | "deploy-config", …) → charly/host_build_deploy_{add,del,from_box,config}.go. (path is plugin-side, no seam — matches docs.)

False claim — that the plugin reaches the host via "config-resolve / config-persist / deploy-apply / cli HostBuild seams and verb:egress / verb:arbiter" — appears in four surfaces:

  • candy/plugin-bundle/plugin.go:12-13 (package doc)
  • candy/plugin-bundle/command.go:16-17 (file header)
  • candy/plugin-bundle/host_seams.go:14-17 (file header — it contradicts its own hostDeploySeam doc ~20 lines later, which correctly names deploy-add/del/from-box/config)
  • candy/plugin-bundle/charly.yml:14 — the description: baked into the ai.opencharly.description OCI label, so the false claim ships in every image composing this plugin (the ADE self-description contract)

Why it is a real divergence, not a stylistic nit:

  • deploy-apply does not exist as a registered host builder (absent from charly/*.go).
  • config-resolve/config-persist exist, but the PR body + CHANGELOG themselves state bundle does not share them ("deploy-config is a DISTINCT seam … zero shared handler code, R3").
  • verb:egress/verb:arbiter are never invoked by the plugin.
  • host_seams.go's header even maps a concrete-but-wrong mechanism ("config → config-resolve, ledger writes → config-persist, ResolveTarget + Add dispatch → deploy-apply") — the plugin does none of that; it forwards the whole command via one deploy-* seam and the core handler does config/ledger/ResolveTarget host-side.

Per CLAUDE.md R1 ("a divergence between any … code comment and observed reality … is an incident … BLOCKING in the current cutover") + R5 (claim-keyed sweep across the whole sibling-set). The CHANGELOG is correct (names the 4 real seams), so the divergence is confined to the 4 files above.

Fix (update-in-place — append a fix commit; do NOT close/recreate): sweep all 4 surfaces to name the actual seams (deploy-add / deploy-del / deploy-from-box / deploy-config) and delete the deploy-apply / config-resolve / config-persist / verb:egress / verb:arbiter references. Push; the status resets and I re-validate.

Checklist (verified from a fresh clone at d30004f)

  • [PASS] 0. security & anti-tampering (T1–T4): no exfiltration/scope-mismatch/weakened-gate/supply-chain; no manipulation
  • [PASS] 1. description complete (thorough; pasted evidence + roster-as-gate)
  • [PASS] 2. change-class gate matches evidence (runtime class; roster owned by persistent session — pending, not fraud)
  • [PASS] 3. attribution tier analysed on a live system — justified, not inflated
  • [PASS] 4. R0 skills honored (git-workflow, go/SDD, plugin/boundary-law, install-plan, capabilities)
  • [FAIL] 5. R1 — documentation divergence incident (the finding above); otherwise zero warnings (golangci-lint 0 issues, vet clean)
  • [PASS] 6. R2 no pre-existing/out-of-scope split (deploy_ref/reconcile stay-core verdict recorded)
  • [PASS] 7. R3 no duplication (hostDeploySeam = the one bridge; deploy-config distinct from config-resolve/persist)
  • [PASS] 8. R4 no ad-hoc workaround
  • [PASS] 9. R5 identifier sweep: Bundle*Cmd live only in the new plugin grammar, zero hits in charly/ core; plugin_command_bundle fully deleted (0 refs); no dual-mode path
  • [PASS] 10. R6/R8/R9 artifact + binary integrity (reproducible generated artifacts)
  • [PASS] 11. R10 coverage: Go e2e updated (bundle_del_diagnostics_test, bundle_members_test delGrammarStub guard, provider_command_test); live roster owned by team-lead — pending
  • [PASS] 12. SDD @100%: task cue:gen NO-OP (clean tree); no @go(-) added; no new hand-written *_wire.go/params; the 4 seam wire types are CUE-sourced (sdk/schema/seam.cue → generated); VolumeMount stays plain-Go in sdk/deploykit (resolved runtime state, never marshaled — correctly NOT a wire struct)
  • [PASS] 13. concurrency mandate + anti-cheat (full concurrent roster is team-lead's gate; no forbidden framing)
  • [PASS] 14. hard cutover — one atomic commit; old builtin deleted; no Phase-2/TODO
  • [PASS] 15. kernel/plugin boundary law: TestNoSinglePluginAPISurface PASS; the 4 seam kinds are class-generic action nouns (never a substrate/provider word); deploy kernel stays core
  • [PASS] 16. disposable-only autonomy (n/a to this diff)
  • [PASS] 17. clean architecture + go gates: gofmt clean, golangci-lint 0 issues, vet clean, go test ./... ok (charly 46s + pluginsgen), plugin-bundle module builds
  • [PASS] 18. CHANGELOG present (CHANGELOG/2026.193.1355.md, H1 matches filename)

Decision: CHANGES REQUESTED. The cutover is architecturally sound and every code/SDD/boundary-law/lint gate is green, but the command:bundle plugin ships a false self-description of how it reaches the host (4 surfaces, incl. the baked OCI label; one named seam deploy-apply doesn't exist). Per R1/R5 a documentation divergence on the surface this cutover creates is blocking. Fix the 4 surfaces to name the real seams and re-push; I will re-validate.

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

atrawog added 2 commits July 12, 2026 15:09
The plugin-bundle skeleton doc comments + baked description named non-existent
seams (config-resolve/config-persist/deploy-apply/cli + verb:egress/verb:arbiter,
copied from the plugin-vm template) instead of the four actual host-build seams
deploy-add/deploy-del/deploy-from-box/deploy-config. Swept all four surfaces
(plugin.go/command.go/host_seams.go + the baked charly.yml description) to name the
real seams; also removed the stray claim that the plugin compiles InstallPlans (the
host does, behind the seam). R1/R5 documentation-divergence fix surfaced by V-71;
false claim contained to these four surfaces (grep-verified). Docs-only, non-behavioral.

Assisted-by: Claude (analysed on a live system)
Claude-Session: https://claude.ai/code/session_019F9qvuw1b3twtH1HZEGvVY
Merge-time version stamp applied by the fresh pr-validator: the CHANGELOG
placeholder is renamed to the merge CalVer and its H1 rewritten to match.
No schema bump (no #SchemaVersion change in this cutover).

Assisted-by: Claude (analysed on a live system)
Claude-Session: https://claude.ai/code/session_01PojeSiBRThQS2v5w8PziAR
@atrawog

atrawog commented Jul 12, 2026

Copy link
Copy Markdown
Contributor Author

pr-validator — APPROVED ✅ (supersedes the earlier CHANGES-REQUESTED verdict)

Change class: charly/sdk Go + compiled-in plugin candy (command:bundle) + sdk submodule pointer bump (runtime class)
Head validated: 1279077977a8967a920878f01d5d3a66e303127b (73ef242 docs-fix + merge-time CalVer stamp)

The prior blocking finding (R1/R5 documentation divergence — the plugin described config-resolve/config-persist/deploy-apply/verb:egress/verb:arbiter seams it does not use) was fixed in-place on 73ef242: all 4 surfaces (plugin.go / command.go / host_seams.go / charly.yml description) now name the 4 real seams deploy-add/deploy-del/deploy-from-box/deploy-config; the stray "compiles InstallPlans over sdk/deploykit" claim is gone; the CHANGELOG carries a proper R1/R5 RCA. Re-verified independently: fast-forward superset (no force), delta is docs-only (every changed .go line is a // comment; zero code lines), R5 re-grep clean, no regression.

Checklist (re-derived from a fresh clone)

  • [PASS] 0. security & anti-tampering (T1–T4)
  • [PASS] 1. R1 — doc-divergence incident RESOLVED; zero warnings (golangci-lint 0 issues; vet clean; the only warning-looking bed lines are third-party pacman guest info, RCA'd as baseline/non-charly)
  • [PASS] 2. change-class gate matches pasted evidence (R7/R10; no dry-run/rebuild-alone fraud)
  • [PASS] 3. attribution tier analysed on a live system — justified, not inflated
  • [PASS] 4. R0 skills honored
  • [PASS] 5. R1 RCA on every finding; zero warnings; no flake/transient framing
  • [PASS] 6. R2 no pre-existing/out-of-scope split (deploy_ref/reconcile stay-core verdict recorded)
  • [PASS] 7. R3 no duplication (hostDeploySeam = one bridge; deploy-config distinct from config-resolve/persist)
  • [PASS] 8. R4 no ad-hoc workaround
  • [PASS] 9. R5 hard cutover + grep self-test (Bundle*Cmd only in the new plugin grammar, zero in charly/ core; plugin_command_bundle deleted; no dual-mode)
  • [PASS] 10. R6/R8/R9 artifact + binary integrity (final-SHA binary rebuilt to 2026.193.1309, re-ran a bed green)
  • [PASS] 11. R10 disposable-only, fresh-rebuild, zero-warning, check-coverage: 5-bed concurrent roster GREEN — check-exampledeploy 5/5 (71s), check-sidecar-pod 11/11 (239s, 0 warn), check-k3s-vm 7/7 (227s), check-charly-vm 7/7 (280s), check-group 5/5 (999s, nested-VM guest marker in initial+rebuild); every bed exercised command:bundle via deploy-add through the fresh-update gate; final-SHA re-run confirmed
  • [PASS] 12. RDD / ADE (version + description + ≥1 check per candy) / SDD @100% (task cue:gen NO-OP; no @go(-); 4 seam wire types CUE-sourced in sdk/schema/seam.cue; VolumeMount stays plain-Go in sdk/deploykit — resolved runtime state, correctly NOT a wire struct)
  • [PASS] 13. concurrency mandate (full concurrent disposable roster; no forbidden framing)
  • [PASS] 14. hard cutover — one atomic cutover; old builtin deleted; no Phase-2/TODO
  • [PASS] 15. kernel/plugin boundary law: TestNoSinglePluginAPISurface PASS; the 4 seam kinds are class-generic action nouns; the deploy kernel (loader/InstallPlan/ResolveTarget) stays core
  • [PASS] 16. disposable-only autonomy (roster on disposable: true beds)
  • [PASS] 17. clean architecture + go gates (gofmt clean, golangci-lint 0 issues, vet clean, go test ./... ok)
  • [PASS] 18. CHANGELOG present (finalized to CHANGELOG/2026.193.1318.md at merge; H1 rewritten to match)

Decision: APPROVED. The charly bundle CLI → compiled-in command:bundle externalization honors the kernel/plugin boundary law (deploy kernel stays core; the 4 seams are class-generic nouns), SDD (seam wire types CUE-sourced; VolumeMount correctly plain-Go), and hard-cutover (old builtin deleted, no dual-mode). Every code/lint/test gate is green and the full disposable-bed roster passed on fresh rebuilds with the changed path executing live, confirmed on the final SHA. Merging --squash, tagging v2026.193.1318.

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

@atrawog
atrawog merged commit 3f6ef75 into main Jul 12, 2026
@atrawog
atrawog deleted the feat/p13-bundle-plugin branch July 12, 2026 13:22
atrawog added a commit that referenced this pull request Jul 12, 2026
Rebase #70 onto merged main 3f6ef75 (strict:true up-to-date). Only charly/go.mod
conflicted (sdk require): kept v0.2026193.1308 (ccd68e0, descendant of P13 sdk). Re-ran
pluginsgen: plugin-build + plugin-bundle + plugin-alias all compiled-in (go.work +
plugins_generated.go). P13 did not touch the build-engine files (no overlap). Fresh-rebuild
R10 re-confirmed: build exit0 + go test green + golangci-lint 0 issues + real fedora build exit0.

Assisted-by: Claude (fully tested and validated)
Claude-Session: https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif
atrawog added a commit that referenced this pull request Jul 14, 2026
Rename the placeholder CHANGELOG to the merge-time CalVer and align its H1.
Superproject leg of the check/bed-correctness batch (#66/#71/#75).

Assisted-by: Claude (fully tested and validated)
atrawog added a commit that referenced this pull request Jul 14, 2026
…ks + module-key validation fix

The check/bed correctness batch — three pre-existing bed/validation defects landed as
one atomic superproject cutover (producer legs merged first: sdk#47 image_tag wire
field + plugins#55 agents-SKILL R1 correction).

#75 — bed-scoped fixture image tags (the shared-tag concurrency collision class): a
per-run <bed-root>-<runCalver> tag threaded via spec.CheckBedReply.ImageTag, passed as
--tag on every build + deploy, with resolveNodeOverlays seeding node.Version and the
k8s preresolver honoring it (mirroring build_overlay's tag!="" branch). Retention-safe
(same image name → same label group).

#66 — debootstrap-builder baked checks: qemu-img version scalar-equals → contains
matcher (R4); grub-install check kept (correct) + the missing grub2-common added
(provides /usr/sbin/grub-install, dropped by --no-install-recommends).

#71 — validatePkgConfig module/modules Raw-key mismatch: Raw["modules"]→Raw["module"]
(the singular authored key), making the rule reachable; discriminating test + guard.

sdk gitlink → merged 5ad481d (v0.2026195.742); plugins gitlink → merged 7075eda
(v2026.195.0759). Validated independently by a fresh pr-validator: delta re-gate green
after update-branch (golangci-0 + tests on all 3 modules), forward-gitlinks verified,
#75 concurrent-pair R10 corroborated.

Assisted-by: Claude (fully tested and validated)
atrawog added a commit that referenced this pull request Jul 16, 2026
plugins docs PR #71 merged; plugins main is now a11d933 (tag
v2026.197.0726), a fast-forward descendant of this branch's prior pin
(784c4ba), verified via `git merge-base --is-ancestor` before applying.
The bumped range is entirely documentation (a CHANGELOG entry plus skill
.md edits) — no code.

Assisted-by: Claude (documentation reviewed)
atrawog added a commit that referenced this pull request Jul 29, 2026
…#55 step 3-I)

Core's host-owned resolved-project envelope projector becomes the plugin capability
`build:project` on candy/plugin-build (Op OpResolve for resolve, OpValidate for the
error-tolerant validate leg) — a class-generic word on the existing build class (F11,
no new core seam). The ~8 peer consumers (box-inspect, bundle node-resolve+compile,
check-project, preempt-arbiter, installstep, status nested-tree, substrate k8s/android
status) swap HostBuild("resolved-project") → InvokeProvider("build","project").
ResolvedBox becomes a CUE-sourced spec contract (embedding wrapper).

hostBuildResolvedProject / buildResolvedProjectFromDir / resolvedProjectBuilderKind +
their registration + the projectResolvedProject wrapper are deleted from core; the
render-coupled projectResolvedProjectWithBoxes/fillNamespacedBoxes remain with a named
exit to step 3-II (task #71). Net non-test core: −29 LOC; loaderkit coupling removed
from 20 core files.

Producers merged first (B2): spec v0.2026210.1533, sdk v0.2026210.1407.

R10: check-pod 13/13 + check-builder-vm 10/10 on a fresh ./bin/charly rebuild;
go build/test/vet/gofmt/box-validate green; TestPluginsGenReproducible +
TestNoSinglePluginAPISurface pass. R5 grep self-test (whole-tree, both directions)
clean.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
atrawog added a commit that referenced this pull request Jul 29, 2026
…k/buildkit onto spec

#55 step 3-III (final B2 leg): charly core + build plugins repoint the build-vocabulary
value-type containers buildkit.{DistroConfig,BuilderConfig,BuilderMap,WrapDistroDef,DistroTagChain}
→ spec.X (+ DistroDef→spec.ResolvedDistro / FormatDef→spec.Format / BuilderDef→spec.Builder),
dropping the now-unused sdk/buildkit import where no behaviour symbol remains. Import-purity:
charly files importing sdk/buildkit 51 → 42. InitConfig stays in buildkit (init-composition
policy → #65/#71). Consumes merged spec v0.2026210.2052 + sdk v0.2026210.2103.

Runtime-neutral: the repointed types are type aliases in sdk/buildkit (DistroConfig =
spec.DistroConfig, …), so the rename produces byte-identical compiled code — gated by
check-pod-overlay 13/13 + check-builder-vm 10/10 on a fresh rebuild.

Assisted-by: Claude Code Anthropic Claude Opus 4.8 (fully tested and validated)
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