Files
cleveragents-core/features/validation_list_command.feature
T
HAL9000 f22462ccc5
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Failing after 1m14s
CI / push-validation (pull_request) Successful in 48s
CI / helm (pull_request) Successful in 50s
CI / lint (pull_request) Successful in 1m38s
CI / build (pull_request) Successful in 1m18s
CI / typecheck (pull_request) Successful in 2m10s
CI / quality (pull_request) Successful in 2m15s
CI / security (pull_request) Successful in 2m48s
CI / e2e_tests (pull_request) Successful in 5m19s
CI / integration_tests (pull_request) Failing after 7m12s
CI / unit_tests (pull_request) Failing after 8m27s
CI / coverage (pull_request) Has been skipped
CI / docker (pull_request) Has been skipped
CI / status-check (pull_request) Failing after 4s
fix(cli): add agents validation list command to validation CLI
Add the `list` subcommand to the validation CLI command group. This fixes issue #8621 where users were unable to list registered validations through the CLI interface due to the command not being implemented and registered.

Changes:
- Added `list` command with --namespace/-n, --source/-s, and --pattern/-p (regex) filters for listing validation agents
- Extracted shared helper functions into new validation_helpers.py module
- Updated imports in validation.py to use extracted helpers instead of inline private functions
- Fixed lint and formatting issues

Testing:
- Added BDD regression test feature file (features/validation_list_command.feature) with 7 scenarios covering: empty state, rich table display, namespace/source/pattern filtering, JSON output, and YAML output modes
- Added corresponding step definitions in features/steps/validation_list_command_steps.py

ISSUES CLOSED: #8621
2026-05-08 22:57:03 +00:00

49 lines
2.2 KiB
Gherkin

Feature: Validation list command
As a CleverAgents user
I want to list all registered validations through the CLI
So that I can inspect my validation configurations
@tdd_issue_8621
Scenario: List validations shows empty state with no registrations
Given a validation list command runner
When I run the validation list command with no registered validations
Then the output should contain "No validations found"
And the output should contain "Register one with 'agents validation add --config <file>'"
@tdd_issue_8621
Scenario: List validations displays all registrations in rich table format
Given a tool registry with registered validation tools
When I run the validation list command
Then the output should display a rich table
And the table should contain column headers "Name", "Mode", "Source", "Description"
@tdd_issue_8621
Scenario: List validations filters by namespace
Given a tool registry with namespaced validation tools
When I run the validation list command with namespace filter "local"
Then the output should only include validations matching namespace "local"
@tdd_issue_8621
Scenario: List validations filters by source
Given a tool registry with different sourced validation tools
When I run the validation list command with source filter "custom"
Then the output should only include validations from source "custom"
@tdd_issue_8621
Scenario: List validations filters by regex pattern
Given a tool registry with numbered validation tools
When I run the validation list command with pattern "coverage.*"
Then the output should only include matching validation names
@tdd_issue_8621
Scenario: List validations outputs JSON format
Given a tool registry with registered validation tools
When I run the validation list command with format "json"
Then the output should be valid JSON containing the registered validations
@tdd_issue_8621
Scenario: List validations outputs YAML format
Given a tool registry with registered validation tools
When I run the validation list command with format "yaml"
Then the output should be valid YAML containing the registered validations