Repository navigation
feat(alias)!: externalize the alias CLI into compiled-in command:alias (P14b) - #68
Conversation
…s (P14b)
The alias half of P14 (core-minimization): the `charly alias …` CLI moves out of
core into candy/plugin-alias (command:alias, compiled-in) — the command-class
analogue of P10's command:vm. Dispatched in-proc via Invoke(OpRun) → kong-parse the
AliasCmd tree; the `add` (image-exists guard) and `install` (read the baked
ai.opencharly.alias label) handlers reach the host over the generic HostBuild("cli")
reentry to `charly box labels …`, so no new host seam is added.
Core keeps only the genuinely-separate alias concerns, each owned by its own cutover:
the build/label collector CollectBoxAlias/CollectedAlias (P8b build engine / P14a OCI
labels) and the validation regex aliasNameRe (P15 OpValidate) relocate to
charly/alias_collect.go; the `charly box list-aliases` box-verb ListAliasesCmd (P15
box-family) stays.
BREAKING: `charly alias` is now a dynamic command candy (a pass-through Args holder),
so its subcommands are no longer reflected into the out-of-process MCP tool surface
(the alias.* tools are removed) — matching the vm/feature/preempt externalizations.
The `charly alias add/install/list/remove/uninstall` CLI is fully preserved.
R5: deletes charly/alias.go + charly/plugin_command_alias.go + the aliasCommand
dedicated builtin; re-points the 16 plugin_command_*.go files that cited the deleted
file to the promoted canonical plugin_command_ssh.go; sweeps stale command-placement
comments in main.go + cli_model_cmd.go.
Also documents the C15 residue routing (retention.go → build-family/P8b-followup,
volume_cp_tags_cmd.go → P13/P15/retention, shellcollect.go + hooks-collector → P8b/P14a,
vnc_helpers.go + transfer.go → fabric/P15, version.go stays fabric) — a boundary-law
assessment found none is a clean atomic P14b move; see CHANGELOG/2026.193.1116.md.
Assisted-by: Claude (analysed on a live system)
Claude-Session: https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif
R10 bed gate (persistent session): PASS ✅
Full sequence incl. the fresh- Assisted-by: Claude (analysed on a live system) |
T-P8b confirmed plugin-build calls the CURRENT core prune under the build-activity lock, leaving retention.go/filelock.go/local_image.go untouched — so retention→kit is a P15 unit (moved with the host_build_retention.go fold, after P14a's labels→spec), not a build-followup pure-compute relocation. Team-lead ruled P15 authoritative. Assisted-by: Claude (documentation reviewed) Claude-Session: https://claude.ai/code/session_01R8UGGr3ui1959oTb5JuSif
pr-validator — APPROVED ✅Change class: charly Go code + compiled-in command candy (runtime class) Fresh, independent re-derivation — trusted no author claim; re-ran every gate myself. Independently verified
Checklist: security(T1–T4) ✅ · description ✅ · R7/R10 gate ✅ · tier ✅ · R0 skills(F8) ✅ · R1 zero-warnings ✅ · R2 residue-routing ✅ · R3 ✅ · R4 ✅ · R5 ✅ · R6/R8/R9 ✅ · R10 ✅ · RDD/ADE/SDD ✅ · concurrency(N/A — not a shared-state change) ✅ · hard-cutover ✅ · boundary-law ✅ · disposable-only ✅ · go-gates ✅ · CHANGELOG ✅ Decision: PASS. The Assisted-by: Claude (analysed on a live system) |
Merge-time version stamp applied by the fresh pr-validator: rename the placeholder CHANGELOG to CHANGELOG/2026.193.1200.md and align its H1 heading. No code change — the validated P14b cutover rides underneath. Assisted-by: Claude (analysed on a live system) Claude-Session: https://claude.ai/code/session_018WkPC1aYyxvQZYGxspXBmH
… its output (#1257) * chore(deps): adopt plugin-build v0.2026328.1 — a failed build carries its output opencharly/plugin-build#68 merged as v2026.328.0001 (module v0.2026328.1): the build error now carries the last 60 lines of buildctl's captured output, so a failing step's own ERROR line reaches the log instead of being discarded with `exit status 1`. That is the precondition for #1255: once a charly release carries this, a failing build on this host prints the pacman error that has been invisible, and the base/build defects behind pod-cdi#14 and the pod-comfyui beds can be diagnosed from the artifact. go build ./... and go vet ./... pass at the bump; the module's own tests passed in #68. *Agent: `image-lane-vram` · Claude Code session `739c9baf-e4cc-465c-9028-0a77b9ea7617`* *Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system)* * chore(mods): align every lockstep module to the bumped shared pins The sdk require this change adopts (v0.2026327.1021) is a SHARED pin: the core module anchors it and every lockstep tools module must carry the same version, which `tools/gomod-canonical`'s TestContractPinsMatchShared enforces in CI. The bump moved core's anchor and left three tool modules behind, so the `go` job went red on the previous head. `charly task mods-tidy` is the sanctioned verb for exactly this (the control's own message names it); it adopts the shared pins and tidies every lockstep module. The result is six files — go.mod and go.sum in generate-packages, golden-cloudinit and golden-compile — and the control is green: $ cd tools/gomod-canonical && GOWORK=off go test -count=1 ./... ok github.com/opencharly/charly/tools/gomod-canonical 0.003s *Agent: `image-lane-vram` · Claude Code session `739c9baf-e4cc-465c-9028-0a77b9ea7617`* *Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)*
P14b — externalize the
charly aliasCLI into the compiled-incommand:aliascandyThe alias half of P14 (the four judged candidates) in the core-minimization program. The
charly alias …CLI moves out of core intocandy/plugin-alias(command:alias, compiledinto the default binary) — the command-class analogue of P10's
command:vm. Core keeps ZEROalias-command code.
What moved — the command, not the collector
charly/alias.goheld three separable concerns; only the CLI command moved:charly aliascommand (AliasCmd+add/install/list/remove/uninstall, thewrapper-script helpers, the
charly-aliasmarker,AliasInfo) →candy/plugin-alias.Dispatched in-proc via
Invoke(OpRun)→ kong-parse theAliasCmdtree (mirrorscommand:vm), so handlers own charly's real stdio.CollectBoxAlias,CollectedAlias), validation regex(
aliasNameRe), and box-verb (ListAliasesCmd) stay in core (newcharly/alias_collect.go) — each is a distinct kernel mechanism owned by its own cutover(the OCI-label bake → P8b/P14a; the load-time validation → P15; the
charly box list-aliasesbox-verb → P15). They are not the command.
Host coupling — the generic
HostBuild("cli")reentry, no new seamadd(does the box image exist locally) andinstall(read the bakedai.opencharly.aliaslabel) re-run
charly box labels …host-side over the same reverse channel the pod/vmlifecycles use. Every other subcommand is a pure
~/.local/binwrapper-script op.CliMainerrors (like
command:vm) — the canonical placement is compiled-in.BREAKING
charly aliasis now a dynamic command candy (a pass-through Args holder), so its subcommandsare no longer reflected into the out-of-process MCP tool surface (the
alias.*tools areremoved) — matching the
vm/feature/preemptexternalizations. Thecharly alias add/install/list/remove/uninstallCLI is fully preserved.R5 sweep
Deletes
charly/alias.go+charly/plugin_command_alias.go+ thealiasCommanddedicatedbuiltin. The 16
plugin_command_*.gofiles that cited the deleted file are re-pointed to thepromoted canonical
plugin_command_ssh.go. Stale command-placement comments inmain.go+cli_model_cmd.goswept.git grepfor every moved identifier returns onlycandy/plugin-alias.Tests
charly/alias_test.gosplit — 7 wrapper-script tests →candy/plugin-alias/alias_test.go;collector/validation/candy-layer tests →
charly/alias_collect_test.go.provider_command_test.godropsaliasfrom the dedicated-builtin roster, addsTestCommandCompileIn_AliasInProc(proves the in-procinprocProviderregistration), andasserts
alias.listis now ABSENT from the reflected builtin CLI model.TestCLIModel_CoversCommandsusesssh.tunnel.spicein alias's place.C15 residue routing (documented, not silent — CLAUDE.md R2)
A boundary-law assessment of the assigned kernel-manifest residue found none is a clean
atomic P14b move — each is cross-cutting with an in-flight cutover or is fabric-floor — so
each is routed to its owning cutover (recorded in
CHANGELOG/2026.193.1116.md):retention.go→ P15 (coordinated with T-P8b:plugin-buildcalls the current core pruneunder the build-activity lock, leaving retention untouched, so retention→kit is a P15 unit
moved with the
host_build_retention.gofold after P14a's labels→spec — not a build-followup);volume_cp_tags_cmd.go→ split P13 (volume/cp) / P15 (list-tags) / retention (invalidate);shellcollect.go+hooks.gocollector-half → P8b/P14a;vnc_helpers.go+transfer.go→fabric/P15;
version.go→ stays fabric (binary identity).Verification (per-tree binary via
task build:binary+ PATH-prepend; no install)go build+go test ./charly/... ./candy/plugin-alias/...— green (charly 54s).golangci-lint run— 0 issues (both modules);gofmt+golangci-lint fmtclean.charly box validate— exit 0 (the candy's ADE plan +plugin:block).pluginsgenreproducible (a second run is a no-op;TestPluginsGenReproduciblegreen).check-commands-localbed gate is the persistent session's):Assisted-by: Claude (analysed on a live system)