Files
cleveragents-core/features/git_worktree_class_methods.feature
T
HAL9000 c87a706bf1
CI / lint (pull_request) Failing after 1m14s
CI / quality (pull_request) Successful in 1m41s
CI / typecheck (pull_request) Successful in 1m46s
CI / security (pull_request) Successful in 2m25s
CI / coverage (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 30s
CI / helm (pull_request) Successful in 33s
CI / build (pull_request) Successful in 49s
CI / e2e_tests (pull_request) Successful in 4m5s
CI / integration_tests (pull_request) Successful in 7m46s
CI / unit_tests (pull_request) Failing after 9m50s
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 6s
fix(cli): resolve typecheck failures and add missing infrastructure methods
Add GitWorktreeSandbox.cleanup_stale() and diff_against_head() class
methods, create strategy_actor module with resolve_strategy_actor(),
add PlanApplyService.correction_diff() method, and fix _get_apply_service()
and _get_plan_executor() to use correct API signatures.

Add Behave BDD unit tests and Robot Framework integration tests for all
new functionality.

ISSUES CLOSED: #8628
2026-05-05 05:18:02 +00:00

42 lines
2.0 KiB
Gherkin

Feature: GitWorktreeSandbox class methods for stale cleanup and diff
As a developer
I want class-level helpers to clean up stale worktrees and generate diffs
So that the CLI can manage sandbox lifecycle without a sandbox instance
Background:
Given a gwt_cm test git repository is initialised
Scenario: cleanup_stale removes a stale worktree branch
Given a gwt_cm stale worktree branch exists for plan "plan-stale-001"
When I call GitWorktreeSandbox.cleanup_stale for plan "plan-stale-001"
Then the gwt_cm stale branch should no longer exist
Scenario: cleanup_stale is idempotent when no stale branch exists
When I call GitWorktreeSandbox.cleanup_stale for plan "plan-nonexistent-999"
Then no gwt_cm exception should have been raised
Scenario: cleanup_stale handles empty plan_id gracefully
When I call GitWorktreeSandbox.cleanup_stale with empty plan_id
Then no gwt_cm exception should have been raised
Scenario: cleanup_stale handles empty original_path gracefully
When I call GitWorktreeSandbox.cleanup_stale with empty original_path
Then no gwt_cm exception should have been raised
Scenario: diff_against_head returns None when no worktree branch exists
When I call GitWorktreeSandbox.diff_against_head for plan "plan-no-branch-001"
Then the gwt_cm diff result should be None
Scenario: diff_against_head returns diff when worktree branch has changes
Given a gwt_cm worktree branch with changes exists for plan "plan-diff-001"
When I call GitWorktreeSandbox.diff_against_head for plan "plan-diff-001"
Then the gwt_cm diff result should not be None
Scenario: diff_against_head handles empty plan_id gracefully
When I call GitWorktreeSandbox.diff_against_head with empty plan_id
Then the gwt_cm diff result should be None
Scenario: diff_against_head handles empty original_path gracefully
When I call GitWorktreeSandbox.diff_against_head with empty original_path
Then the gwt_cm diff result should be None