fix(sandbox): use spec-required cleveragents/plan- branch naming in git worktree
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / e2e_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / benchmark-regression (push) Blocked by required conditions
CI / benchmark-publish (push) Waiting to run
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / helm (push) Waiting to run
CI / status-check (push) Blocked by required conditions

Reviewed and APPROVED. Closes #2601.
This commit was merged in pull request #3263.
This commit is contained in:
2026-04-05 21:09:04 +00:00
committed by Forgejo
3 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ Feature: CONC3 - Garbage collection and cleanup
And the cleanup summary should report 1 sandbox removed
Scenario: Git worktree sandbox cleanup removes branch
Given a stale git worktree sandbox with branch "sandbox/test-plan"
Given a stale git worktree sandbox with branch "cleveragents/plan-test-plan"
When I purge stale sandboxes
Then the worktree directory should be removed
And the cleanup summary should report 1 sandbox removed
@@ -207,7 +207,7 @@ def step_gwtcb_commit_modified_diff(ctx: Context) -> None:
# Set sandbox to ACTIVE with valid worktree/branch
ctx.gwtcb_sandbox._status = SandboxStatus.ACTIVE
ctx.gwtcb_sandbox._worktree_path = repo_dir
ctx.gwtcb_sandbox._branch_name = "sandbox/test"
ctx.gwtcb_sandbox._branch_name = "cleveragents/plan-test"
ctx.gwtcb_sandbox._base_commit = "abc123"
ctx.gwtcb_sandbox._original_branch = "main"
@@ -284,7 +284,7 @@ def step_gwtcb_active_ready_commit(ctx: Context) -> None:
ctx.gwtcb_sandbox._status = SandboxStatus.ACTIVE
ctx.gwtcb_sandbox._worktree_path = repo_dir
ctx.gwtcb_sandbox._branch_name = "sandbox/test"
ctx.gwtcb_sandbox._branch_name = "cleveragents/plan-test"
ctx.gwtcb_sandbox._base_commit = "abc123"
ctx.gwtcb_sandbox._original_branch = "main"
@@ -436,7 +436,7 @@ def step_gwtcb_cleanup_worktree_exists(ctx: Context) -> None:
worktree_dir = tempfile.mkdtemp(prefix="gwtcb-worktree-")
ctx.gwtcb_sandbox._status = SandboxStatus.ACTIVE
ctx.gwtcb_sandbox._worktree_path = worktree_dir
ctx.gwtcb_sandbox._branch_name = "sandbox/cleanup-test"
ctx.gwtcb_sandbox._branch_name = "cleveragents/plan-cleanup-test"
@given("gwtcb _run_git is mocked to fail on worktree remove")
@@ -488,7 +488,7 @@ def step_gwtcb_cleanup_no_worktree_dir(ctx: Context) -> None:
# so the worktree removal block is skipped
ctx.gwtcb_sandbox._status = SandboxStatus.ACTIVE
ctx.gwtcb_sandbox._worktree_path = "/tmp/nonexistent-gwtcb-worktree"
ctx.gwtcb_sandbox._branch_name = "sandbox/branch-delete-fail"
ctx.gwtcb_sandbox._branch_name = "cleveragents/plan-branch-delete-fail"
@given("gwtcb _run_git is mocked to fail on branch delete")
@@ -168,7 +168,7 @@ class GitWorktreeSandbox:
def create(self, plan_id: str) -> SandboxContext:
"""Create a git worktree for isolated modifications.
Creates a new branch ``sandbox/<plan_id>`` and a worktree at a
Creates a new branch ``cleveragents/plan-<plan_id>`` and a worktree at a
temporary directory. The worktree starts from the current HEAD
of the repository.
@@ -226,7 +226,7 @@ class GitWorktreeSandbox:
# Create a sanitised branch name
safe_plan_id = _sanitise_branch_name(plan_id)
self._branch_name = f"sandbox/{safe_plan_id}"
self._branch_name = f"cleveragents/plan-{safe_plan_id}"
# Create a temporary directory for the worktree
self._worktree_path = tempfile.mkdtemp(prefix=f"ca-sandbox-{safe_plan_id}-")