Files
cleveragents-core/features/cli_coverage.feature
T
HAL9000 f808abff86 chore(ci): fix pre-commit hook failures
Fix JSON syntax errors in .devcontainer/devcontainer.json (removed
invalid JS-style // comments) and .devcontainer/opencode.json (removed
90+ trailing commas). Apply auto-fixes for end-of-file and trailing
whitespace issues across 100+ files. Fix SIM105 ruff violations in
benchmarks/core_circuit_breaker_bench.py (use contextlib.suppress).

Note: The security fix from issue #7478 (validate_path startswith bypass)
was already delivered to master in commit e18ac5f2. This PR as currently
structured is non-atomic (35 commits across 10+ issues) and needs
significant restructure before merge. This commit only addresses the
CI/pre-commit failures.

ISSUES CLOSED: #7478
2026-06-14 09:51:14 -04:00

51 lines
1.7 KiB
Gherkin

@cli
Feature: CLI Main Coverage
As a developer
I want to ensure the CLI main module is properly tested
So that I have confidence in the application's entry points
Scenario: CLI commands execute successfully
When I run shell command "cleveragents --version"
Then the shell command should succeed
And the shell output should contain "1.0.0"
Scenario: CLI help displays correctly
When I call the main function directly with "--help"
Then it should return 0
Scenario: CLI info command runs
When I call the main function directly with "info"
Then it should return 0
Scenario: CLI diagnostics command runs
When I call the main function directly with "diagnostics"
Then it should return 0
Scenario: Invalid command returns error
When I call the main function directly with "invalid-command"
Then it should return 2
Scenario: Direct main function call with no args
When I call the main function directly with no args
Then it should return 0
Scenario: Direct main function call with version
When I call the main function directly with "--version"
Then it should return 0
Scenario: Direct main function call with help
When I call the main function directly with "--help"
Then it should return 0
Scenario: Direct main function call with bad command
When I call the main function directly with "bad-command"
Then it should return 2
Scenario: CLI handles keyboard interrupt
When I run a command that gets interrupted
Then it should handle the KeyboardInterrupt gracefully
Scenario: CLI handles system exit
When I run a command that calls sys.exit(1)
Then it should propagate the exit code correctly