refactor(sidecars): bundle is the only shape (PRD 0024 chunk 5) #59
Reference in New Issue
Block a user
Delete Branch "prd-0024-chunk-5-flag-removal"
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 5: flip the bundle on as the only sidecar shape. The
CLAUDE_BOTTLE_SIDECAR_BUNDLEfeature flag and the legacy four-container compose path are gone — every bottle now ships exactly two containers (agent + sidecars).Net: −626 lines.
What's deleted
Dockerfile.egress,Dockerfile.git-gate,Dockerfile.supervise(replaced byDockerfile.sidecars)._pipelock_service/_egress_service/_git_gate_service/_supervise_servicerenderer helpers.sidecar_bundle_enabled()(the flag parser).*_IMAGE/*_DOCKERFILEconstants andbuild_*_imagehelpers in the three sidecar modules.TestPipelockAlwaysPresent,TestConditionalGitGate,TestConditionalEgress,TestConditionalSupervise,TestFullMatrix) andTestSidecarBundleFlag.patch.dictflag-wrapping inTestSidecarBundleShape— bundle is unconditional now.What changed
pipelock_apply.pynow targetssidecar_bundle_container_name(slug)for thedocker cp+docker restartcalls. A restart bounces all four daemons together; per-daemon reload is the eventual feature (PRD 0024 open question 1), not v1._agent_service.depends_oncollapses to["sidecars"].test_pipelock_apply.pybrings up its standalone pipelock container under the bundle's name so the apply path's restart hits the right target.README.mdArchitecture section rewritten to describe the agent + bundle pair (the rest of the README still has older references that predate this PRD — separate cleanup pass).Test status
test_pipelock_applyno longer needs the skip since chunk 5 made the bundle-named target real).claude-bottle-<slug>+claude-bottle-sidecars-<slug>. PRD 0022's 5-attack sandbox-escape suite green.What chunk-5 explicitly does NOT do
The README still has pre-PRD-0017 references to "cred-proxy" and a four-sidecar ASCII diagram. Those are stale across multiple prior PRDs, not just this one — out of scope for chunk 5. A separate doc cleanup pass would re-write the Architecture section's per-image bullets and the ASCII diagram.
The CLAUDE_BOTTLE_SIDECAR_BUNDLE feature flag is gone. Every bottle ships with the agent + bundle pair — no opt-in, no legacy four-sidecar fallback. Changes: - Renderer (compose.py): bottle_plan_to_compose unconditionally emits {agent, sidecars}. Deleted _pipelock_service, _git_gate_service, _egress_service, _supervise_service helpers. _agent_service.depends_on collapses to ["sidecars"]. - sidecar_bundle.py: deleted sidecar_bundle_enabled (the flag parser). SIDECAR_BUNDLE_IMAGE + container-name helper stay. - pipelock_apply.py: docker cp + docker restart now target sidecar_bundle_container_name(slug). Bundle restart bounces all four daemons together (per-daemon reload is the eventual feature, not v1). - Per-sidecar modules trimmed: - egress.py: dropped EGRESS_IMAGE, EGRESS_DOCKERFILE, build_egress_image, egress_url. Kept EGRESS_PORT, CA paths, egress_container_name (still used by the renderer's network aliases). - git_gate.py: dropped GIT_GATE_IMAGE, GIT_GATE_DOCKERFILE, build_git_gate_image. Kept git_gate_host + GIT_GATE_PORT. - supervise.py: dropped SUPERVISE_IMAGE, SUPERVISE_DOCKERFILE, build_supervise_image, supervise_url. - Deleted Dockerfile.{egress,git-gate,supervise}. The bundle's Dockerfile.sidecars is the only sidecar image now. - test_compose.py: deleted TestPipelockAlwaysPresent, TestConditionalGitGate, TestConditionalEgress, TestConditionalSupervise, TestFullMatrix (legacy-shape only), TestSidecarBundleFlag (flag is gone). TestSidecarBundleShape drops its patch.dict wrapper. TestAgentAlwaysPresent's depends_on cases collapse to one. - test_pipelock_apply.py: bringup container name uses sidecar_bundle_container_name(slug) to match the production target. - README.md Architecture section rewritten to describe the agent + bundle pair. Net: -626 lines. Test status: 498 unit + 27 integration + 1 skipped (chunk-4 pending — superseded by this chunk's rewrite). Locally verified end-to-end bottle launch produces exactly 2 containers (claude-bottle-<slug> + claude-bottle-sidecars-<slug>). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>