Skip to content

feat(deploy): charly shell/cmd/logs → the pod/vm plugins over the F12 live-stdio reverse channel - #106

Merged
atrawog merged 2 commits into
mainfrom
feat/f12-stream-channel
Jul 14, 2026
Merged

atrawog merged 2 commits into
mainfrom
feat/f12-stream-channel

Conversation

@atrawog

@atrawog atrawog commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

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 --follow move off their inline syscall.Exec / os/exec bodies 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.mod require.

What lands

  • Dispatch: LifecycleTarget.Attach + substrateLifecycle.Attach + externalDeployTarget.Attach +
    grpcSubstrateLifecycle.Attach — the venue executor is 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.
  • 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 feat(loader): dispatch config parse through a loader plugin + kill the typed uf.* maps (P6) #57 charly service capture leg.
  • Verb rewires: shell→lt.Attach(tty=true), cmd→lt.Attach(tty=false)+notify wrapper,
    logs→lt.Logs. R5: shell.go −264 (buildShellArgs/buildExecArgs/shellQuoteArgs relocated;
    execCommand/findExecutable deleted; 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 register
    IOU rows for cmd / shell / logs-follow.

Deliberate rename (orchestrator-approved)

The substrateLifecycle method TeardownExecutor→**VenueExecutor** — it now has TWO consumers
(charly bundle del teardown-replay AND the F12 Attach leg), so the name reflects its real contract
("the venue executor reaching a running deploy"). The wire Op sdk.OpTeardownExecutor keeps its
name
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 shell through ResolveTarget regressed charly shell <UNCONFIGURED image> (a
built-but-not-deployed image): the reference-scoped loader never built plugin-deploy-pod for a bare
box → "deploy provider not connected". The bed roster would NOT catch this (bed pods are configured);
the direct-proof discipline did. Fix: dispatchLifecycleTarget now
connectPluginByWord(ClassDeployTarget, node.Target) (idempotent, local-first, network-free); the
now-stale //nolint:unparam on connectPluginByWord retired.

R10 evidence (fully tested and validated)

  • Gates on the final tree: charly go test/golangci-lint 0/gofmt clean; F11 uniform-API gate
    green (RunInteractive/RunStream allowlisted); task cue:gen/proto:gen/pluginsgen reproducible;
    charly box validate exit 0. Assembled compile+test against the merged sdk e2cc807.
  • Live-proven on the final stamped binary (v2026.195.0216): pod charly cmd exec-into-running
    (F12-CMD-HELLO=42) / stdin (STDIN-CMD-77) / exit-4; pod charly logs RunStream dump + bounded
    -f; vm charly shell <vm> -c '…' ran IN the guest (GUEST-UNAME=archlinux) via ssh -t +
    exit-6 propagation (validating vmAttach AND the renamed VenueExecutor live).
  • Both acceptance lanes PASS on the final tree: check-commands-local (steps=5, ok) +
    check-local-vm (steps=7 incl the update phase, ok, 305s).
  • Two INFRA-only failures RCA'd honestly (zero F12-code failures): (1) an unstamped go build
    binary → charly version "unknown" → fixed by building via task build:binary; (2) a refactor(scaffold): consume the box-new engine from sdk/kit (P15 sub-unit) #72
    sibling-branch object-fetch landmine in the bed update phase → resolved by seeding the objects.
  • Found-pre-existing (registered, not this cutover): charly bundle del <vm> leaves the libvirt
    domain — RCA'd to docs(sdd): CLAUDE.md defers the exception catalog to its sole owner #69's vm destroy path, NOT this behavior-preserving rename (Del calls
    VenueExecutor identically to the old TeardownExecutor).

Checklist

Assisted-by: Claude (fully tested and validated)

… 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
@atrawog

atrawog commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

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 e2cc807, and re-ran the workspace gates.

Coordinates (verified exactly): sdk gitlink 529df36→e2cc807 (leg-1 merged HEAD); charly/go.mod require v0.2026195.204→v0.2026195.501 (go list -m → v0.2026195.501 => ../sdk); CHANGELOG placeholder 2026.195.0601; plugin candies stay v0.0.0+replace (correct).

Gates re-run GREEN (assembled @1fa121e, sdk@e2cc807): GOWORK=off go mod verify ok; workspace go build ./charly/... clean; go vet clean; go test ./charly/... ok (57.6s) incl. internal/pluginsgen (TestPluginsGenReproducible) + the F11 TestNoSinglePluginAPISurface + the relocated buildShellArgs/buildExecArgs unit tests + the VenueExecutor e2e test; golangci-lint run → 0 issues; gofmt empty; plugin-deploy-pod + plugin-deploy-vm standalone (GOWORK=off) build/vet/test/lint all green; task cue:gen a git-clean no-op.

Checklist

  • [PASS] 0. security/anti-tampering — no secrets/exfil/weakened-gate; supply-chain = the expected sdk gitlink+require bump to the merged tag; exec podman/ssh/bash is the executor MECHANISM; desc↔code match; no embedded instructions.
  • [PASS] 1. description — filled template; per-file summary; How-R10 + eval-bed list + cited live proofs + tier + rule checklist.
  • [PASS] 2. change-class gate — workspace-member gate (go mod verify + workspace build/test/lint, re-run) + assembled-superproject acceptance beds on the stamped binary. No dry-run/rebuild-alone fraud.
  • [PASS] 3. attribution fully tested and validated — the F12 consumers (charly shell/cmd/logs -f) ran live on the fresh stamped rebuild (pod cmd F12-CMD-HELLO=42/stdin/exit-4; pod logs -f; vm shell GUEST-UNAME=archlinux/exit-6 → validates vmAttach + the renamed VenueExecutor); ceiling set independently = matches.
  • [PASS] 4. R0 skills — /charly-internals:go + /charly-internals:plugin (host RESOLVES → plugin EXECUTES over the reverse channel; the feat(refs): dispatch the remote-repo fetch backend through candy/plugin-refs (P7 consumer) #59 resolution inventory stays core; unary Half-A).
  • [PASS] 5. R1 — the two infra failures (unstamped binary; refactor(scaffold): consume the box-new engine from sdk/kit (P15 sub-unit) #72 fetch) + the R2 unconfigured-image regression all RCA'd to root & fixed/registered; zero gate warnings.
  • [PASS] 6. R2 — the unconfigured-image regression fixed IN-TREE (connectPluginByWord(ClassDeployTarget, …)); docs(sdd): CLAUDE.md defers the exception catalog to its sole owner #69 (bundle-del leaves libvirt domain, RCA'd to the independent vm destroy path — the rename is behavior-preserving) + refactor(scaffold): consume the box-new engine from sdk/kit (P15 sub-unit) #72 registered as own tasks.
  • [PASS] 7. R3 — resolvePodRuntimeImage shared image-context head (genuine start/shell dedup).
  • [PASS] 8. R4 — no sleep/retry/magic-number; forceTTY global is a verbatim invocation-scoped relocation (no race).
  • [PASS] 9. R5 — \bTeardownExecutor\b method → zero refs; OpTeardownExecutor wire Op INTACT; podCli("logs")/execCommand/findExecutable deleted (only comment refs); relocated helpers' existing tests still pass.
  • [PASS] 10. R6/R8/R9 — no destructive git in diff; generated files reproducible; beds on the freshly-built stamped 2026.195.0216.
  • [PASS] 11. R10 — disposable beds, fresh stamped rebuild, zero warnings; check-coverage = sdk regression test + the live shell/cmd/logs proofs. Evidence complete + corroborated on disk.
  • [PASS] 12. SDD — no schema/proto/compiled_plugins change; cue:gen + pluginsgen reproducible (TestPluginsGenReproducible green); the sole new schema type (PodLiveStdioPlan) is the CUE-sourced sdk carrier from leg 1.
  • [PASS] 13. concurrency anti-cheat — not a shared-mutable-state change (per-invocation attach/logs legs; idempotent connectPluginByWord); no idle/serial dodge; failures root-caused.
  • [PASS] 14. hard cutover — ONE atomic commit; producer (sdk) merged first; no Phase-2/TODO.
  • [PASS] 15. ARCHITECTURE GATE — placement: CORRECT — the exec EFFECT LEAVES core (→ pod/vm plugins over the F12 reverse channel via RunInteractive/RunStream); the resolution relocates within core's feat(refs): dispatch the remote-repo fetch backend through candy/plugin-refs (P7 consumer) #59 inventory (tracked K-wave), closing the feat(loader): dispatch config parse through a loader plugin + kill the typed uf.* maps (P6) #57 M-core register IOU rows for shell/cmd/logs-follow; no new alias, no new sdk-kit import (IMPORT-PURITY + ZERO-ALIASES preserved). F11 allowlist growth = class-generic action nouns, reviewed.
  • [PASS] 16. disposable-only autonomy — rebuild/update on disposable beds only.
  • [PASS] 17. clean arch + go gates — gofmt/vet/golangci-0/test all re-run green (charly workspace + both candies).
  • [PASS] 18. CHANGELOG — present (placeholder; validator finalizes the merge CalVer).

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 v<YYYY.DDD.HHMM>. This completes the #62 cutover.

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)
@atrawog
atrawog merged commit 000705e into main Jul 14, 2026
@atrawog
atrawog deleted the feat/f12-stream-channel branch July 14, 2026 05:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant