PRD 0004: Split out provisioners #7
Reference in New Issue
Block a user
Delete Branch "split-out-provisioners"
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
Break
claude_bottle/backend/docker/backend.py(664 lines) apart by moving the four provisioner methods —provision_prompt,provision_skills,provision_ssh,provision_git— out ofDockerBottleBackendinto their own modules underclaude_bottle/backend/docker/provision/. The abstract base inclaude_bottle/backend/__init__.pykeeps the same four-method contract; only the Docker implementation changes shape.Why
DockerBottleBackendowns image build, container run, name-conflict retry, four provisioners, cleanup, and listing all in one file. The fourprovision_*methods are the largest single chunk —provision_sshalone is ~150 lines (root-staged keyring + in-containerssh-agent+ socat bridge). They're self-contained and the most likely place future backends will diverge, so making per-provisioner variation a file boundary (not a method boundary inside a god-class) is the right cut.Proposed shape
Each module exports one free function taking
(plan: DockerBottlePlan, target: str). TheBottleBackend.provision_*abstract surface stays unchanged; only the Docker implementation moves.validate_skills/validate_ssh_entriesstay on the class (they run fromprepare, notprovision).Non-goals
.gitgating all stay byte-identical.ExitStackrewrite oflaunch's teardown.os.environ["CLAUDE_CODE_OAUTH_TOKEN"]parent-process mutation.ProvisionerABC — premature with one backend.Full design in
docs/prds/0004-split-out-provisioners.md.Split out provisionersto PRD 0004: Split out provisionersThis was probably too small to be a PRD
didericis-claude referenced this pull request2026-06-02 00:12:12 -04:00