UAT: GitWorktreeSandbox creates branch named sandbox/<plan_id> instead of spec-required cleveragents/plan-<plan_id> #2601

Closed
opened 2026-04-03 19:09:16 +00:00 by freemo · 7 comments
Owner

Bug Report

What Was Tested

GitWorktreeSandbox.create() branch naming in src/cleveragents/infrastructure/sandbox/git_worktree.py.

Expected Behavior (from spec)

The spec's agents plan execute output shows the sandbox branch should be named cleveragents/plan-<plan_id_prefix>:

╭─ Sandbox ──────────────────────────────────╮
│ Strategy: git_worktree                     │
│ Path: /repos/api/.worktrees/plan-01HXM8    │
│ Branch: cleveragents/plan-01HXM8C2         │
│ Status: active                             │
╰────────────────────────────────────────────╯

The branch name prefix cleveragents/ is the spec-defined namespace for all CleverAgents-managed git branches.

Actual Behavior

GitWorktreeSandbox.create() creates branches with the prefix sandbox/ instead of cleveragents/plan-:

# src/cleveragents/infrastructure/sandbox/git_worktree.py, line ~229
safe_plan_id = _sanitise_branch_name(plan_id)
self._branch_name = f"sandbox/{safe_plan_id}"  # Wrong prefix

This creates branches like sandbox/01HXM8C2ZK4Q7C2B3F2R4VYV6J instead of cleveragents/plan-01HXM8C2ZK4Q7C2B3F2R4VYV6J.

Code Location

src/cleveragents/infrastructure/sandbox/git_worktree.pycreate() method, line ~229.

Impact

  1. Namespace collision: The sandbox/ prefix is not a CleverAgents-reserved namespace. Other tools or users may create branches with the same prefix, causing conflicts.
  2. Discoverability: Users cannot easily identify CleverAgents-managed branches by looking at git branch -a output.
  3. Output mismatch: The agents plan execute output shows Branch: cleveragents/plan-... but the actual branch is sandbox/..., confusing users.
  4. Integration: Any tooling that looks for CleverAgents branches by the cleveragents/ prefix will not find sandbox branches.

Fix

Change the branch name format to match the spec:

# Use spec-required prefix: cleveragents/plan-<plan_id>
safe_plan_id = _sanitise_branch_name(plan_id)
self._branch_name = f"cleveragents/plan-{safe_plan_id}"

Also update the docstring comment on line ~171 which says `Creates a new branch ``sandbox/<plan_id>```.

Metadata

  • Commit message: fix(sandbox): use spec-required cleveragents/plan- branch prefix in GitWorktreeSandbox
  • Branch: fix/git-worktree-branch-naming
  • Parent Epic: #358 (Corrections + Subplans + Checkpoints M4)

Subtasks

  • Change branch name format from sandbox/<plan_id> to cleveragents/plan-<plan_id>
  • Update docstring in create() method
  • Update unit tests that assert the branch name format

Definition of Done

  • GitWorktreeSandbox creates branches named cleveragents/plan-<plan_id>
  • Branch name matches the spec's agents plan execute output
  • All existing tests updated to use the new branch name format

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-uat-tester

## Bug Report ### What Was Tested `GitWorktreeSandbox.create()` branch naming in `src/cleveragents/infrastructure/sandbox/git_worktree.py`. ### Expected Behavior (from spec) The spec's `agents plan execute` output shows the sandbox branch should be named `cleveragents/plan-<plan_id_prefix>`: ``` ╭─ Sandbox ──────────────────────────────────╮ │ Strategy: git_worktree │ │ Path: /repos/api/.worktrees/plan-01HXM8 │ │ Branch: cleveragents/plan-01HXM8C2 │ │ Status: active │ ╰────────────────────────────────────────────╯ ``` The branch name prefix `cleveragents/` is the spec-defined namespace for all CleverAgents-managed git branches. ### Actual Behavior `GitWorktreeSandbox.create()` creates branches with the prefix `sandbox/` instead of `cleveragents/plan-`: ```python # src/cleveragents/infrastructure/sandbox/git_worktree.py, line ~229 safe_plan_id = _sanitise_branch_name(plan_id) self._branch_name = f"sandbox/{safe_plan_id}" # Wrong prefix ``` This creates branches like `sandbox/01HXM8C2ZK4Q7C2B3F2R4VYV6J` instead of `cleveragents/plan-01HXM8C2ZK4Q7C2B3F2R4VYV6J`. ### Code Location `src/cleveragents/infrastructure/sandbox/git_worktree.py` — `create()` method, line ~229. ### Impact 1. **Namespace collision**: The `sandbox/` prefix is not a CleverAgents-reserved namespace. Other tools or users may create branches with the same prefix, causing conflicts. 2. **Discoverability**: Users cannot easily identify CleverAgents-managed branches by looking at `git branch -a` output. 3. **Output mismatch**: The `agents plan execute` output shows `Branch: cleveragents/plan-...` but the actual branch is `sandbox/...`, confusing users. 4. **Integration**: Any tooling that looks for CleverAgents branches by the `cleveragents/` prefix will not find sandbox branches. ### Fix Change the branch name format to match the spec: ```python # Use spec-required prefix: cleveragents/plan-<plan_id> safe_plan_id = _sanitise_branch_name(plan_id) self._branch_name = f"cleveragents/plan-{safe_plan_id}" ``` Also update the docstring comment on line ~171 which says `Creates a new branch ``sandbox/<plan_id>```. ### Metadata - **Commit message**: `fix(sandbox): use spec-required cleveragents/plan- branch prefix in GitWorktreeSandbox` - **Branch**: `fix/git-worktree-branch-naming` - **Parent Epic**: #358 (Corrections + Subplans + Checkpoints M4) ### Subtasks - [x] Change branch name format from `sandbox/<plan_id>` to `cleveragents/plan-<plan_id>` - [x] Update docstring in `create()` method - [x] Update unit tests that assert the branch name format ### Definition of Done - `GitWorktreeSandbox` creates branches named `cleveragents/plan-<plan_id>` - Branch name matches the spec's `agents plan execute` output - All existing tests updated to use the new branch name format --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium — spec compliance issue for branch naming; functional behavior is correct but naming convention is wrong
  • Milestone: v3.3.0 (assigned — this relates to Corrections + Subplans + Checkpoints)
  • MoSCoW: Should Have — the spec explicitly shows the branch prefix as cleveragents/plan-<plan_id>. Using sandbox/ instead creates namespace collision risk and breaks discoverability. This is a "SHOULD" level requirement.
  • Parent Epic: #358

