[FEATURE] heph: podman, podman-kube + process backends #5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "ep/Jul23-2026/BackendsWave2"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Extends the pluggable-backend seam (Strategy + registry) from 2 kinds to 5:
k8s | compose | podman | podman-kube | process.up.tsand the verb dispatch stay backend-agnostic — each new kind is one registry entry + a validate hook.Backends
makeComposeBackend(engine, kind).ComposeBackend= docker engine (behavior byte-identical);PodmanBackend= podman engine, project root~/.heph/podman-compose/. Two-step availability check (podman + compose provider).podman kube play(no cluster/operator/CRDs). Play order is the dependency gate: infra → jobs (waited) → app group. Caddy Deployment w/ hostPort for routing (kube play ignores Ingress); pod-name aardvark DNS parity;DOPPLER_TOKENinjected only in-memory via stdin play (on-disk YAML token-free).process: {command, cwd?}. Source services run from the host toolchain (no image build); infra runs viadocker run --network host. Per-project unix socket, host-port pool from :18080, hostdoppler runwrap, Caddy proxy. Fastest inner loop.Tooling
~/.heph/tools/, sha256-verified).ensureToolInteractivegates on an opt-in TTY prompt; non-interactive throws aheph doctor --install-toolshint (never silently downloads).heph doctor(enginePrompt), never auto-installed.assertComposeSupported(eff, kind)parameterized so rejects name the actually-selected backend.Tests
Per-backend render/validate suites + backend-swap parity (selection, validate consistency, render parity, CR-vs-local parity, project-dir isolation), backend-contract completeness (all 5 kinds implement the full
Backendtype), up.ts step-order (isolated child process), IO round-trips incl. the token-never-on-disk guarantee, process-compose registry + engine-prompt. heph 750 tests (690 pass / 60 opt-in skip / 0 fail), operator 147 / 0 fail, tsc + biome clean.Self-review fixes (adversarial review)
waitContainersReadycounted pod-infra/init-wait helpers as satisfying "ready", returning before app containers started. Now gates on the count of long-running Deployments actually written (drift-proof).sh -cso compound commands stay inside the injected env, with shq-quoted project/config.Caveats
🤖 Generated with Claude Code
Extend the pluggable-backend seam (Strategy + registry) from 2 kinds to 5: k8s | compose | podman | podman-kube | process. up.ts and the verb dispatch stay backend-agnostic — each new kind is one registry entry + a validate hook. - podman: engine-parameterize the compose backend into makeComposeBackend(engine, kind). ComposeBackend = docker engine (behavior byte-identical); PodmanBackend = podman engine, project root ~/.heph/podman-compose/. Two-step availability check (podman + compose provider). - podman-kube: pure k8s-YAML render (heph/src/backend/kube/) run via `podman kube play` — no cluster, no operator, no CRDs. Play order is the dependency gate: infra -> jobs (waited) -> app group. Caddy Deployment with hostPort for routing (kube play ignores Ingress); pod-name aardvark DNS parity; DOPPLER_TOKEN injected only in-memory via stdin play (on-disk YAML token-free). - process: bare host processes via process-compose (heph/src/backend/process/). New per-service schema block `process: {command, cwd?}`. Source services run from the host toolchain (no image build); infra runs via `docker run --network host`. Per-project unix socket, host-port pool from :18080, host `doppler run` wrap, Caddy proxy. Fastest inner loop. - tools: vendor process-compose (v1.120.0) into the Garden-style tools registry (auto-download to ~/.heph/tools/, sha256-verified). ensureToolInteractive gates on an opt-in TTY prompt; non-interactive throws a `heph doctor --install-tools` hint (never silently downloads). Container engines (docker/podman) are detect-and-guide in `heph doctor` (enginePrompt), never auto-installed. - shared R5 floor: assertComposeSupported(eff, kind) parameterized so rejects name the actually-selected backend. Tests: per-backend render/validate suites + backend-swap parity (selection, validate consistency, render parity, CR-vs-local parity, project-dir isolation), backend-contract completeness (all 5 kinds implement the full Backend type), up.ts step-order (isolated child process), IO round-trips incl. the token-never-on-disk guarantee, process-compose registry + engine-prompt. Self-review fixes (from adversarial review): - kube: waitContainersReady counted the pod-infra/init-wait helpers as satisfying "ready", returning before app containers started. Now gates on the count of long-running Deployments actually written (drift-proof). - process: reserve author-pinned PORTs so a pin inside the pool can't collide; heph owns PORT for non-pinned source services (override to the assigned port so app-bind == heph-route); doppler-wrap a source command under `sh -c` so compound commands (`cd x && bun dev`) stay inside the injected env, with shq-quoted project/config. Backends are unit/parity-tested only (podman + process-compose not installed in CI); no live integration run. Deferred (docs/27): process backend has no Deployment->service manifest translation; kube single-container translate only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>