fix(cli): remove legacy plan commands from help output
Completely removed all legacy plan commands from the CLI:
- Removed tell, build, new, current, cd, continue CLI commands
- Removed programmatic wrapper functions (tell_command, build_command, etc.)
- Removed legacy deprecation message
- Updated help text to indicate V3 Plan Lifecycle exclusively
- Removed stale references to tell/build in help output and command validation
Removes the legacy 'tell' and 'build' CLI shortcuts from main.py:
- Removed echo lines advertising tell/build commands
- Removed tell/build from valid_cmds list
- Removed tell/build from _LIGHTWEIGHT_COMMANDS frozenset
- These dead entries were preventing helpful error messages
Test infrastructure improvements:
- Event bus exception test: Patch the module-level logger during emit() so that
structlog.testing.capture_logs() can capture the logs. Without patching, the
module-level logger created at import time is not captured by the context manager.
- Session create/list commands: Suppress cleveragents.mcp logger to CRITICAL level
during JSON/YAML output formatting to prevent health check warnings with ANSI codes
from being written to stdout before JSON output, which breaks JSON parsing.
- Extended plan_cli_coverage_boost with scenarios for estimation_result,
invariants, execution_environment, validation_summary, and checkpoint
coverage in _plan_spec_dict
Documentation:
- Created docs/Legacy_to_V3_Guide.md with comprehensive migration instructions
- Updated CONTRIBUTING.md to document removal of legacy workflow
- Updated CHANGELOG.md to reference issue #4181 instead of PR #10800
ISSUES CLOSED: #4181
This commit is contained in:
@@ -102,7 +102,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
Then the command should exit with code 0
|
||||
And the output should contain "Could not generate fix"
|
||||
|
||||
# Edge case: Long error message truncation
|
||||
Scenario: Auto debug run command truncates long error messages
|
||||
Given I have an initialized project for auto_debug
|
||||
And the build will always fail with error "This is a very long error message that exceeds eighty characters and should be truncated in the display output"
|
||||
@@ -111,7 +110,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
And the output should contain "..."
|
||||
And the output should contain "Build failed after"
|
||||
|
||||
# Edge case: Minimum max_attempts boundary
|
||||
Scenario: Auto debug run command with minimum max_attempts of 1
|
||||
Given I have an initialized project for auto_debug
|
||||
And the build will always fail with error "Single attempt failure"
|
||||
@@ -120,7 +118,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
And the output should contain "Attempt 1/1"
|
||||
And the output should contain "Build failed after 1 attempt"
|
||||
|
||||
# Edge case: Multiple sequential failures before success
|
||||
Scenario: Auto debug run command succeeds after multiple failures
|
||||
Given I have an initialized project for auto_debug
|
||||
And the build will fail 2 times then succeed with 3 changes
|
||||
@@ -130,7 +127,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
And the output should contain "Build successful"
|
||||
And the output should contain "Generated 3 change(s)"
|
||||
|
||||
# Edge case: Short error message (no truncation)
|
||||
Scenario: Auto debug run command shows short error without truncation
|
||||
Given I have an initialized project for auto_debug
|
||||
And the build will always fail with error "Short error"
|
||||
@@ -139,7 +135,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
And the output should contain "Short error"
|
||||
And the output should not contain "Short error..."
|
||||
|
||||
# Edge case: PlanError re-raised from within build loop
|
||||
Scenario: Auto debug run command re-raises PlanError from build
|
||||
Given I have an initialized project for auto_debug
|
||||
And the build will raise PlanError after one attempt
|
||||
@@ -147,7 +142,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
Then the command should be aborted
|
||||
And the output should contain "Plan Error"
|
||||
|
||||
# Edge case: CleverAgentsError re-raised from within build loop
|
||||
Scenario: Auto debug run command re-raises CleverAgentsError from build
|
||||
Given I have an initialized project for auto_debug
|
||||
And the build will raise CleverAgentsError after one attempt
|
||||
@@ -155,7 +149,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
Then the command should be aborted
|
||||
And the output should contain "Error:"
|
||||
|
||||
# Edge case: auto_debug_command with custom max_attempts
|
||||
Scenario: Auto debug command with custom max_attempts of 5
|
||||
Given I have an initialized project for auto_debug
|
||||
And the plan service auto_debug_build will fail
|
||||
@@ -163,7 +156,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
Then the auto_debug_command should return success False
|
||||
And the attempts made should be 5
|
||||
|
||||
# Edge case: auto_debug_command with max_attempts of 1
|
||||
Scenario: Auto debug command with minimum max_attempts of 1
|
||||
Given I have an initialized project for auto_debug
|
||||
And the plan service auto_debug_build will fail
|
||||
@@ -171,7 +163,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
Then the auto_debug_command should return success False
|
||||
And the attempts made should be 1
|
||||
|
||||
# Edge case: Successful build on exact last attempt
|
||||
Scenario: Auto debug run command succeeds on the last attempt
|
||||
Given I have an initialized project for auto_debug
|
||||
And the build will fail 2 times then succeed with 1 changes
|
||||
@@ -179,7 +170,6 @@ Feature: Auto Debug CLI Command Coverage
|
||||
Then the command should exit with code 0
|
||||
And the output should contain "Build succeeded after 3 attempt"
|
||||
|
||||
# Edge case: Multiple PlanError details
|
||||
Scenario: Auto debug run command handles PlanError with multiple details
|
||||
Given I have an initialized project for auto_debug
|
||||
And the plan service will raise a PlanError with multiple details
|
||||
|
||||
Reference in New Issue
Block a user