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
78 lines
2.7 KiB
Plaintext
78 lines
2.7 KiB
Plaintext
*** Settings ***
|
|
Documentation Actor-first context management tests for CleverAgents CLI
|
|
Library Process
|
|
Library OperatingSystem
|
|
Library String
|
|
Library DateTime
|
|
Resource ${CURDIR}/common.resource
|
|
Suite Setup Setup Test Environment
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Variables ***
|
|
${TEST_PROJECT_DIR} ${TEMPDIR}/test_project_${EMPTY}
|
|
${UNIQUE_ID} ${EMPTY}
|
|
|
|
*** Test Cases ***
|
|
Test Context Commands With Actor
|
|
[Documentation] Verify context commands work with actor-first approach
|
|
|
|
# Initialize project first
|
|
Create Directory ${TEST_PROJECT_DIR}
|
|
${result} = Run Process ${PYTHON} -m cleveragents init test-project
|
|
... cwd=${TEST_PROJECT_DIR}
|
|
Log Init stdout: ${result.stdout}
|
|
Log Init stderr: ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
|
|
# Create test files
|
|
Create Directory ${TEST_PROJECT_DIR}/src
|
|
Create File ${TEST_PROJECT_DIR}/src/main.py print("Hello World")
|
|
|
|
# Load context with actor (simulating with environment variable)
|
|
Set Environment Variable CLEVERAGENTS_TESTING_USE_MOCK_AI true
|
|
Set Environment Variable CLEVERAGENTS_DEFAULT_ACTOR openai/gpt-4
|
|
|
|
${result} = Run Process ${PYTHON} -m cleveragents context-load src/
|
|
... cwd=${TEST_PROJECT_DIR}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
|
|
# List contexts
|
|
${result} = Run Process ${PYTHON} -m cleveragents context list
|
|
... cwd=${TEST_PROJECT_DIR}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} main.py
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*** Keywords ***
|
|
Setup Test Environment
|
|
[Documentation] Create test environment
|
|
# First run the common setup
|
|
common.Setup Test Environment
|
|
|
|
${timestamp} = Get Current Date result_format=%Y%m%d%H%M%S
|
|
${random} = Generate Random String 6 [NUMBERS]
|
|
Set Suite Variable ${UNIQUE_ID} ${timestamp}_${random}
|
|
|
|
# Create temp directory
|
|
${temp} = Evaluate tempfile.mkdtemp() modules=tempfile
|
|
Set Suite Variable ${TEMP} ${temp}
|
|
Create Directory ${TEMP}
|
|
|
|
# Update TEST_PROJECT_DIR with unique ID
|
|
Set Suite Variable ${TEST_PROJECT_DIR} ${TEMP}/test_project_${UNIQUE_ID}
|
|
|
|
Log Test environment created with ID: ${UNIQUE_ID}
|
|
|
|
Cleanup Test Environment
|
|
[Documentation] Clean up test environment
|
|
Run Keyword If '${TEMP}' != '${EMPTY}' Remove Directory ${TEMP} recursive=True
|
|
Remove Environment Variable CLEVERAGENTS_TESTING_USE_MOCK_AI
|
|
Remove Environment Variable CLEVERAGENTS_DEFAULT_ACTOR
|