refactor: move guest_home onto AgentProvisionPlan as source of truth

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.
This commit is contained in:
2026-06-08 14:58:31 +00:00
committed by didericis
parent 423003aa05
commit f23b2b9683
14 changed files with 23 additions and 19 deletions
+2 -1
View File
@@ -149,7 +149,6 @@ def _plan(
spec = _spec(supervise=supervise, with_git=with_git, with_egress=with_egress)
return DockerBottlePlan(
guest_home="/home/node",
spec=spec,
stage_dir=STAGE,
slug=SLUG,
@@ -172,6 +171,7 @@ def _plan(
prompt_mode="append_file",
image="bot-bottle-claude:latest",
dockerfile="",
guest_home="/home/node",
guest_env={},
),
workspace_plan=workspace_plan(spec, guest_home="/home/node"),
@@ -252,6 +252,7 @@ class TestAgentAlwaysPresent(unittest.TestCase):
prompt_mode="read_prompt_file",
image="bot-bottle-codex:latest",
dockerfile="",
guest_home="/home/node",
guest_env={"CODEX_HOME": "/home/node/.codex"},
)
plan = type(plan)(**{**vars(plan), "agent_provision": provision}) # type: ignore