Note: All development work is currently blocked by #2597 (CI quality gates broken on master). This issue will be ready for implementation once master is green.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium — spec compliance issue for branch naming; functional behavior is correct but naming convention is wrong - **Milestone**: v3.3.0 (assigned — this relates to Corrections + Subplans + Checkpoints) - **MoSCoW**: Should Have — the spec explicitly shows the branch prefix as `cleveragents/plan-<plan_id>`. Using `sandbox/` instead creates namespace collision risk and breaks discoverability. This is a "SHOULD" level requirement. - **Parent Epic**: #358 **Note:** All development work is currently blocked by #2597 (CI quality gates broken on master). This issue will be ready for implementation once master is green. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo added this to the v3.3.0 milestone 2026-04-04 15:18:25 +00:00
Author
Owner

Transition attempt: State/Verified -> State/In Progress for issue #2601.

Removed labels: State/Verified
Added labels: State/In Progress

Preconditions: Blocked label not present; no blocker to verify. All preconditions satisfied.


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-state-updater

Transition attempt: State/Verified -> State/In Progress for issue #2601. Removed labels: State/Verified Added labels: State/In Progress Preconditions: Blocked label not present; no blocker to verify. All preconditions satisfied. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-state-updater
Author
Owner

Starting implementation on branch fix/git-worktree-branch-naming.

Plan:

  • Fix branch naming in GitWorktreeSandbox.create(): sandbox/<plan_id>cleveragents/plan-<plan_id>
  • Update docstring in create() method
  • Update unit tests that assert the branch name format

Difficulty assessment: Low → starting at sonnet tier.


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

Starting implementation on branch `fix/git-worktree-branch-naming`. **Plan:** - Fix branch naming in `GitWorktreeSandbox.create()`: `sandbox/<plan_id>` → `cleveragents/plan-<plan_id>` - Update docstring in `create()` method - Update unit tests that assert the branch name format Difficulty assessment: Low → starting at sonnet tier. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

All subtasks complete. Quality gates passed. PR #3263 created on branch fix/git-worktree-branch-naming.

Implementation summary:

  • Changed branch name format from sandbox/<plan_id> to cleveragents/plan-<plan_id> in GitWorktreeSandbox.create()
  • Updated docstring in create() method
  • Updated unit tests that assert the branch name format (4 fixtures in coverage boost steps + 1 in garbage_collection.feature)

Quality gates:

  • lint: PASSED
  • typecheck: PASSED (0 errors, 0 warnings)

PR review and merge handled by continuous review stream.


Automated by CleverAgents Bot
Supervisor: Implementation | Agent: ca-issue-worker

All subtasks complete. Quality gates passed. PR #3263 created on branch `fix/git-worktree-branch-naming`. **Implementation summary:** - ✅ Changed branch name format from `sandbox/<plan_id>` to `cleveragents/plan-<plan_id>` in `GitWorktreeSandbox.create()` - ✅ Updated docstring in `create()` method - ✅ Updated unit tests that assert the branch name format (4 fixtures in coverage boost steps + 1 in garbage_collection.feature) **Quality gates:** - lint: PASSED - typecheck: PASSED (0 errors, 0 warnings) PR review and merge handled by continuous review stream. --- **Automated by CleverAgents Bot** Supervisor: Implementation | Agent: ca-issue-worker
Author
Owner

PR #3263 reviewed, approved, and scheduled to merge when all CI checks complete. All core checks (lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, build) have passed. Remaining checks (coverage, benchmark, docker, status-check) are pending.

The fix correctly aligns GitWorktreeSandbox.create() branch naming from sandbox/<plan_id> to the spec-required cleveragents/plan-<plan_id> format.


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

PR #3263 reviewed, approved, and scheduled to merge when all CI checks complete. All core checks (lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, build) have passed. Remaining checks (coverage, benchmark, docker, status-check) are pending. The fix correctly aligns `GitWorktreeSandbox.create()` branch naming from `sandbox/<plan_id>` to the spec-required `cleveragents/plan-<plan_id>` format. --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
Author
Owner

Issue transitioned to State/Completed and closed. PR #3263 has been scheduled to merge when all CI checks pass (core checks already passing: lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, build, helm).


Automated by CleverAgents Bot
Supervisor: PR Review | Agent: ca-pr-self-reviewer

Issue transitioned to `State/Completed` and closed. PR #3263 has been scheduled to merge when all CI checks pass (core checks already passing: lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, build, helm). --- **Automated by CleverAgents Bot** Supervisor: PR Review | Agent: ca-pr-self-reviewer
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Blocks
Reference
cleveragents/cleveragents-core#2601
No description provided.