Repository navigation
feat(deploy): externalize pod config-WRITE to candy/plugin-deploy-pod (P11) - #86
Conversation
… (P11) The pod config-WRITE — generating + writing the quadlet .container / .pod / sidecar .container / cloudflare tunnel .service files — moves out of charly core into the deploy:pod plugin (candy/plugin-deploy-pod), completing the pod-substrate externalization under the kernel/plugin boundary law (Ruling C: the plugin OWNS config-write; the host keeps config-RESOLVE + the side-effects). This is the superproject half; the sdk half (the deploykit config-write mechanism + the #PodConfigWriteRequest seam + OpConfigWrite) landed in sdk #34 — the sdk gitlink bumps to the merged 2716be0 and charly/go.mod requires v0.2026194.615. What moved: - The config-write MECHANISM is sdk/deploykit now: GenerateQuadlet + its section emitters + the QuadletConfig/CollectedSecret/ResolvedBindMount/ResolvedSidecar resolved-runtime input types, the pod/sidecar/tunnel generators (GeneratePodQuadlet/GenerateSidecarQuadlet/ GenerateTunnelUnit), the pure size/port/tunnel helpers, and the enc-coupled volume resolver (ResolveVolumeBacking + the enc-path cluster). Core's former lowercase copies are gone; the remaining call sites bind the deploykit versions via deploykit_pod_aliases.go / deploykit_state_aliases.go. How the pod config-WRITE runs now (Q1=(a)): - charly config stays a HOST command: it resolves the full QuadletConfig, provisions podman secrets, computes the exact target PATHS (its unchanged filename helpers), provisions the dirs, then connects the deploy:pod plugin ON-DEMAND (connectPluginByWordRef(ClassDeployTarget, "pod", …) — the same host-out-call the credential/vm/kube adapters use; idempotent/cached) and Invokes its new OpConfigWrite with a spec.PodConfigWriteRequest (the resolved QuadletConfig as an opaque RawBody envelope + the host-computed absolute paths). The plugin (config_write.go, podConfigWrite) renders the file CONTENTS and os.WriteFiles them at the exact modes (.container/.pod/sidecar 0600, tunnel .service 0644) — byte-identical to the former in-core write phase (the process boundary changes no bytes). Every host side-effect (cloudflareTunnelSetup, systemctl --user daemon-reload, enc-mount, data-seed, tunnel enable) stays in charly config, unchanged. - deploy:pod stays OUT-OF-PROCESS (the external-provider direction), connected on-demand — NOT compiled-in. Option-B connect via config_write_host.go. R5 claim-keyed sweep (folded in per the batch directive — comment/description-only, no behavior change): corrected the location claims this relocation made stale — charly/deploy.go no longer self-contradicts (ResolveVolumeBacking/resolveVolumeHostPath documented as relocated, not "stay core"), and candy/plugin-tunnel (tunnel_exec.go/plugin.go/charly.yml) no longer claims charly/tunnel.go keeps the schemeTarget/tailscaleFlag/isTCPFamily helpers — those moved to sdk/deploykit with the quadlet emitter. The go/tunnel SKILL residue (plugins repo) routes to the batched docs cutover. Byte-parity is locked by the deploykit generator goldens + the plugin write-parity test (candy/plugin-deploy-pod/config_write_test.go: TestPodConfigWrite_ByteParity + TestPodConfigWrite_MinimalOnlyContainer — content == generators, exact modes, exact write order). The residual host-side pod-knowledge (config RESOLVE in config_image.go, the filename helpers, directPodmanArgs direct-run) is the documented Q1=(a) consequence for the P16 floor. R10 ACCEPTANCE — the pod roster on a fresh charly update, deploy:pod built from this worktree (CHARLY_REPO_OVERRIDE), GREEN 3/3: - check-pod (-C box/fedora): PASS steps=11, 306s — image-build 77s / check-image / deploy-add / config 13s (the NEW plugin write path) / start / bring-up-members / check-live / feature-run / update 77s (fresh rebuild) / feature-run-rebuild / cleanup — ok:true, exit 0. - check-sway-browser-vnc-pod (-C box/fedora): PASS steps=11, 535s, ok:true, exit 0. - check-sidecar-pod: PASS steps=11, 219s, ok:true, exit 0 (solo — the earlier concurrent-run check-image failure reproduced as a PRE-EXISTING podman store-contention race in probe infra, not P11; filed separately). Live proof of the mechanism: plugin-deploy-pod wrote charly-check-sidecar-pod.container + reloaded the systemd user daemon. Verification: charly go build/test ./... green; go test ./candy/plugin-deploy-pod parity green; golangci-lint 0 (charly / plugin-deploy-pod / plugin-tunnel); gofmt clean; task cue:gen reproducible; charly box validate exit 0; R5 grep of the deleted core ids clean. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_017pgC6VEfHBCNTku1JQXkLq
pr-validator — APPROVED ✅Change class: charly/sdk Go + candy config + cross-repo (sdk gitlink bump) — RUNTIME tier Independent re-derivation (trusted no author claim): Gitlink safety — PR head records Bed evidence (opened
Isolated re-build/test (fresh worktree @ SDD — R5 — deleted core ids ( Kernel/plugin boundary — host keeps RESOLVE + side-effects (Ruling C, Q1=(a)); plugin owns render+write. Decision: All 19 checklist items PASS (security screen, R0–R10, RDD/ADE/SDD, concurrency anti-cheat, hard-cutover, boundary law, clean-arch/go-gates, CHANGELOG). Proceeding to finalize the merge-time CalVer, squash-merge, and tag Assisted-by: Claude (fully tested and validated) |
Merge-time version stamp applied by the fresh pr-validator: CHANGELOG placeholder 2026.193.2345 -> 2026.194.0637 (filename + H1). Assisted-by: Claude (fully tested and validated)
* fix(box): advance box/arch to the head its distro repo serves The umbrella's distro-arch edge is DERIVED-EDGE-blocked on this nested gitlink: charly records box/arch at c068d35b9f (the CHANGELOG for distro-arch#83) while the repo serves 54625aad44 (the CHANGELOG for #86). Until charly carries the served head, the umbrella's sync cannot re-derive the edge, so the seventh pin wave reports 'blocked-by charly:box/arch (behind)' - a live warning in a gate that must paste none. Same mechanism #1302 performed for box/cachyos. Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed Assisted-by: Claude Code deepseek-v4.1-flash:cloud (analysed on a live system) * chore(pr): re-freeze the head so the required gate re-arms Every check on the previous head is green (validate, lint, go, pin-currency, arm=success) and auto-merge was never set - the ARMED-AND-SILENT class, whose one cure is a new head. The tree is unchanged; the body's Head reference is re-keyed. Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated) * chore(pr): re-freeze the head so the required gate re-arms All five checks on the previous head are completed/success, including arm=success, and auto-merge was never set - the ARMED-AND-SILENT class, whose one cure is a new head. The tree is unchanged; the body's Head reference is re-keyed. Agent: cdi-audit · Claude Code session f760307f-53b4-4f48-87da-00f95e5300ed Assisted-by: Claude Code deepseek-v4.1-flash:cloud (fully tested and validated)
Summary
The superproject half of P11 — pod config-WRITE externalized to
candy/plugin-deploy-pod.Generating + writing the quadlet
.container/.pod/ sidecar.container/ cloudflaretunnel
.servicefiles moves out of charly core into thedeploy:podplugin, completing thepod-substrate externalization under the kernel/plugin boundary law (Ruling C: the plugin
OWNS config-write; the host keeps config-RESOLVE + the side-effects).
Cross-repo (consumer half). The sdk half landed first — sdk #34 MERGED (merged main
2716be0, tagv0.2026194.615). This PR bumps thesdkgitlinkf0f37fa → 2716be0andcharly/go.modrequire →v0.2026194.615(in-tree resolution ridesreplace => ../sdk; therequire matters for out-of-tree consumers).
Change class
Code (charly core rewiring + candy + sdk gitlink). Runtime tier.
What's in it
Mechanism (in sdk/deploykit, via the bumped gitlink):
GenerateQuadlet+ section emitters,the
QuadletConfig/CollectedSecret/ResolvedBindMount/ResolvedSidecartypes, thepod/sidecar/tunnel generators, the pure helpers, and the enc-coupled
ResolveVolumeBacking+enc-path cluster. Core's former lowercase copies are gone; the remaining call sites bind the
deploykit versions via
deploykit_pod_aliases.go/deploykit_state_aliases.go.How it runs now (Q1=(a)):
charly configstays a HOST command — it resolves the fullQuadletConfig, provisions podman secrets, computes the target PATHS, provisions dirs, thenconnects
deploy:podON-DEMAND (connectPluginByWordRef(ClassDeployTarget, "pod", …)—the credential/vm/kube adapter pattern; idempotent/cached) and Invokes its new
OpConfigWritewith a
spec.PodConfigWriteRequest(the resolvedQuadletConfigas an opaqueRawBody+host-computed absolute paths). The plugin (
config_write.go) renders CONTENTS andos.WriteFilesat the exact modes (
.container/.pod/sidecar0600, tunnel.service0644) — byte-identicalto the former in-core write phase. Host side-effects (cloudflareTunnelSetup,
daemon-reload,enc-mount, seed, tunnel enable) stay in
charly config.deploy:podstays out-of-process,connected on-demand (
config_write_host.go, Option-B) — not compiled-in.R5 claim-keyed sweep (folded in per the batch directive — comment/description-only): corrected
the location claims this relocation made stale —
charly/deploy.gono longer self-contradicts(
ResolveVolumeBacking/resolveVolumeHostPathdocumented as relocated, not "stay core"), andcandy/plugin-tunnel(tunnel_exec.go/plugin.go/charly.yml) no longer claimscharly/tunnel.gokeeps the
schemeTarget/tailscaleFlag/isTCPFamilyhelpers (moved to sdk/deploykit with theemitter). The go/tunnel SKILL residue routes to the batched docs cutover.
R10 acceptance — pod roster, fresh
charly update, deploy:pod built from this branch (CHARLY_REPO_OVERRIDE) — GREEN 3/3Non-bed gates (this worktree): charly
go build/go test ./...green · byte-parityTestPodConfigWrite_ByteParity+_MinimalOnlyContainerpass · golangci-lint 0 (charly /plugin-deploy-pod / plugin-tunnel) · gofmt clean ·
task cue:genreproducible ·charly box validateexit 0 · R5 grep of the deleted core ids clean.Tier
Assisted-by: Claude (fully tested and validated)— all 10 standards met; the pod roster ranon a fresh
charly updatewith the changed config-write path (configstep) + the fresh-rebuild(
updatestep) both exercised and GREEN, verdict pasted above.R0–R10 checklist
pre-existing store-contention race (its own cutover), not P11.
charly update+charly check live; the deployedper-tree binary built the plugin from this branch.
Do NOT self-merge — a fresh, independent
pr-validatorre-validates + merges + tagsmain.Assisted-by: Claude (fully tested and validated)