feat(compose): bundle shape behind feature flag (PRD 0024 chunk 2) #56
Reference in New Issue
Block a user
Delete Branch "prd-0024-chunk-2-renderer-collapse"
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
PRD 0024 chunk 2: the docker backend's compose renderer now emits a single
sidecarsservice in place of the four per-sidecar services whenCLAUDE_BOTTLE_SIDECAR_BUNDLEis set. Default (unset /0/false) keeps the legacy five-service shape — chunks 4-5 flip the default and delete the flag.The bundle service consumes the bundle image from PR #55. It joins both networks with aliases for every legacy shortname + per-slug long-form so the agent's existing
HTTPS_PROXYURL keeps resolving with no agent-side change. Daemon subset narrows viaCLAUDE_BOTTLE_SIDECAR_DAEMONS=<csv>for bottles that don't use git-gate or supervise. Volumes are the union of the four prior services' bind-mounts at the same in-container paths.HTTPS_PROXY scoping
One subtle correctness issue: today
egress's compose service env carriesHTTPS_PROXYso its outbound goes through pipelock. Propagating that to the bundle would route git-gate's git fetches through pipelock too — wrong (pipelock doesn't proxy SSH, and pipelock would TLS-MITM github.com which isn't on the allowlist). Moved the export intoegress_entrypoint.shso only mitmdump's subprocess sees it.Tests
TestSidecarBundleShapecases asserting services / aliases / env / volumes / depends_on under the flag + 8 newTestSidecarBundleFlagcases locking down the env-var parser).CLAUDE_BOTTLE_SIDECAR_BUNDLE=1against a full-matrix fixture — the resulting compose dict is clean.Sample (flag on, full matrix)
Out of scope (chunks 3-5)
backend/docker/{pipelock,egress,git_gate,supervise}.pystill carry their per-container start/stop helpers; chunk 3 strips them and consolidates container-name lookups onto a single bundle helper.Dockerfile.{egress,git-gate,supervise}. Chunk 3.