Repository navigation
feat(sdk): in-proc CLI dispatch primitive (#52) + pod-lifecycle wire carriers (K4) - #43
Conversation
…carriers (K4) The sdk contract half of the K4 deploy-lifecycle deep-body move (superproject half separately). clidispatch.go: RunInProcCLI / ParseInProcCLI — a kong panic-sentinel primitive converting kong's os.Exit into a recoverable *ExitCodeError, fixing the #52 subcommand --help fall-through (exit 80 -> 0) uniformly across every command plugin. clidispatch_test.go ships 8 regression tests that FAIL without the fix. schema/seam.cue: #PodLifecyclePlan (the host-resolved pod start/stop plan the plugin's OpStart/OpStop execute) + #PodExecReply {output, exit_code} (the captured-exec reply for the 'charly service' move, exit-code-faithful). Regenerated into spec/cue_types_gen.go via task cue:gen, purely additive. Verified: task cue:gen reproducible (TestGenReproducible); sdk go build + go test + golangci-lint (0 issues) + gofmt clean. Exercised end-to-end by the superproject K4 bed roster (check-sidecar-pod PASS steps=11, check-commands-local PASS steps=5). Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01LEPDwaNUu2J5zk5Doyamqu
pr-validator — CHANGES REQUESTED ❌Change class: code (sdk contract — Go + CUE/SDD) Fresh independent re-validation (new context, author claims not trusted). One blocking finding; the rest of the PR is otherwise sound. 🔴 BLOCKING — the committed
|
…HAIN round) The kong 1.14->1.15 bump (via clidispatch.go) was tidied on the command-plugin modules but not on sdk itself; the go.work UNION masked the gap, so the committed standalone tree failed 'GOWORK=off go build/test' with 'missing go.sum entry for [email protected] / fatih/color'. GOWORK=off go mod tidy completes the standalone go.sum (+10). sdk is the tagged contract module consumed standalone by out-of-tree plugins, so standalone-clean is mandatory. Verified: GOWORK=off go build ./... + go test ./... (all 8 clidispatch tests RAN + PASSED standalone, no cache) + golangci-lint (0). Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01LEPDwaNUu2J5zk5Doyamqu
Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01KTybg84mHvZ2Dx58Fv3z5s
… pod plugin over F6 (+ #52) The K4 deploy-lifecycle DEEP-BODY move. `charly start` / `charly stop` / `charly service` no longer carry their pod-lifecycle BODIES in core — the host RESOLVES a plan and the `deploy:pod` plugin EXECUTES it over the F6 substrate-lifecycle channel. Core keeps only kind-blind dispatch (pod_lifecycle_{dispatch,resolve,verb}.go host-resolve `spec.PodLifecyclePlan`) + the host-process arbiter BRACKET (acquire before OpStart / release after OpStop / release on failure). Inline runDirect / runQuadlet / stopUnmountIfRequested bodies DELETED (R5 grep clean). Folds in the shared command-plugin `--help` fix (#52) at the sdk clidispatch root, wired across alias/box/bundle/check/migrate/status/vm; the parseLeaf (done,err) integration also extends the #52 discipline to `charly box inspect` (R2, an interaction with #102 already on main). shell / logs-follow / cmd stay M-core rows (F12/#62 — can't ride Invoke-and-reply); restart is thin-core (K5) — named exits, not incomplete seams. Depends on sdk v0.2026195.204 (opencharly/sdk#43, merged 529df36) — the clidispatch primitive + #PodLifecyclePlan/#PodExecReply carriers; the sdk gitlink + charly/go.mod require are finalized to that merged commit here (B2). go.sum completed for the kong v1.15.0 bump (validator fix round). Validated (fresh worktree, merged sdk gitlink): workspace go build/vet/test + golangci-lint 0 + gofmt clean; charly module GOWORK=off go mod verify = all modules verified; `charly box validate` clean; pluginsgen + cue:gen reproducible. Runtime: the concurrent 6-bed disposable roster all green through a fresh `charly update` (check-sidecar-pod ok:true with the new K4 check steps service-status-output-present + sidecar-pod-restarted PASS; check-commands-local; the VM lanes check-substrate/check-charly-vm/check-local-vm/check-k3s-vm all EXIT 0). Assisted-by: Claude (fully tested and validated)
pr-validator — APPROVED ✅ (supersedes the prior CHANGES-REQUESTED)Change class: sdk contract Go + CUE/SDD. Re-validated at head The fix
Runtime: the Decision: APPROVED, merged (squash) Assisted-by: Claude (analysed on a live system) |
Summary
The sdk contract half of the K4 deploy-lifecycle deep-body move (superproject PR lands second, bumping the sdk pointer). Two purely-additive additions:
clidispatch.go(+clidispatch_test.go) — the feat(deploy): K4-B — OpCompile + PlanFromView + the deploy-compile seam types #52 fix at the shared root.RunInProcCLI/ParseInProcCLIwrap kong's in-process dispatch with a panic-sentinel (kong.Exit→ recoverable panic →*ExitCodeError), so a subcommand--helpreturns 0 (was exit 80) and a real exit code propagates — fixed once, uniformly, for every command plugin (R3). 8 regression tests that FAIL without the fix.schema/seam.cue— two CUE-sourced pod-lifecycle wire carriers (SDD).#PodLifecyclePlan(host-resolved start/stop plan) +#PodExecReply {output, exit_code}(the captured-exec reply for thecharly servicemove, exit-code-faithful). Regenerated intospec/cue_types_gen.goviatask cue:gen(purely additive; no@go(-), no disjunction).Change class
Code (sdk contract) — runtime tier via the superproject's K4 bed roster.
R10 evidence (exercised by the superproject half)
charly check run check-sidecar-pod: PASS (steps=11) — the pod plugin'spodStart/podStop/podExecdecode#PodLifecyclePlan/#PodExecReplyagainst a freshcharly updaterebuild.charly check run check-commands-local: PASS (steps=5) — the#52--helppaths across command plugins.charly service status(reprintedkeepalive RUNNING, exit 0),charly stop/start/post-restart — all exit 0 on the real pod.Static gates
task cue:genreproducible (TestGenReproducible);go build+go test ./...+golangci-lint run(0 issues) +gofmtclean. Rebased ontoorigin/main(3968a3b); cue:gen reproducible post-rebase.R0–R10
Tier: fully tested and validated.
Assisted-by: Claude (fully tested and validated)
https://claude.ai/code/session_01LEPDwaNUu2J5zk5Doyamqu