feat(smolmachines): bundle bringup on per-bottle docker bridge (PRD 0023 chunk 2c) #66
Reference in New Issue
Block a user
Delete Branch "prd-0023-chunk-2c-bundle-bringup"
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
Chunk 2c: lifecycle primitives for the per-bottle docker bridge + the sidecar bundle container with a pinned IP. The pinning is what makes smolvm's TSI allowlist (
<bundle-ip>/32) safe to compute at prepare time — without it, we'd have to inspect the bundle's assigned IP after start and feed it back into the Smolfile.API
BundleLaunchSpecis the docker-argv carrier: slug + network/subnet/gateway/bundle_ip + daemons_csv + environment + volumes + image. Chunk 2d populates it from the inner Plans (PipelockProxyPlan, EgressPlan, GitGatePlan, SupervisePlan) that already exist in the docker backend.Idempotency
Where it matters for partial-teardown safety:
create_bundle_networktreats"already exists"as success.remove_bundle_network+stop_bundletreat"no such network"/"no such container"as success.die(create,start) orwarn(remove,stop) depending on whether the launch flow can recover.Tests
subprocess.run): argv shape per primitive, idempotent paths, host-env inheritance to the docker run subprocess.GITEA_ACTIONS): end-to-end bringup of an empty-daemons bundle on a192.168.211.0/24bridge, confirms the container lands at the pinned IP. Skipped ifclaude-bottle-sidecars:latestisn't built locally yet.546 unit tests passing. Real-docker bundle bringup green locally.
Chunk 2 remaining
launch.pyend-to-end — populateBundleLaunchSpecfrom the inner Plans (callproxy.prepare/egress.prepare/ etc. like the docker backend does), bring up bundle → VM → exec, tear down. Integration smoke (exec("echo hi")inside a started VM) + the localhost-reach probe + the egress-port-bypass probe from the PRD acceptance plan.