refactor(docker): split backend.py into prepare / launch / cleanup
Move the resolution, bring-up, and orphan-cleanup logic out of backend.py into three topic-named modules. DockerBottleBackend becomes a thin façade that wires the per-instance pipelock proxy and the provision orchestrator into the free functions. backend.py drops from ~360 to ~70 lines and each topic now reads end-to-end in one place. Mirrors the existing provision/ split. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -4,10 +4,14 @@ The bulk of the implementation lives in sibling modules:
|
||||
|
||||
- util: thin Docker subprocess wrappers
|
||||
- network: Docker network plumbing
|
||||
- pipelock: DockerPipelockProxy lifecycle
|
||||
- bottle_plan: DockerBottlePlan
|
||||
- bottle_cleanup_plan: DockerBottleCleanupPlan
|
||||
- bottle: DockerBottle handle
|
||||
- backend: DockerBottleBackend
|
||||
- prepare: host-side resolution into a DockerBottlePlan
|
||||
- launch: bring-up + teardown context manager
|
||||
- cleanup: orphan enumeration, removal, active listing
|
||||
- backend: DockerBottleBackend façade wiring the above
|
||||
|
||||
This file only re-exports the public names so
|
||||
`from claude_bottle.backend.docker import DockerBottleBackend` keeps
|
||||
|
||||
Reference in New Issue
Block a user