Commit Graph

6 Commits

Author SHA1 Message Date
didericis-claude 37a780acf6 refactor: make AgentProvisionPlan the source of truth for instance_name, prompt_file, image, dockerfile, guest_home
lint / lint (push) Failing after 1m47s
test / unit (pull_request) Successful in 38s
test / integration (pull_request) Successful in 24s
Drop the parallel fields passed through prepare() → _resolve_plan and
read everything from agent_provision instead. The provider plugin now
declares its own guest_home (so the backend stops hardcoding
"/home/node") and the wrapper that builds the provision plan accepts
instance_name and prompt_file, which providers store on the plan.

DockerBottlePlan and SmolmachinesBottlePlan expose container_name /
machine_name, image / agent_image, dockerfile_path /
agent_dockerfile_path, and prompt_file as properties that delegate to
agent_provision so existing call sites keep working unchanged.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-08 19:23:19 +00:00
didericis 9470b8f955 chore: SAVEPOINT
lint / lint (push) Failing after 1m52s
test / unit (pull_request) Failing after 37s
test / integration (pull_request) Failing after 22s
2026-06-08 13:13:57 -04:00
didericis-claude dede230c4a refactor: move guest_home onto AgentProvisionPlan as source of truth
lint / lint (push) Failing after 1m27s
test / unit (pull_request) Successful in 28s
test / integration (pull_request) Failing after 16s
guest_home is now a field on AgentProvisionPlan (set by each provider's
provision_plan() method). BottlePlan.guest_home becomes a read-only
property delegating to agent_provision.guest_home so existing callers
(provision_git, provision_skills, provision_prompt) are unchanged.

Both resolve_plan.py files drop guest_home from the plan constructor
call; the local variable still exists as an intermediary for the
workspace_plan call that precedes agent_provision_plan.
2026-06-08 14:58:31 +00:00
didericis-claude c39d5dc63f refactor: extract shared resolve_plan helpers into backend/resolve_common.py
lint / lint (push) Failing after 1m27s
test / unit (pull_request) Successful in 29s
test / integration (pull_request) Failing after 15s
Both docker and smolmachines resolve_plan.py duplicated: slug minting,
metadata writing, agent state dir setup, git gate / egress / supervise
preparation, env_vars merge, and manifest dockerfile path resolution.

These are now consolidated in bot_bottle/backend/resolve_common.py.
Each backend's resolve_plan retains only its own logic (container name
resolution + env-file for docker; subnet allocation + guest_env build
for smolmachines).
2026-06-08 14:46:04 +00:00
didericis-claude 4359bd6099 refactor: move bottle_state.py to top-level bot_bottle package
lint / lint (push) Failing after 1m27s
test / unit (pull_request) Successful in 30s
test / integration (pull_request) Failing after 16s
Both docker and smolmachines backends use bottle state helpers.
Moving to bot_bottle/ makes the sharing explicit and removes the
cross-backend dependency (smolmachines importing from ..docker).

All callers updated: docker backend, smolmachines backend, cli
modules, and tests.
2026-06-08 14:38:24 +00:00
didericis-claude f95eabeb86 refactor: rename prepare.py → resolve_plan.py in both backends
lint / lint (push) Failing after 1m45s
test / unit (pull_request) Successful in 35s
test / integration (pull_request) Successful in 47s
2026-06-08 14:12:48 +00:00