Repository navigation
feat(deploykit,kit,schema): DEPLOY-wave pod command-seam wire types + relocations - #78
Conversation
… (K4 deploy-wave prep) Pure filename/path formatting used by both plugin-deploy-pod (in progress) and P13-kernel deploy code that stays core until its own wave — moved to sdk/kit alongside the existing ContainerName/sidecar naming helpers rather than duplicated, so both call it directly. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
… (K4 deploy-wave prep) stopPodService/startPodService were pure quadlet/engine orchestration shared between the resource arbiter (preempt.go, out of this wave's scope) and the pod-deploy lifecycle (candy/plugin-deploy-pod, moving). Homed in deploykit rather than kit — they need ResolveBoxEngineForDeploy, a deploykit-only mechanism (kit cannot import deploykit) — mirroring the existing container_resolve.go / box_engine.go precedent exactly. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
kit.StripURLScheme already existed (relocated from charly/remote_image.go in an earlier K4 wave) but shipped with no test of its own — charly core still carried a leftover duplicate definition (R5 incomplete cutover) plus its test. Adds the test here; the charly-side fix removes the duplicate. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…wire types (DEPLOY wave CLI-struct port) RestartPodService extends pod_service.go with the restart body (mirrors Stop/StartPodService — quadlet-mode systemctl restart, else engine restart). NOT registry-bound, so candy/plugin-pod's RestartCmd calls it directly. #PodStartRequest / #PodStopRequest (sdk/schema/seam.cue → generated into spec/cue_types_gen.go via task cue:gen, reproducibility-verified) are the CUE-sourced wire types for the host_build_pod_start.go / host_build_pod_stop.go seams the DEPLOY wave's start/stop CLI-struct port forwards through — the SDD mandate (wire types are CUE-sourced without exception). Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…ort) CUE-sourced wire type for the host_build_pod_logs.go seam the DEPLOY wave's `charly logs` CLI-struct port forwards through. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
… port) CUE-sourced wire type for the host_build_pod_remove.go seam the DEPLOY wave's `charly remove` CLI-struct port forwards through. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…port) CUE-sourced wire type for the host_build_pod_shell.go seam the DEPLOY wave's `charly shell` CLI-struct port forwards through. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…t port) CUE-sourced wire type for the host_build_pod_service.go seam the DEPLOY wave's `charly service start/stop/status/restart` CLI-struct port forwards through — one seam, an Operation discriminator, since all four leaves share the identical resolveServiceInit + execInitCommand body. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
CUE-sourced wire types for the host_build_pod_config.go seams the DEPLOY wave's charly config setup/status/mount/unmount/passwd/remove CLI-struct port forwards through. Each subcommand's core body is distinct (not shared resolution like service), so each got its own request/reply pair rather than an Operation discriminator. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
The header claimed charly core's remaining callers (check harness, android_deploy_cmd.go, cmd.go) 'now import deploykit directly' — verified false by grep: they still call the bare, undeleted core duplicates in charly/container.go and charly/volume_cp_tags_cmd.go. Corrected to state the true current state and track the dedup sweep to the CHECK wave. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
quadlet_pod.go's PodQuadletFilename/-Instance and SidecarQuadletFilename/ -Instance were pure string formatting over kit.PodName/SidecarContainerName, with both callers (config_image.go, commands.go) staying core — moved to sdk/kit alongside the sibling quadlet path helpers rather than duplicated. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
…d.go R1) kit.ResolveAgentForwarding already existed (K4 lane B, an earlier wave) but its header claimed a 'kit_aliases.go passthrough' for a core caller — that file never existed, and the real duplicate was an unswept charly/ agent_forward.go (R1, incomplete cutover). Corrected the header; folded in TestResolveGPGAgentForward_ContainerHome, the one test present in the charly-side duplicate but missing here. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
… port) CUE-sourced wire type for the host_build_pod_update.go seam the DEPLOY wave's charly update CLI-struct port forwards through. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: code (Go) — sdk mechanism relocations + CUE-sourced wire types (charly/sdk Go) Independent battery (fresh detached worktree at head
Checklist:
Comments considered: none (PR carries zero comments). Cross-PR interactions considered:
Decision — BLOCKING finding (R1, item 5): Per the operator's standing directive, every load-bearing code-comment claim was independently re-verified against actual code (not trusted). The PR's two "R1 corrections" were checked individually:
Required fix: rewrite the Everything else — the full standalone Go battery, the SDD/CUE mandate (100%, no exceptions taken), the genuineness of the kit/deploykit relocations (verified byte-for-byte against Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system) |
…-companion-merge The validator correctly flagged kit/agent_forward.go's header claiming pod_lifecycle_resolve.go 'imports kit directly' — true in the assembled DEPLOY-wave worktree, false on charly main today (the companion charly PR hasn't merged; main still has the bare duplicate + 3 unqualified call sites). Swept the same claim-key across every header this leg touched: kit/quadlet_paths.go and deploykit/pod_service.go made the identical 'charly core's remaining callers... import X directly' claim about callers that are unchanged on main until the companion PR lands; deploykit/container_resolve.go's own last clause claimed candy/plugin-pod 'imports these deploykit functions directly today' — candy/plugin-pod does not exist on charly main at all yet, it is born on the companion PR. All four corrected to state the true current state (what main has NOW) and name the companion PR as the tracked completion, never a present-tense claim conditional on an unmerged sibling. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
|
Fixed in 58de8b2 (appended, no force-push): the flagged kit/agent_forward.go header now states the true current state (charly main still carries the bare duplicate + 3 unqualified call sites; the companion DEPLOY-wave charly PR does the delete+repoint, tracked there). Swept the same claim-key across the whole leg and found + fixed 3 more instances of the identical class: kit/quadlet_paths.go and deploykit/pod_service.go made the same present-tense 'callers import X directly' claim about unmerged-companion-dependent state, and deploykit/container_resolve.go's own last clause claimed candy/plugin-pod 'imports these deploykit functions directly today' — that candy doesn't exist on charly main at all yet. All four now name the companion PR as the tracked completion rather than asserting present-tense state that's conditional on an unmerged sibling. |
pr-validator — APPROVED ✅ (round 2)Change class: code (Go) — sdk mechanism relocations + CUE-sourced wire types (charly/sdk Go) Re-validation at head Delta since round 1 ( The round-1 blocking finding (kit/agent_forward.go) is fixed, and the author's claim-keyed sweep found + fixed three more instances of the identical class. Independently re-verified all four against
All four now correctly frame the gap as not yet true on Fast gates re-run on the new head (fresh detached worktree
Comment-only diff over an already-fully-green round-1 battery (full standalone tidy/verify/build/vet/test, golangci-lint 0 issues, Cross-PR sweep (re-run): sdk — no other open PRs. charly — #164 has merged since round 1 (no longer open); #118 (P16 gate, merges last) still open, still no overlap, All 19 checklist items now PASS or correctly N/A (items 0–4, 6–18 as round 1; item 5 — R1 — now PASS with the fix independently verified above). Decision: PASS. Proceeding to Phase 3 — bring the branch up to date ( Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated) |
Merge-time CalVer stamp, applied by the fresh pr-validator on PASS. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — merged ✅Merged (squash): Final head validated: Companion charly-repo consumer leg is now unblocked to open against this tag. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated) |
DEPLOY wave (W1+W2) of the core-minimization program: ports the 11 pod-lifecycle CLI commands (start/stop/restart/logs/remove/shell/service/volume/cp/config/update) out of hardcoded core Kong structs into a new compiled-in plugin candy, candy/plugin-pod, using three seam shapes proven live on the built binary: - Zero-seam pure-logic move — VolumeCmd/CpCmd (+ List/Reset leaves) carry no host/registry/loader coupling and moved wholesale. - Per-command HostBuild seam — start/stop/logs/remove/shell/update each keep a thin Kong grammar in the candy that forwards authored flags via sdk.Executor.HostBuild to a host-registered builder that reconstructs the original core orchestration struct (now pod<Word>Cmd, header-noted "TRACKED P13-KERNEL EXIT") and runs its unchanged .Run() body. - Operation-discriminated shared seam — service/config collapse their former dedicated-CommandProvider shims into one Kong leaf group each, dispatching through a single HostBuild seam keyed by an operation discriminator on the CUE-sourced wire request. Companion sdk-repo leg (opencharly/sdk#78, merged, tagged v0.2026201.1135) added the CUE-sourced wire-type pairs these seams carry. Deletes 11 obsoleted dedicated CommandProvider shims plus quadlet.go/quadlet_pod.go/provides.go/ agent_forward.go/classification.go (R3 dedup), repointing callers to sdk/kit and sdk/deploykit directly. Validated across 3 pr-validator rounds: round 1 required a CHANGELOG entry (added), round 2 found 4 stale quadlet.go:100-106/writeSecretsSection comment pointers on the changed surface + its sibling-set (corrected to the true sdk/deploykit/quadlet.go emitContainerSection anchor, independently re-verified against source by both round 2's author-fix and this final round). Full R10: go build/vet/test/gofmt/golangci-lint(0 issues)/ task cue:gen(no drift)/charly box validate all green; 4 disposable check beds (check-exampledeploy, check-charly-vm, check-sidecar-pod, check-group) all ok:true. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
Summary
Companion sdk-repo leg of the charly-repo DEPLOY wave, which ported the 11 pod-lifecycle CLI commands (
start/stop/restart/logs/remove/shell/service/volume/cp/config/update) from hardcoded core Kong fields into the new compiled-in candycandy/plugin-pod(landing in a follow-up charly-repo PR once this leg merges, per B2 cross-repo landing order).sdk/schema/seam.cue→ generatedsdk/spec):#Pod{Start,Stop,Logs,Remove,Shell,Service,Update,ConfigSetup,ConfigStatus,ConfigMount,ConfigUnmount,ConfigPasswd,ConfigRemove}Request/Replypairs — the wire envelopes for eachHostBuild("pod-<word>")seam, mirroringcandy/plugin-bundle's establisheddeploy-add/deploy-delshape.sdk/kit/quadlet_paths.go(pod quadlet path helpers) andsdk/deploykit/pod_service.go(pod service start/stop/restart bodies, split-consumer between the resource arbiter and the pod-deploy lifecycle).TestResolveGPGAgentForward_ContainerHome) thatkit.ResolveAgentForwarding's coverage lacked, and corrects 2 header comments (sdk/deploykit/container_resolve.go,sdk/kit/agent_forward.go) that asserted a completed migration verified false by grep.Verification
GOWORK=off go build ./...— clean.GOWORK=off go test ./...(every package) — clean.golangci-lint run ./kit/... ./deploykit/... ./spec/...— 0 issues.task cue:gen— verified true no-op (zero diff on a fresh run); the reproducibility gate (TestGenReproducible) passes.check-exampledeploy[2026.201.xxxx]: PASS (steps=6), 139s, exit 0check-charly-vm: PASS (steps=8), 336s, exit 0 — the worktree-builtopencharly-git(carrying all 11 ported commands) pacman-installed fresh in the disposable guestcheck-sidecar-pod: PASS (steps=12), 437s, exit 0check-group: PASS, 408s, exit 0Test plan
go build ./.../go test ./...clean on this branchgolangci-lint runcleantask cue:genreproducibility verified (no drift)https://claude.ai/code/session_018QNXbstqVZTfyD4w9TZmjF