Repository navigation
feat(deploy): K4 lifecycle deep-body move — start/stop/service → the pod plugin over F6 (+ #52) - #105
Conversation
…pod plugin over F6 (+ #52) charly start / stop / service no longer carry their pod-lifecycle BODIES in core: the host RESOLVES a spec.PodLifecyclePlan (quadlet/direct, container/svc, run_argv, engine, enc, tunnel) and the deploy:pod plugin EXECUTES it over the F6 substrate-lifecycle channel (podStart/podStop). service is a captured in-container exec (podExec RunCaptures the host-resolved argv, returns spec.PodExecReply {output, exit_code}; the host reprints output + propagates the exact exit code via *sdk.ExitCodeError — a passthrough->capture semantics change that stays exit-code-faithful). The inline runDirect/runQuadlet/stopUnmountIfRequested bodies are DELETED (R5 grep clean). The arbiter stays a host-process BRACKET (acquire before Start + release-on-failure; release after Stop) — CHARLY_PREEMPT_LEASE is host-process state a placement-agnostic plugin cannot own. Interactive/streaming verbs stay CORE with named exits: shell/logs-follow/cmd = M-core rows (F12/#62 — cannot ride Invoke-and-reply); restart = thin-core (K5 verb-dispersal). #52: the shared command-plugin subcommand --help fall-through (exit 80 -> 0) is fixed at the ONE sdk clidispatch root (RunInProcCLI/ParseInProcCLI), wired across alias/box/bundle/check/migrate/status/vm command plugins (R3). Check-coverage: check-k8s-deploy-app composes check-keepalive (a queryable supervisord program, replacing a zero-program init); check-sidecar-pod gains service-status-output-present (a swallowing capture bug -> empty -> FAILS) + explicit charly stop->start both-directions steps. Boundary law (P16): core keeps only kind-blind dispatch + the DATA-projection plan FILL + the arbiter host-bracket; IMPORT-PURITY + ZERO-ALIASES intact (new files import sdk/spec only). FINDING-2: kong v1.15.0 propagated across 80 plugin go.mod/go.sum (approved). R10 fresh-rebuild bed roster (all green): check-sidecar-pod PASS (steps=11) + check-commands-local PASS (steps=5), plus direct live proof (service capture+reprint / stop / start / post-restart, all exit 0 on the real pod). go build + go test ./... (exit 0, pluginsgen reproducible) + golangci-lint (0) + charly box validate (0) + gofmt + R5 grep clean. NOTE: the staged sdk gitlink (baa6c68) is finalized to the merged sdk PR #43 commit at merge (B2). Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01LEPDwaNUu2J5zk5Doyamqu
pr-validator — CHANGES REQUESTED ❌Change class: code / config (charly core + candy plugins; cross-repo — depends on sdk#43) Fresh independent re-validation (new context, author claims not trusted). Two blocking items; the code-level move itself is sound. 🔴 BLOCKING-a (chain) — depends on the unmerged, currently-FAILING sdk#43Per B2 the staged sdk gitlink ( 🔴 BLOCKING-b (own defect) — untidy
|
…K4CHAIN round) charly/go.mod requires kong v1.15.0 (CLI) but go.sum was missing the kong v1.15.0/go.mod hash — the go.work UNION masked it. SURGICAL fix: GOWORK=off go mod download github.com/alecthomas/kong github.com/fatih/color adds the missing go.mod hash (+1 line) WITHOUT touching go.mod requires. NOTE: a full 'go mod tidy' is WRONG for charly — it is a WORKSPACE MEMBER whose compiled-in plugins are provided by go.work (main's charly/go.mod has ZERO plugin requires); tidy fetches 40+ plugin pseudo-versions and pollutes go.mod. So the sdk-style 'GOWORK=off go build ./... exit 0' gate does NOT apply to charly (its plugin imports are unresolvable standalone by design); the correct verification is 'GOWORK=off go mod verify' (all modules verified) + the workspace build (go.work). Both pass. sdk (the standalone-consumed contract module) got the full tidy — that gate DOES apply there. Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01LEPDwaNUu2J5zk5Doyamqu
….204), CalVer 2026.195.0215 Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_01KTybg84mHvZ2Dx58Fv3z5s
pr-validator — APPROVED ✅ (supersedes the prior CHANGES-REQUESTED)Change class: charly core + candy plugins (cross-repo). Re-validated at head Both prior blockers resolved:
Gates (fresh worktree, merged sdk gitlink): per-worktree binary built; charly Runtime R10 (corroborated read-only): the concurrent 6-bed disposable roster all Decision: APPROVED, merged (squash) Assisted-by: Claude (analysed on a live system) |
… validation; pin spec v0.2026249.2231 (offline-fallback latest-tag) (#551) * fix(check): gate the compiled-in plugin schemas BEFORE authored-input validation A COMPILED-IN plugin unit registers its PROVIDERS at init() but its SERVED SCHEMA only through the sync.Once loadBuiltinPluginUnits gate. A box-mode check run inside a fresh container (charly check live on a deployed bed) reaches runPluginVerb through an entry path that runs NO project plugin load, so connectBakedPlugin resolves the init-registered builtin provider immediately (registry hit, no connect) and validation ran against an EMPTY input-def registry — every `plugin verb:*` check step failed with "no input def registered (schema not loaded)" while the deploy phase (whose loadDeployPlugins path runs the gate) passed. The kind-class dispatch already gates before validating (runPluginKind); runPluginVerb now runs the SAME idempotent gate before any resolve/validation, and a broken builtin schema fails the verb loudly. The TDD repro test fails pre-fix with the exact production message. * chore: pin spec v0.2026249.2231 (offline-fallback latest-tag) + forced migration tail Companion pin set required by spec v0.2026249.2231 (opencharly/spec #108 — the persisted latest_tags cache is an offline fallback, never fresh data; the stale-latest-tag RCA fix): - spec v0.2026249.2030 => v0.2026249.2231 — the staleness fix itself: a fresh process now always re-probes the latest tag instead of serving the 1h-TTL persisted entry (plugin refs resolved STALE v2026.242.0932 minutes after v2026.249.2212 was tagged). - sdk v0.2026249.2036 => v0.2026249.2114 — forced: spec 2231 removed Deploy/FleetNode.IsGroup (spec #105); 2114 is the first sdk tag without the deleted guard (sdk #224). - plugin-check v0.2026249.2119, plugin-fleet v0.2026249.2126, plugin-preempt v0.2026249.2116, plugin-migrate v0.2026249.2144 — forced: the same IsGroup migration in charly's compiled-in plugin candies. Schema-floor tail (the migrate verb's own 2026.249.2125 stamp output, no hand edits): charly/charly.yml version stamp + the hardcoded fixture stamps in six test files the raised floor requires. The broader config conversion (group-node rewrites) is NOT part of this PR. * Revert "chore: pin spec v0.2026249.2231 (offline-fallback latest-tag) + forced migration tail" This reverts commit 39d0bb9.
Summary
The K4 deploy-lifecycle deep-body move.
charly start/charly stop/charly serviceno longer carry their pod-lifecycle BODIES in core — the host RESOLVES a plan and thedeploy:podplugin EXECUTES it over the F6 substrate-lifecycle channel. Core keeps only kind-blind dispatch + the host-process arbiter bracket. Folds in the shared command-plugin--helpfix (#52).Depends on sdk PR opencharly/sdk#43 (the clidispatch primitive +
#PodLifecyclePlan/#PodExecReplycarriers). Land sdk first; the staged sdk gitlink (baa6c68) is finalized to the merged sdk#43 commit at merge (B2).The move
startViaLifecycle/stopViaLifecycle→ResolveTarget→LifecycleTarget.Start/Stop→ F6 → the plugin'spodStart/podStop(host resolvesspec.PodLifecyclePlan; enc→verb:enc, tunnel→verb:tunnelvia InvokeProvider). InlinerunDirect/runQuadlet/stopUnmountIfRequestedDELETED (R5 grep clean).execInitCommandhost-resolves the<engine> exec <ctr> <tool> <op> <svc>argv →LifecycleTarget.Shell→ the plugin'spodExecRunCaptures it →spec.PodExecReply {output, exit_code}; the host reprints output + propagates the EXACT exit code via*sdk.ExitCodeError(passthrough→capture, exit-code-faithful).clidispatchroot, wired across alias/box/bundle/check/migrate/status/vm.Change class
Code / config — runtime tier.
R10 evidence (fresh-rebuild bed roster, all green)
charly check run check-sidecar-pod: PASS (steps=11) — service-status-output-present (reprintedkeepalive RUNNING) + explicitcharly stop→startboth-directions, through a freshcharly updaterebuild.charly check run check-commands-local: PASS (steps=5) — refactor(check): core consumes the kit tag-expression surface (P5-unit-1 consumer) #52--helppaths.charly service status(keepalive RUNNING, exit 0),stop/start/post-restart — all exit 0.Static gates
go build ./...+go test ./...(exit 0, pluginsgen reproducible) +golangci-lint(0) +charly box validate(0) +gofmt+ R5 grep clean. Rebased ontoorigin/main(1dacada).Rebase-integration fix (R2, surfaced by the post-rebase re-gate)
#102 (already on main) added
plugin-box/inspect_list.gocallingparseLeafwith the old 1-value signature; my #52 change made it return(done, err). Fixed both call sites (inspect_list.go+ its test) with the shared (done, err) pattern — this also correctly extends the #52--helpfix tocharly box inspect.R0–R10
Tier: fully tested and validated.
Assisted-by: Claude (fully tested and validated)
https://claude.ai/code/session_01LEPDwaNUu2J5zk5Doyamqu