Repository navigation
feat(deploy): charly shell/cmd/logs → the pod/vm plugins over the F12 live-stdio reverse channel - #106
Conversation
… live-stdio reverse channel The consumer leg of the F12 interactive/streaming reverse-channel (#62): `charly shell` / `charly cmd` / `charly logs --follow` move off their inline `syscall.Exec` / `os/exec` bodies onto the executor reverse channel. The host RESOLVES the venue command (the #59 resolution inventory stays core), the owning deploy plugin runs it over the served venue executor via RunInteractive/RunStream, and the operator's terminal (which the reverse-channel server inherits, host-side) drives it — stdio never crosses the wire. Pairs with sdk PR #44 (the executor legs + carrier). - Dispatch: LifecycleTarget.Attach + substrateLifecycle.Attach + externalDeployTarget.Attach + grpcSubstrateLifecycle.Attach (venue executor resolved generically via VenueExecutor — vm → guest SSHExecutor `ssh -t`, pod → nil → host ShellExecutor `podman exec/run -it`; NO arbiter bracket). grpcSubstrateLifecycle.Logs threads a resolved plan for a substrate with a logs resolver (pod). - Resolvers (pod_lifecycle_resolve.go): resolvePodShellPlan/CmdPlan/LogsPlan RELOCATE shell.go/cmd.go/ commands.go verbatim; R3 resolvePodRuntimeImage is the shared image-context head with resolvePodStartDirect. Plugin bodies: pod OpAttach→podAttach (RunInteractive), OpLogs→RunStream (the podCli("logs") reentry DELETED); vm OpAttach→vmAttach over the guest SSHExecutor. OpShell stays the #57 `charly service` capture leg. - Verb rewires: charly shell→lt.Attach(tty=true), charly cmd→lt.Attach(tty=false)+notify wrapper, charly logs→lt.Logs. R5: shell.go −264 (buildShellArgs/buildExecArgs/shellQuoteArgs relocated; execCommand/findExecutable deleted). Closes the #57 M-core register IOU rows for cmd/shell/logs-follow. - RENAME: the substrateLifecycle method TeardownExecutor→VenueExecutor (two consumers now: bundle-del teardown-replay + F12 Attach; the wire Op sdk.OpTeardownExecutor keeps its name for wire stability). - R2 fix (caught by the direct proof, would-not-be-caught by the beds): `charly shell <UNCONFIGURED image>` regressed when routed through ResolveTarget (the reference-scoped loader never built plugin-deploy-pod for a bare box) → dispatchLifecycleTarget now connectPluginByWord(ClassDeployTarget, node.Target); the now-stale //nolint:unparam on connectPluginByWord retired. - sdk submodule pointer bumped to the merged sdk (F12 executor legs) + charly/go.mod require version. R10 (fully tested and validated): charly go test/lint/gofmt clean; F11 uniform-API gate green; cue:gen/proto:gen/pluginsgen reproducible; charly box validate exit 0. Live-proven on the final stamped binary (v2026.195.0216): pod cmd exec-into-running/stdin/exit + logs RunStream dump + bounded -f; vm charly shell <vm> IN the guest (GUEST-UNAME=archlinux) + exit-6 propagation. Both acceptance lanes PASS on the final tree (check-commands-local steps=5; check-local-vm steps=7 incl update phase). Two infra-only failures RCA'd (unstamped-binary "unknown" → task build:binary; #72 sibling-branch fetch) — zero F12-code failures. Found-pre-existing: `charly bundle del <vm>` leaves the libvirt domain (#69's vm-destroy path; NOT this cutover's behavior-preserving rename). Assisted-by: Claude (fully tested and validated) Claude-Session: https://claude.ai/code/session_015BMMsdcvYM4FwmfRhV3Vnz
pr-validator — APPROVED ✅Change class: charly Go / candy config (runtime) — superproject leg of F12 (#62). ONE atomic commit (1fa121e, parent == base af4337d). Independently re-derived; no author claim trusted. Assembled a fresh superproject worktree at the PR head with the sdk submodule at the merged Coordinates (verified exactly): sdk gitlink 529df36→e2cc807 (leg-1 merged HEAD); Gates re-run GREEN (assembled @1fa121e, sdk@e2cc807): Checklist
Decision: APPROVED. Coordinates match the merged sdk exactly; the whole charly workspace (+ both touched candies) re-compiles, tests, and lints clean against sdk@e2cc807; the R5 rename/deletion sweep is clean; placement advances the plugin-host end-state (the exec effect leaves core). Finalizing the merge-time CalVer, posting the required status on the new head, squash-merging, and tagging Assisted-by: Claude (analysed on a live system) |
Version-stamp for the F12 superproject cutover (shell/cmd/logs → the pod/vm plugins over the live-stdio reverse channel). Folded into the squash-merge. Assisted-by: Claude (fully tested and validated)
Summary
The superproject leg of the F12 interactive/streaming reverse-channel (#62) — pairs with the
already-merged sdk PR #44 (executor legs + carrier).
charly shell/charly cmd/charly logs --followmove off their inlinesyscall.Exec/os/execbodies onto the F12 executor reverse channel:the host RESOLVES the venue command (the #59 resolution inventory stays core), the owning deploy plugin
runs it over the served venue executor via
RunInteractive/RunStream, and the operator's terminal(inherited host-side by the reverse-channel server) drives it — stdio never crosses the wire.
Change class: charly Go / candy config (runtime). Bumps the sdk submodule to the merged
e2cc807(tag
v0.2026195.501) +charly/go.modrequire.What lands
LifecycleTarget.Attach+substrateLifecycle.Attach+externalDeployTarget.Attach+grpcSubstrateLifecycle.Attach— the venue executor is resolved GENERICALLY viaVenueExecutor(vm →guest
SSHExecutorssh -t, pod → nil → hostShellExecutorpodman exec/run -it; NO arbiterbracket).
grpcSubstrateLifecycle.Logsthreads a resolved plan for a substrate with a logs resolver.pod_lifecycle_resolve.go):resolvePodShellPlan/CmdPlan/LogsPlanRELOCATEshell.go/cmd.go/commands.goverbatim; R3resolvePodRuntimeImageis the shared image-contexthead with
resolvePodStartDirect. Plugin bodies: podOpAttach→podAttach(RunInteractive),OpLogs→RunStream(thepodCli("logs")reentry DELETED); vmOpAttach→vmAttachover the guestSSHExecutor.
OpShellstays the feat(loader): dispatch config parse through a loader plugin + kill the typed uf.* maps (P6) #57charly servicecapture leg.lt.Attach(tty=true), cmd→lt.Attach(tty=false)+notify wrapper,logs→
lt.Logs. R5:shell.go−264 (buildShellArgs/buildExecArgs/shellQuoteArgsrelocated;execCommand/findExecutabledeleted;git grep→ zero method refs). Closes the feat(loader): dispatch config parse through a loader plugin + kill the typed uf.* maps (P6) #57 M-core registerIOU rows for cmd / shell / logs-follow.
Deliberate rename (orchestrator-approved)
The
substrateLifecyclemethodTeardownExecutor→**VenueExecutor** — it now has TWO consumers(
charly bundle delteardown-replay AND the F12Attachleg), so the name reflects its real contract("the venue executor reaching a running deploy"). The wire Op
sdk.OpTeardownExecutorkeeps itsname for wire stability (renaming it would cross the pod/vm/example plugin surfaces + spec — the
disproportionate case); the method↔Op mapping is doc'd.
git grep '\bTeardownExecutor\b'→ 0.R2 fix (caught by the direct proof — invisible to the beds)
Routing
charly shellthroughResolveTargetregressedcharly shell <UNCONFIGURED image>(abuilt-but-not-deployed image): the reference-scoped loader never built
plugin-deploy-podfor a barebox → "deploy provider not connected". The bed roster would NOT catch this (bed pods are configured);
the direct-proof discipline did. Fix:
dispatchLifecycleTargetnowconnectPluginByWord(ClassDeployTarget, node.Target)(idempotent, local-first, network-free); thenow-stale
//nolint:unparamonconnectPluginByWordretired.R10 evidence (fully tested and validated)
go test/golangci-lint 0/gofmtclean; F11 uniform-API gategreen (RunInteractive/RunStream allowlisted);
task cue:gen/proto:gen/pluginsgenreproducible;charly box validateexit 0. Assembled compile+test against the merged sdke2cc807.charly cmdexec-into-running(
F12-CMD-HELLO=42) / stdin (STDIN-CMD-77) / exit-4; podcharly logsRunStream dump + bounded-f; vmcharly shell <vm> -c '…'ran IN the guest (GUEST-UNAME=archlinux) viassh -t+exit-6 propagation (validating vmAttach AND the renamed VenueExecutor live).
check-commands-local(steps=5, ok) +check-local-vm(steps=7 incl the update phase, ok, 305s).go buildbinary →
charly version"unknown" → fixed by building viatask build:binary; (2) a refactor(scaffold): consume the box-new engine from sdk/kit (P15 sub-unit) #72sibling-branch object-fetch landmine in the bed update phase → resolved by seeding the objects.
charly bundle del <vm>leaves the libvirtdomain — RCA'd to docs(sdd): CLAUDE.md defers the exception catalog to its sole owner #69's
vm destroypath, NOT this behavior-preserving rename (Del callsVenueExecutoridentically to the oldTeardownExecutor).Checklist
resolvePodRuntimeImage; R4 no workarounds; R5 grep clean on deleted identifiersdisposable: truetargets, exploratory + fresh stamped rebuild, both lanes greenAssisted-by: Claude (fully tested and validated)