feat(sandbox): add git_worktree and copy_on_write sandbox strategies #271

Closed
opened 2026-02-22 23:40:45 +00:00 by freemo · 1 comment
Owner

Metadata

  • Commit: feat(sandbox): add git_worktree and copy_on_write sandbox strategies
  • Branch: feature/m1-sandbox-git-worktree

Subtasks

  • Implement GitWorktreeSandbox + CopyOnWriteSandbox and wire into SandboxFactory.
  • Tests (Behave): Add sandbox lifecycle + isolation scenarios for git_worktree/copy_on_write.
  • Run nox and ensure sandbox suites pass.

Section: ### Section 4: Projects & Resources [WORKSTREAM B - Hamza Lead]
Status: Completed

## Metadata - **Commit**: `feat(sandbox): add git_worktree and copy_on_write sandbox strategies` - **Branch**: `feature/m1-sandbox-git-worktree` ## Subtasks - [x] Implement `GitWorktreeSandbox` + `CopyOnWriteSandbox` and wire into `SandboxFactory`. - [x] Tests (Behave): Add sandbox lifecycle + isolation scenarios for git_worktree/copy_on_write. - [x] Run `nox` and ensure sandbox suites pass. **Section**: ### Section 4: Projects & Resources [WORKSTREAM B - Hamza Lead] **Status**: Completed
freemo added this to the v3.0.0 milestone 2026-02-22 23:40:45 +00:00
Author
Owner

Implementation Notes — Sandbox Infrastructure

2026-02-09: Stage B3.1 + B3.2 + B3.5 + B3.6 + B3.7 + B3.8 Complete - Sandbox Infrastructure

  • Created src/cleveragents/infrastructure/sandbox/ package with 6 modules: protocol.py, no_sandbox.py, factory.py, manager.py, merge.py, __init__.py.
  • Design decisions:
    • Factory accepts raw strings rather than Resource objects (Resource model not yet implemented). This decouples the sandbox layer from the domain model.
    • SandboxStatus.assert_transition() provides a convenient guard that raises SandboxStateError on invalid transitions.
    • NoSandbox.rollback() always raises SandboxRollbackError rather than being a no-op, because silently swallowing rollback requests for unsandboxed resources would hide bugs.

(Migrated from docs/implementation-notes.md)

## Implementation Notes — Sandbox Infrastructure **2026-02-09**: Stage B3.1 + B3.2 + B3.5 + B3.6 + B3.7 + B3.8 Complete - Sandbox Infrastructure - Created `src/cleveragents/infrastructure/sandbox/` package with 6 modules: `protocol.py`, `no_sandbox.py`, `factory.py`, `manager.py`, `merge.py`, `__init__.py`. - Design decisions: - Factory accepts raw strings rather than Resource objects (Resource model not yet implemented). This decouples the sandbox layer from the domain model. - `SandboxStatus.assert_transition()` provides a convenient guard that raises `SandboxStateError` on invalid transitions. - `NoSandbox.rollback()` always raises `SandboxRollbackError` rather than being a no-op, because silently swallowing rollback requests for unsandboxed resources would hide bugs. *(Migrated from `docs/implementation-notes.md`)*
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.

Reference
cleveragents/cleveragents-core#271
No description provided.