cc24d8c8ac
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
63 lines
2.9 KiB
Gherkin
63 lines
2.9 KiB
Gherkin
Feature: Plan CLI helper function branch coverage for legacy removal
|
|
As a developer
|
|
I want to cover remaining uncovered branches in plan.py helper functions
|
|
So that coverage for plan.py improves after the legacy removal changes
|
|
|
|
Background:
|
|
Given the plan branch coverage helpers are initialized
|
|
|
|
# ── _format_relative_time: naive datetime normalization (line 150) ────────
|
|
|
|
Scenario: _format_relative_time normalizes naive datetime to UTC for 2h
|
|
Given a plan-br naive datetime 2 hours in the past
|
|
When I call _format_relative_time on it
|
|
Then the plan-br relative time should contain "2 hours"
|
|
|
|
# ── _format_relative_time: future timestamp guard (line 156) ──────────────
|
|
|
|
Scenario: _format_relative_time returns just now for future timestamp
|
|
Given a plan-br naive datetime 10 minutes in the future
|
|
When I call _format_relative_time on it
|
|
Then the plan-br relative time should be "just now"
|
|
|
|
# ── _format_relative_time: singular forms ─────────────────────────────────
|
|
|
|
Scenario: _format_relative_time returns singular "1 minute ago"
|
|
Given a plan-br naive datetime 1 minute in the past
|
|
When I call _format_relative_time on it
|
|
Then the plan-br relative time should be "1 minute ago"
|
|
|
|
Scenario: _format_relative_time returns singular "1 hour ago"
|
|
Given a plan-br naive datetime 1 hour in the past
|
|
When I call _format_relative_time on it
|
|
Then the plan-br relative time should be "1 hour ago"
|
|
|
|
Scenario: _format_relative_time returns singular "1 day ago"
|
|
Given a plan-br naive datetime 1 day in the past
|
|
When I call _format_relative_time on it
|
|
Then the plan-br relative time should be "1 day ago"
|
|
|
|
# ── _format_relative_time: plural forms ───────────────────────────────────
|
|
|
|
Scenario: _format_relative_time returns plural "2 minutes ago"
|
|
Given a plan-br naive datetime 2 minutes in the past
|
|
When I call _format_relative_time on it
|
|
Then the plan-br relative time should be "2 minutes ago"
|
|
|
|
Scenario: _format_relative_time returns plural "2 hours ago"
|
|
Given a plan-br naive datetime 2 hours in the past
|
|
When I call _format_relative_time on it
|
|
Then the plan-br relative time should be "2 hours ago"
|
|
|
|
Scenario: _format_relative_time returns plural "2 days ago"
|
|
Given a plan-br naive datetime 2 days in the past
|
|
When I call _format_relative_time on it
|
|
Then the plan-br relative time should be "2 days ago"
|
|
|
|
# ── _format_relative_time: seconds boundary ───────────────────────────────
|
|
|
|
Scenario: _format_relative_time returns just now for 30 seconds ago
|
|
Given a plan-br naive datetime 30 seconds in the past
|
|
When I call _format_relative_time on it
|
|
Then the plan-br relative time should be "just now"
|