6530104dd0
- Rewrote production CLI to use real ContextTierService (get_scoped_view, get_all_fragments, evict_lru) instead of non-existent ACMSService - Removed unused imports (Path, Panel, ScopedView) from production code - Fixed all lint issues: trailing whitespace, import ordering, nested with statements - Replaced typer.Abort() with typer.Exit(code=1) for error exits - Added input validation for empty/whitespace view parameter - Fixed error handling to use str(e) instead of e.message - Added guards against negative budget values in _format_budget_utilization - Added warning when clearing context with no filters (clear ALL) - Removed module-level console side effect - Moved mocks to features/mocks/acms_context_mocks.py per CONTRIBUTING.md - Fixed test assertions to capture real CLI output (not placeholder) - Fixed duplicate step definitions (AmbiguousStep errors) - Fixed feature file step mismatch for tier count parameter - Added Robot Framework integration tests in robot/acms_context_cli.robot - Added performance benchmarks in benchmarks/acms_context_cli_bench.py - Updated CHANGELOG.md with ACMS context CLI feature entry - Updated CONTRIBUTORS.md with ACMS context CLI contribution ISSUES CLOSED: #9586
66 lines
2.7 KiB
Gherkin
66 lines
2.7 KiB
Gherkin
Feature: ACMS Context CLI Commands
|
|
As a user
|
|
I want to view and manage ACMS context
|
|
So that I can inspect assembled context and remove stale entries
|
|
|
|
Background:
|
|
Given the ACMS service is initialized
|
|
And a test view "test_view" exists
|
|
|
|
Scenario: Show assembled context for a view
|
|
When I run "agents acms context show test_view"
|
|
Then the output should contain "Assembled Context for View: test_view"
|
|
And the output should contain "Total Tokens"
|
|
And the output should contain "Budget Utilization"
|
|
|
|
Scenario: Show context with no entries
|
|
Given the view "empty_view" has no context entries
|
|
When I run "agents acms context show empty_view"
|
|
Then the output should contain "No context found for view: empty_view"
|
|
|
|
Scenario: Clear context entries with confirmation
|
|
Given the view "test_view" has 5 context entries
|
|
When I run "agents acms context clear" and confirm
|
|
Then the output should contain "Removed 5 context entries"
|
|
|
|
Scenario: Clear context entries with --yes flag
|
|
Given the view "test_view" has 5 context entries
|
|
When I run "agents acms context clear --yes"
|
|
Then the output should contain "Removed 5 context entries"
|
|
And no confirmation prompt should be shown
|
|
|
|
Scenario: Clear context entries by path filter
|
|
Given the view "test_view" has 5 context entries
|
|
And 3 entries match the path pattern "src/*"
|
|
When I run "agents acms context clear --path src/* --yes"
|
|
Then the output should contain "context entries"
|
|
|
|
Scenario: Clear context entries by tag filter
|
|
Given the view "test_view" has 5 context entries
|
|
And 2 entries have the tag "deprecated"
|
|
When I run "agents acms context clear --tag deprecated --yes"
|
|
Then the output should contain "context entries"
|
|
|
|
Scenario: Clear context entries by tier filter
|
|
Given the view "test_view" has 5 context entries
|
|
And 2 entries are in tier "hot"
|
|
When I run "agents acms context clear --tier hot --yes"
|
|
Then the output should contain "context entries"
|
|
|
|
Scenario: Clear context with no matching entries
|
|
Given the view "test_view" has 5 context entries
|
|
When I run "agents acms context clear --path nonexistent/* --yes"
|
|
Then the output should contain "No context entries match"
|
|
|
|
Scenario: Show help for context show command
|
|
When I run "agents acms context show" with help flag
|
|
Then the output should contain "Display the assembled context"
|
|
And the output should contain "project view"
|
|
|
|
Scenario: Show help for context clear command
|
|
When I run "agents acms context clear" with help flag
|
|
Then the output should contain "Remove stale context entries"
|
|
And the output should contain "path"
|
|
And the output should contain "tag"
|
|
And the output should contain "tier"
|