Repository navigation
feat(deploykit,schema): Cutover B-1 sdk-contract leg — pod-lifecycle + bundle-remainder + kernel-B - #82
Conversation
…ire types Adds deploykit/enc_probe.go + secret_probe.go: 27 genuinely portable encrypted-volume and podman-secret helper functions relocated from charly-core (superproject leg deletes 5 pre-existing hand-duplicated copies across candy/plugin-deploy-pod and candy/plugin-doctor). Adds schema/vmclient.cue (6 defs: #VmPluginEnv, #VmSnapInternalReq, #VmSnapshotCreateOpts, #VmSnapshotEntry, #VmDisplayEndpoint, #VmResolveResult) — closes an SDD violation where charly-core and candy/plugin-vm each hand-wrote their own twin of the same wire shape. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
Removes the dead candy-level `libvirt?: [...]` field from #Candy/#CandyModel (zero live consumers — the feature it served was already retired in the VM hard-cutover) and the matching CandyReader.Libvirt()/HasLibvirt() interface methods + implementer. #SchemaVersion bumped 2026.186.2323 → 2026.201.2300 (PLACEHOLDER — re-stamped at merge by the pr-validator per CalVer mechanics). Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
Adds deploykit/deploy_forward.go (port-forward helpers, reusing vmshared.SplitPortForward per R3) and extends deploy_state.go with FindBundleNode, moved from charly/k3s_post.go's pure-function half. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system)
Placeholder CalVer — re-stamped at merge by the fresh pr-validator. R10 acceptance roster (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. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — CHANGES REQUESTED ❌Change class: sdk contract Go + CUE schema (runtime-tier; cross-repo cutover leg) Head SHA validated: Checklist
Comments consideredNone — the PR carries no comments. Cross-PR interactions considered
DecisionFAIL. This PR's own code ships a comment in Contrast: the enc and k3s portions of this same PR ( What must change before this can PASS:
Assisted-by: Claude Code (Anthropic Claude Sonnet 5; analysed on a live system) |
…e comment pr-validator FAIL (sdk#82, round 1): the package comment asserted every secret-leaf function's charly-core caller had already been repointed here; verified false — only GenerateRandomSecretToken was actually wired (via enc.go), the other 10 functions were uncalled and untested. R1 (false comment) + R3 (duplicated with the still-live charly/secrets.go copies) + R10 (zero coverage). Adds deploykit/secret_probe_test.go (13 tests, all 11 functions covered, including the 4 exec.Command-backed ones via a per-test empty-$PATH override so the podman/docker call deterministically fails without ever touching a real host secret store). Corrects the package comment to describe the now-true state. The actual call-site repoint + old-copy deletion lands in the paired charly PR (#169), landing atomically with this leg per B2. Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)
pr-validator — ROUND 2 — APPROVED ✅Change class: sdk contract Go + CUE schema (runtime-tier; cross-repo cutover leg). Head SHA validated: Checklist
Comments considered
Cross-PR interactions considered
DecisionPASS. Round-1's three intertwined findings (R1 false-comment-vs-reality, R3 cross-repo duplication, R10 zero coverage) are ALL independently re-verified as genuinely resolved — not merely re-asserted by the author. I re-ran every grep, every test, every build/lint/vet/cue-gen check myself rather than trusting the fix commit's narrative, and additionally found and verified a live confirmatory bed run ( Proceeding to Phase 3: merge-time CalVer finalization, merge, tag. Assisted-by: Claude Code (Anthropic Claude Sonnet 4.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)
pr-validator — Phase 3 outcome (round 2)Merged as squash commit Coordination requirement for the paired consumer (
Assisted-by: Claude Code (Anthropic Claude Sonnet 4.5; fully tested and validated) |
…-remainder + kernel-B Cutover B-1: assembles three independently-developed Cutover-B units into ONE landing (per the Cutover Sizing Law): - Unit 2 — pod-lifecycle-dispatch full port: all 7 pod verbs (start/stop/shell/logs/update/service/remove) 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). Relocates 27 portable enc/secrets helpers to sdk/deploykit (deletes 5 hand-duplicated copies). Closes an SDD violation in the VM-client RPC family (6 new CUE wire types). Fixes 2 real bugs. Adds round-trip ADE coverage for shell/logs/update/remove. - Unit 3+4 — bundle-remainder: removes the dead candy-level libvirt: field (schema + Go) via a new stripCandyLibvirtField migration hook. Externalizes charly box reconcile to candy/plugin-box. Dissolves charly/labels.go's 8 OCI-label type aliases (ZERO-ALIASES). Fixes a pre-existing test-isolation bug leaking onto the operator's real deploy-config overlay. - Unit 5 — kernel-B addendum: moves 3 pure functions from charly/k3s_post.go to sdk/deploykit, closing a zero-coverage gap. sdk-contract counterpart opencharly/sdk#82 merged first (e23a373, tag v0.2026202.105); this leg's sdk gitlink repointed to the merged commit. R10: 4-bed concurrent disposable roster all GREEN, zero warnings (check-sidecar-pod 12/12, check-exampledeploy 6/6, check-group 7/7, check-k3s-vm 8/8) — independently cross-checked by the fresh pr-validator against each bed's on-disk summary.yml. Full gate battery (build/vet/test/ lint/gofmt/cue:gen/box-validate) independently re-run clean by the validator across charly, sdk, and all 7 touched candy modules. Fresh pr-validator verdict: #169 (comment) Assisted-by: Claude Code (Anthropic Claude Sonnet 4.5; fully tested and validated)
Summary
sdk-contract counterpart to the superproject's Cutover B-1 landing
(pod-lifecycle-dispatch full port + bundle-remainder + kernel-B addendum —
three independently-developed units assembled by the B-1 integrator).
Three disjoint sdk legs, merged clean with zero conflicts:
deploykit/enc_probe.go+secret_probe.go(27 genuinely portableencrypted-volume and podman-secret helper functions relocated from
charly-core) and
schema/vmclient.cue(6 new CUE-sourced wire types —closing an SDD violation where charly-core and candy/plugin-vm each
hand-wrote their own twin of the same wire shape).
libvirt?: [...]field from#Candy/#CandyModel+ the matchingCandyReader.Libvirt()/HasLibvirt()interface methods and implementer.#SchemaVersionbumped2026.186.2323→2026.201.2300(PLACEHOLDER —the evaluator must re-stamp this, plus the migration table's matching
entry, at merge).
deploykit/deploy_forward.go(k3sport-forward helpers, reusing
vmshared.SplitPortForwardper R3) andextends
deploykit/deploy_state.gowithFindBundleNode.Full narrative:
CHANGELOG/2026.201.2355.md(placeholder CalVer — renamedat merge).
R10 — acceptance roster (orchestrator-run, on the paired superproject's
frozen integrated tree)
Five checks, all launched CONCURRENTLY, all GREEN, zero warnings:
check-sidecar-pod: PASS (steps=12), exit 0 — run 2026.202.0005,check-live 2m46.9s with the full pod-lifecycle round-trip coverage under
concurrent load.
check-exampledeploy: PASS (steps=6), exit 0.check-group: PASS (steps=7), exit 0.check-k3s-vm: PASS (steps=8), exit 0 — exercises this leg'sdeploykit.FindBundleNode/port-forward helpers live.qemu-guest-agent fixture at schema
2026.186.2323migrated viaapplied strip-candy-libvirt-field (schema 2026.201.2300)— blockstripped,
charly box validateclean, idempotent second run no-op.Verification (integrator's battery)
task cue:gen: complete no-op on the merged CUE sources —spec/cue_types_gen.go/vocab_gen.go/version_gen.goall reproducebyte-for-byte (the git auto-merge of
cue_types_gen.gowas nevertrusted; regenerated fresh post-merge).
GOWORK=off go mod tidy && go mod verify && go build ./... && go test ./...: clean/ok across all 16 packages incl.spec.TestGenReproducible.gofmt -l .: clean.golangci-lint run ./...(GOWORK=off): 0 issues.Measured core-LOC delta (paired superproject)
origin/main@1c0b91b→ integratedcharlyHEAD: 42,113 → 40,243(−1,870 core LOC), vs the naive per-unit sum of −2,134 — the ~264-LOC
(12.4%) variance is explained by file-overlap resolution during the
charly-side merge (well under the 20% blocking-incident threshold).
Orchestrator-confirmed independently (their own 42,378/40,508 pair differs
from this pair by a constant counting-method offset; the deltas agree
exactly).
Merge mechanics
Three independent branches (
feat/cutover-b-pod-lifecycle,feat/cutover-b-bundle-remainder,feat/cutover-b-kernelb), each anindependent sdk-repo checkout, combined via local remotes +
git merge --no-ffin sequence. Zero conflicts — the three units' sdk-side file setsare fully disjoint except the generated files (regenerated fresh, not
hand-merged).
Test plan
task cue:genno-op on the merged treeGOWORK=off go build/test ./...— sdk standalone, all greengofmt -l .cleangolangci-lint run ./...0 issuesLand order (B2): this sdk PR merges FIRST; the paired superproject PR
(opencharly/charly, branch
feat/cutover-b1) repoints itssdkgitlink tothis PR's merged commit before it can merge.
Assisted-by: Claude Code (Anthropic Claude Sonnet 5; fully tested and validated)