Files
cleveragents-core/features/sandbox_create_for_plan.feature
HAL9000 cffd6d3923 fix(agent-evolution-pool-supervisor): Add BDD coverage for _create_sandbox_for_plan and _cleanup_sandbox_for_plan
Adds sandbox_create_for_plan.feature and sandbox_create_for_plan_steps.py
to cover the simplified _create_sandbox_for_plan (git worktree and flat
fallback paths) and the _cleanup_sandbox_for_plan cleanup_stale=False path
that were left uncovered after the multi_project_sandbox.feature deletion.
All lint and typecheck gates pass.
2026-05-03 00:17:15 +00:00

29 lines
1.3 KiB
Gherkin

@sandbox-create-for-plan
Feature: _create_sandbox_for_plan creates git worktree or flat sandbox (#7888)
Verifies that _create_sandbox_for_plan returns a git worktree sandbox
for git-checkout resources and falls back to a flat directory when no
git resource is found.
@mock_only
Scenario: Single git-checkout resource creates a worktree sandbox for scfp
Given a temp git project for scfp
And a mocked plan service linking the git project for scfp
When I call _create_sandbox_for_plan for scfp
Then the sandbox root should be a directory for scfp
And the sandbox object should not be None for scfp
And the sandbox root should differ from the project path for scfp
@mock_only
Scenario: No linked resources falls back to flat sandbox for scfp
Given a mocked plan service with no linked resources for scfp
When I call _create_sandbox_for_plan for scfp
Then the sandbox root should be a directory for scfp
And the sandbox object should be None for scfp
@mock_only
Scenario: _cleanup_sandbox_for_plan skips when cleanup_stale returns False for scfp
Given a temp git project without a worktree for scfp
And a mocked plan service linking the git project for scfp
When I call _cleanup_sandbox_for_plan with no stale branch for scfp
Then the cleanup call should complete without error for scfp