Repository navigation
feat(pod,box,migrate): Cutover B-1 — pod-lifecycle-dispatch + bundle-remainder + kernel-B - #169
Conversation
…lient SDD cleanup Completes the pod-lifecycle CLI dispatch family (start/stop/shell/logs/ update/service/remove) — all 7 verbs now own their full orchestration in candy/plugin-pod, consolidating the former 7 per-verb HostBuild seams into one (host_build_pod_lifecycle_dispatch.go) whose bodies are reduced to the irreducible ResolveTarget/live-executor dispatch (start/stop/shell/logs/ update/service) or the arbiter-release bracket (remove) — the proof-of-generalization for the P13-KERNEL deploy-node-dispatch precedent at single-node granularity. `charly remove`'s tunnel-stop now drives verb:tunnel directly via InvokeProvider (mirroring pod start/stop's own pattern), deleting the dead core tunnel-dispatch adapter (tunnel_plugin.go) whose last caller moved plugin-side. Its credential axis reuses the existing pod-config-hook-secret-env seam; its registry-resugar axis (deploy-entry cleanup) gets a narrow new twin, pod-config-clean-deploy-entry, after a demonstrated wire-shape mismatch against the existing deploy-config-save seam. Fixes two real bugs surfaced during the port: (1) a placement-dependent silent-degradation bug where sidecar-name resolution and per-deploy engine resolution transitively read deploykit.DeployStateHost, a package var populated only in charly-core's own init() — silently correct today only because they're compiled into the same process as charly-core, silently wrong the moment they'd run truly out-of-process; both rerouted through their existing seams. (2) InvokeProvider-based tunnel dispatch was silently swallowing a verb:tunnel business-level failure — now decodes and surfaces the reply's Error field. Relocates 27 genuinely portable encrypted-volume and podman-secret helper functions from charly-core into sdk/deploykit, deleting 5 pre-existing hand-duplicated copies across candy/plugin-deploy-pod and candy/plugin-doctor (R3). Closes an SDD violation in the VM-resolution RPC family: 6 new CUE-sourced wire types (sdk/schema/vmclient.cue) replace hand-written twins in charly-core and candy/plugin-vm's DisplayEndpoint. Deletes a second pre-existing R3 duplicate (kit.ContainerRunning/ ContainerImage already existed in sdk/kit; charly-core carried its own copies). Deletes dead code surfaced along the way: android_spec.go, findPodSidecarQuadlets, and a third instance of the "callers import kit directly" false-claim pattern (sidecarConfigDir). Adds round-trip ADE coverage (check-sidecar-pod, 6 new steps) for shell/logs/update/remove — zero prior bed coverage existed for these verbs. Core LOC: 42,378 → 40,843 (−1,535). Verified: build+vet+test green on every touched module, gofmt clean, charly box validate exit 0, R5 grep-swept. Disposable-bed R10 (check-sidecar-pod, run 2026.201.2328) PASSED exit 0, 12/12 steps. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…e/labels dissolution Deleted dead code confirmed via build/grep, not assumed: libvirt.go (CollectLibvirtSnippets), validate_ephemeral.go's ValidateImportedSource/ ValidateEphemeralAcrossDeploy, graph_shim.go's ExpandCandy/BoxNeedsBuilder (+ their now-redundant tests — sdk/deploykit already covers the same logic). Removed the candy-level `libvirt:` field (schema + Go): zero live consumers, the feature it served was already retired in the VM hard-cutover. #SchemaVersion bumped (placeholder 2026.201.2300, re-stamped at merge), migrated via a new precisely-scoped stripCandyLibvirtField hook — a blanket declarative delete_key was unsafe because `libvirt` is also a live check-verb word that can coexist in the same candy's `plan:`; the hook strips only the direct immediate `libvirt:` child of a `candy:` value mapping, never descending into `plan:`. `charly box reconcile` externalized to candy/plugin-box (zero core coupling). charly/labels.go's OCI-label type aliases dissolved; every caller repoints to spec.* directly (ZERO-ALIASES). Fixes a real pre-existing test-isolation bug the schema bump surfaced: a test was leaking onto the operator's real per-host deploy-config overlay (overrode charly's own DeployConfigPath var but not the CHARLY_DEPLOY_CONFIG env var deploykit actually honors). Generalized package-wide via charly/test_main_test.go's TestMain, which now sets a per-run XDG_CONFIG_HOME temp dir as the default before any test runs. Registers several files as IOUs to already-tracked K-wave families (R-E8 seam-body family, K1-loader-blocked family, K5 command-dispersal, FLOOR-SLIM axis-purity) rather than attempting unproven moves. Core LOC: 42,113 → 41,584 (−529, pre-integration). Verified: task cue:gen reproducible, task build:binary clean, go test ./... (charly) 97.2s zero failures, sdk + candy/plugin-migrate + candy/plugin-box standalone batteries green, gofmt clean. Live-verified `charly box reconcile --dry-run` against a real 2-pin-mismatch fixture. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…comment fix Moves 3 pure functions + tests from charly/k3s_post.go to sdk/deploykit (deploy_forward.go, deploy_state.go), reusing vmshared.SplitPortForward per R3. Closes a zero-coverage gap with TestFindBundleNode. Fixes a stale comment in local_spec.go. Core LOC: k3s_post.go 241 → 168, local_spec.go comment fix. −70 core (pre-integration). Verified: charly full suite green (111s), sdk standalone batteries green, R5 grep clean (incl. a self-caught comment naming). Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
# Conflicts: # charly/init_def_label_test.go # charly/remove_sidecar_test.go # charly/service.go # charly/start.go
…arnings sweep Integration-only fixups surfaced by running the combined battery for the first time (no single unit's own worktree exercised the merged tree): - candy/plugin-box: `go mod tidy` — unit 2's new sdk/deploykit dependency (golang.org/x/term, pulled in by secret_probe.go) was invisible to unit 3+4's plugin-box move until both landed in the same tree. - candy/plugin-migrate (engine.go, reshape_compact.go): golangci-lint's first full run on this touched module surfaced 6 pre-existing issues on lines this cutover's diff didn't touch (3 unchecked fmt.Fprintf, 2 trailing-period error strings, 1 if/else-if collapsible to a tagged switch) — fixed per the zero-warnings gate precedent set by the prior Cutover A integration (no "pre-existing" exemption). - charly/test_main_test.go: 2 unchecked os.RemoveAll in unit 3+4's new TestMain isolation guard — house style is `_ = os.RemoveAll(...)`. sdk gitlink bumped to the integrated feat/cutover-b1 sdk commit (folds the three units' sdk legs: enc/secret probes + vmclient CUE, the libvirt-field schema removal, and the k3s deploykit helpers). Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
Placeholder CalVer — re-stamped at merge by the fresh pr-validator. sdk gitlink repointed to the integrated feat/cutover-b1 sdk commit (which itself carries the sdk-side CHANGELOG placeholder for this cutover). R10 acceptance roster (5 checks, all concurrent on the frozen integrated tree, all GREEN, zero warnings): check-sidecar-pod (PASS 12/12), check-exampledeploy (PASS 6/6), check-group (PASS 7/7), check-k3s-vm (PASS 8/8), plus a direct live probe of the strip-candy-libvirt-field migration entry (real fixture migrated + idempotent second run). Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
Coordination note from the
|
… old copies pr-validator FAIL (sdk#82, round 1): sdk's deploykit/secret_probe.go shipped 11 relocated secret-leaf functions, but charly/secrets.go still defined AND called its own byte-identical copies for ten of them — only GenerateRandomSecretToken (via enc.go) had actually been repointed. R1 (false "repointed every call site" claim) + R3 (duplication across two repos) + R5/Hard-Cutover (old path live, dual-mode) + R10 (zero sdk-side coverage). Rewrites charly/secrets.go: every call site now calls the deploykit.* exported equivalent (GenerateRandomSecretToken, PromptPassword, PodmanSecretExists, EnsurePodmanSecret, CredServiceForSecret, CredKeyForSecret); the two host_build_pod_config_seams.go call sites for ApplySecretRefresh/CollectSecretsFromLabels repointed the same way. All 11 old in-file functions deleted in this same commit (R5 hard cutover, no transitional path). Two functions (ListProvisionedSecretNames, SecretArgs) plus RemovePodmanSecrets turn out to have had ZERO production callers even in the pre-cutover code (verified against origin/main) — genuine pre-existing dead weight, not "repointed to nothing." Their tests relocated to sdk/deploykit/secret_probe_test.go alongside the functions. Two stale comments naming the deleted private functions by their old names fixed (R5 claim sweep). Registers candy/plugin-secrets/command.go's own independent, pre-existing promptPassword duplicate for the next thematic batch (out of this fix round's scope — narrowly bounded to charly/secrets.go's own duplication). sdk gitlink bumped to the sdk-side fix commit (0b842d0 — adds secret_probe_test.go, corrects the now-stale package comment). Core LOC: 40,243 → 40,063 (−180 this fix round). Verified: go build/vet/test ./... clean, golangci-lint 0 issues, gofmt clean, charly box validate exit 0, task cue:gen no-op, R5 grep self-test clean. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator (round 2) merge-time version stamp: renames the placeholder CHANGELOG to CHANGELOG/2026.202.0105.md (H1 rewritten to match), and re-stamps #SchemaVersion in schema/version.cue from the placeholder 2026.201.2300 to 2026.202.0105 (spec/version_gen.go regenerated via task cue:gen — confirmed a no-op everywhere else). The paired consumer opencharly/charly#169's candy/plugin-migrate/ migrations.cue entry must be re-stamped to this exact same schema version (2026.202.0105) at its own merge. Assisted-by: Claude Code (Anthropic Claude Sonnet 4.5; fully tested and validated)
Coordination note from the
|
… version sdk#82 merged (main e23a373, tag v0.2026202.105, #SchemaVersion finalized 2026.202.0105). Producer→consumer repoint (B2): - sdk gitlink -> e23a373 (the merged main SHA, staged after switching to this branch, per B2 step-3 pointer-bump safety). - charly/go.mod require github.com/opencharly/sdk bumped v0.2026201.1934 -> v0.2026202.105 (in-tree resolution rides the local replace directive; staged per the standard mechanics regardless). - Every charly-side version: fixture + the candy/plugin-migrate/ migrations.cue strip-candy-libvirt-field entry re-stamped from the placeholder 2026.201.2300 to the now-final 2026.202.0105 (21 files). task cue:gen: no-op / cleanly regenerated, zero drift. Full battery re-verified on the re-stamped tree: go build/vet/test ./... clean, golangci-lint 0 issues (charly + plugin-box + plugin-migrate), gofmt clean, charly box validate exit 0. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — APPROVED ✅Head SHA validated: Change class: Checklist
ARCHITECTURE GATE — per-item trace (staged
|
Fresh pr-validator finalization: rename the CHANGELOG placeholder to the merge-time CalVer and rewrite its H1 to match (byte-equal). Schema version stays at 2026.202.0105 (already finalized at the paired sdk#82 merge) — this stamp covers only the CHANGELOG filename + the superproject release tag. Assisted-by: Claude Code (Anthropic Claude Sonnet 4.5; analysed on a live system)
Merge outcome — ALLOWED, no denials
Assisted-by: Claude Code (Anthropic Claude Sonnet 4.5; analysed on a live system) |
Merged origin/main (#169, c78ac6a) into the P16 branch and re-derived the floor/residue classification from the actual tree per #169's fresh-validator coordination note, never from file header comments. Pruned 15 stale residueOwner entries for files #169 deleted/moved: android_spec.go, labels.go, libvirt.go, reconcile.go (→ candy/plugin-box), service.go, shell.go, start.go, tunnel_plugin.go, and the 7 superseded host_build_pod_{logs,remove,service,shell,start,stop,update}.go files. Classified the 1 new file host_build_pod_lifecycle_dispatch.go as P11 residue (pod-deploy-surface, consolidating the 7 files above): every handler only CALLS a floor Mechanism (dispatchLifecycleTarget) or P15 residue (releaseResourceClaim) — the defines-vs-calls test makes this an R-item, not a Mechanism, matching the identical precedent already set for its 7 predecessor files despite the file's own header echoing a STAYS-CORE-style framing (never trusted per standing policy). Gate output (verbatim, post-reconcile): FLOOR 64 / RESIDUE 162 / 0 unowned / 0 stale floor / 0 stale residue. Still intentionally RED — do not route a pr-validator to merge. Assisted-by: Claude Code (Anthropic Claude Opus 4.5; analysed on a live system)
…d attributions opencharly/marketplace#169 merged as f6f39bbd (tag v2026.227.1031), carrying the regenerated helm page with the five polish fixes. The gitlink moves off b1f685a1 onto it, which closes the deliberately-red drift gate: marketplace drift is now clean (399 artifacts) and box validate exits 0. Two non-blocking wording items from #169's validator, both about round attribution in this entry's own prose: - "that specific confusion produced blockers in three separate rounds" was loose. Counted precisely: TWO rounds produced blocking findings (#168 round 5 B1, #274 round 5 B2), a third filed one under Blocking findings but softened it to a recommendation, and a fourth produced non-blocking notes. Defensible under one reading, not under the natural one. - "#274's first validation round found five polish items" mis-attributed their origin: they surfaced in #168 round 6, and #274 round 5 is what ruled the batch routing wrong. Neither changes a technical claim; both are the same class this cutover has been correcting throughout — a true-enough sentence that does not survive someone checking it. Assisted-by: Claude Code claude-opus-5[1m] (documentation reviewed)
…ts 2-3 never got Factory unit 4 — the docs catch-up. Two things land together because they cannot honestly be split: the north-star revision, and the Skill Dispatcher rows for capability units 2 and 3 already shipped. A row naming a skill that does not exist is a false claim, so the rows land with the skill that makes them resolve. PROGRAM/factory-north-star.md — revised claim by claim against the tree. A new Trust boundaries section; units 2-3 recorded as landed; the charly mcp serve scoping restated as a named gap rather than a prompt-level promise. The unit list renumbers 6 -> 9: charly box load (unit 5) and charly mcp serve --disposable-only (unit 7) were named as load-bearing in the prose but had no unit and no measured state, so neither was anyone's work. Three defects were caught by that audit rather than published: helm_chars: was a typo for the real deploy field helm_charts:; the kubeconfig claim was stated as a fixed path when it is a precedence chain; and the Trust boundaries section asserted the forge MCP endpoint binds loopback/stdio, which is false — charly mcp serve --listen defaults to :18765, binding every interface. A binding document describing a security property the code lacks is worse than silence. candy/charly-kubernetes/charly.yml — a new helm-skill: entity (the /charly-kubernetes:helm recipe card) and its trigger. candy/agentteams and candy/plugin-agentteams — triggers: on the two agentteams skills. candy/charly-hooks — the charly-kubernetes marketplace description named only the kube: verb while README named the helm words. CLAUDE.md + AGENTS.md regenerated between the GENERATED SKILL DISPATCHER markers; the table is generated from triggers:, never hand-edited. The plugins gitlink advances to 664d2456, the merged head of the regeneration chain (#168 -> #169 -> #170). A skill: source edit and its generated projection are one cutover across two repos: landing either half alone leaves main inconsistent, and this merge closes the last of it. The docs gitlink tracks main; what remains deferred is the mirror content, not the pointer. Assisted-by: Claude Code claude-opus-5[1m] (documentation reviewed)
Summary
Cutover B-1: assembles three independently-developed Cutover-B units into
ONE landing (per the Cutover Sizing Law — each unit alone fell under the
2,000-LOC minimum; combined they clear it):
cleanup: completes the pod-lifecycle CLI dispatch family
(start/stop/shell/logs/update/service/remove) — all 7 verbs now own their
full orchestration in
candy/plugin-pod, consolidating the former 7per-verb
HostBuildseams into ONE(
host_build_pod_lifecycle_dispatch.go).charly remove's tunnel-stopnow drives
verb:tunneldirectly viaInvokeProvider, deleting the deadcore tunnel-dispatch adapter. Relocates 27 portable enc/secrets helpers to
sdk/deploykit(deletes 5 hand-duplicated copies, R3). Closes an SDDviolation in the VM-client RPC family (6 new CUE wire types). Fixes 2 real
bugs (a placement-dependent silent-degradation bug; a swallowed
verb:tunnelfailure). Adds round-trip ADE coverage for shell/logs/update/remove (zero prior bed coverage).
libvirt:field (schema + Go), migrated via a new precisely-scoped
stripCandyLibvirtFieldhook. Externalizescharly box reconciletocandy/plugin-box(zero core coupling). Dissolvescharly/labels.go's 8OCI-label type aliases (ZERO-ALIASES). Fixes a real pre-existing
test-isolation bug (a test was leaking onto the operator's real per-host
deploy-config overlay) and generalizes the fix package-wide via
TestMain.charly/k3s_post.gotosdk/deploykit, closing a zero-coverage gap.Full narrative + per-unit detail + conflict resolution:
CHANGELOG/2026.201.2359.md.sdk-contract counterpart: opencharly/sdk#82 (
feat/cutover-b1) — landsFIRST (B2 producer order); once merged, this PR's
sdkgitlink (currentlypointing at #82's pre-merge head) gets repointed to the merged commit before
this PR can land.
R10 — acceptance roster (all concurrent on the frozen integrated tree,
all GREEN, zero warnings — this is the R10 gate on the FINAL code)
check-sidecar-pod: PASS (steps=12), exit 0 — run 2026.202.0005,check-live 2m46.9s with the full pod-lifecycle round-trip coverage
(shell/logs/update/remove) under concurrent load.
check-exampledeploy: PASS (steps=6), exit 0.check-group: PASS (steps=7), exit 0 — bundle/reconcile + libvirtschema-field removal + labels dissolution.
check-k3s-vm: PASS (steps=8), exit 0 — exercises unit 5's k3s helperslive.
qemu-guest-agent fixture migrated
2026.186.2323→2026.201.2300,block stripped, validate clean, idempotent second run no-op.
Verification (integrator's battery)
task cue:gen: complete no-op.task build:binary: clean; content-marker check on the binary confirmsthe fixes are actually compiled in.
go build/go vet(workspace) +GOWORK=off go mod verify: clean.go test ./...(charly): ok, ~96s, zero failures.GOWORK=off go build/test ./...: clean/ok for every touched module —sdk, plugin-pod, plugin-deploy-pod, plugin-doctor, plugin-tunnel,
plugin-vm, plugin-box, plugin-migrate.
golangci-lint run ./...: 0 issues across every touched module(fixed 8 pre-existing issues surfaced by the first combined run — see
the "cross-unit fixups" note below).
gofmt -l: clean.charly box validate: exit 0.Cross-unit integration fixups (surfaced only by the combined battery)
candy/plugin-box'sgo.mod/go.sumwere stale against unit 2's newsdk/deploykitdependency (golang.org/x/term) — unit 3+4 movedreconcile.gointoplugin-boxwithout ever seeing unit 2's sdkchanges. Fixed with
go mod tidy.golangci-lintissues (all pre-existing on lines this cutover's owndiff never touched) fixed per the zero-warnings gate, no "pre-existing"
exemption.
Measured axes (package-main methodology, vs
origin/main1c0b91b).gofiles (charly/, top-level)charly/*_aliases.gofiles−1,870 vs the naive per-unit sum of −2,134: ~264 LOC / 12.4% variance from
merge file-overlap resolution — under the 20% blocking-incident threshold.
Test plan
task cue:gen/task build:binaryno-op / cleango test ./...(charly) + every touched module standalone — all greengolangci-lint run ./...— 0 issues everywherecharly box validate— exit 0(blocks merge, does not block review)
Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)