d98666651f
CI / lint (pull_request) Successful in 15s
CI / typecheck (pull_request) Successful in 27s
CI / security (pull_request) Successful in 22s
CI / quality (pull_request) Successful in 15s
CI / integration_tests (pull_request) Successful in 4m24s
CI / build (pull_request) Successful in 16s
CI / unit_tests (pull_request) Successful in 9m27s
CI / lint (push) Waiting to run
CI / typecheck (push) Waiting to run
CI / security (push) Waiting to run
CI / quality (push) Waiting to run
CI / unit_tests (push) Waiting to run
CI / integration_tests (push) Waiting to run
CI / coverage (push) Blocked by required conditions
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
CI / coverage (pull_request) Successful in 6m55s
CI / docker (pull_request) Successful in 39s
- Enforce config-only 'action create --config <file>' (remove legacy inline flags: --name, --strategy-actor, --execution-actor, --definition-of-done, --arg) - Load config via ActionConfigSchema.from_yaml_file() then Action.from_config() with clear validation error surfacing - Remove 'action available' subcommand (no draft state; actions are available by default) - Add REGEX positional arg to 'action list' for name filtering - Add Short Name and Definition of Done summary to all CLI outputs - Add 'action list --namespace/-n' and '--state/-s' filters - Update existing tests to match new config-only create flow - Add features/action_cli_spec_alignment.feature (19 scenarios) - Add robot/action_cli_spec.robot smoke tests - Add benchmarks/action_cli_bench.py ASV benchmarks - Add docs/reference/action_cli.md
120 lines
5.3 KiB
Gherkin
120 lines
5.3 KiB
Gherkin
Feature: Action CLI spec alignment
|
|
As a developer
|
|
I want the action CLI commands aligned to the v3 spec
|
|
So that actions are created via config-only and legacy flags are rejected
|
|
|
|
Background:
|
|
Given a spec alignment CLI runner
|
|
And a spec alignment mocked lifecycle service
|
|
|
|
# Config-only create (valid YAML creates action)
|
|
Scenario: Config-only create with valid YAML creates action
|
|
Given a spec alignment valid config file
|
|
When I run spec alignment create with --config
|
|
Then the spec alignment create should succeed
|
|
And the spec alignment output should contain "Action Created"
|
|
And the spec alignment output should contain "Namespaced Name"
|
|
And the spec alignment output should contain "Short Name"
|
|
And the spec alignment output should contain "State"
|
|
|
|
# Legacy flag rejection
|
|
Scenario: Legacy --name flag is rejected
|
|
When I run spec alignment create with legacy flag "--name" "local/test"
|
|
Then the spec alignment command should fail with unrecognized option
|
|
|
|
Scenario: Legacy --strategy-actor flag is rejected
|
|
When I run spec alignment create with legacy flag "--strategy-actor" "openai/gpt-4"
|
|
Then the spec alignment command should fail with unrecognized option
|
|
|
|
Scenario: Legacy --execution-actor flag is rejected
|
|
When I run spec alignment create with legacy flag "--execution-actor" "openai/gpt-4"
|
|
Then the spec alignment command should fail with unrecognized option
|
|
|
|
Scenario: Legacy --definition-of-done flag is rejected
|
|
When I run spec alignment create with legacy flag "--definition-of-done" "Test passes"
|
|
Then the spec alignment command should fail with unrecognized option
|
|
|
|
Scenario: Legacy --arg flag is rejected
|
|
When I run spec alignment create with legacy flag "--arg" "x:string:required"
|
|
Then the spec alignment command should fail with unrecognized option
|
|
|
|
# List filters
|
|
Scenario: List with --namespace filter
|
|
Given spec alignment actions exist
|
|
When I run spec alignment list with namespace "local"
|
|
Then the spec alignment list should show filtered results
|
|
And the spec alignment service list should use namespace "local"
|
|
|
|
Scenario: List with --state filter
|
|
Given spec alignment actions exist
|
|
When I run spec alignment list with state "available"
|
|
Then the spec alignment list should succeed
|
|
|
|
Scenario: List with regex filter
|
|
Given spec alignment actions exist
|
|
When I run spec alignment list with regex "action-a"
|
|
Then the spec alignment list should show filtered results
|
|
|
|
Scenario: List with invalid regex pattern
|
|
Given spec alignment actions exist
|
|
When I run spec alignment list with regex "[invalid"
|
|
Then the spec alignment command should abort
|
|
|
|
# Show by namespaced name
|
|
Scenario: Show by namespaced name
|
|
Given a spec alignment action exists with name "local/my-action"
|
|
When I run spec alignment show with name "local/my-action"
|
|
Then the spec alignment show should display details
|
|
And the spec alignment output should contain "Namespaced Name"
|
|
And the spec alignment output should contain "Short Name"
|
|
And the spec alignment output should contain "Definition of Done"
|
|
|
|
# Archive by namespaced name
|
|
Scenario: Archive by namespaced name
|
|
Given a spec alignment action exists for archive "local/my-action"
|
|
When I run spec alignment archive with name "local/my-action"
|
|
Then the spec alignment archive should succeed
|
|
|
|
# Invalid config file errors
|
|
Scenario: Missing config file produces error
|
|
When I run spec alignment create with missing config
|
|
Then the spec alignment command should abort
|
|
And the spec alignment output should contain "Config file error"
|
|
|
|
Scenario: Invalid YAML config produces schema error
|
|
Given a spec alignment invalid YAML config file
|
|
When I run spec alignment create with --config
|
|
Then the spec alignment command should abort
|
|
|
|
Scenario: Config with schema errors produces validation error
|
|
Given a spec alignment config with missing required fields
|
|
When I run spec alignment create with --config
|
|
Then the spec alignment command should abort
|
|
And the spec alignment output should contain "validation error"
|
|
|
|
# Show with long definition of done truncates to summary
|
|
Scenario: Show action with long definition of done
|
|
Given a spec alignment action with long definition of done
|
|
When I run spec alignment show with name "local/long-dod"
|
|
Then the spec alignment show should display details
|
|
And the spec alignment output should contain "..."
|
|
|
|
# List with long definition of done truncates to summary
|
|
Scenario: List with long definition of done
|
|
Given spec alignment actions with long definition of done
|
|
When I run spec alignment list all
|
|
Then the spec alignment list should succeed
|
|
And the spec alignment list output should contain truncated dod
|
|
|
|
# ValueError from config validation
|
|
Scenario: Config with ValueError from Action.from_config
|
|
Given a spec alignment config that triggers value error
|
|
When I run spec alignment create with --config
|
|
Then the spec alignment command should abort
|
|
And the spec alignment output should contain "config validation error"
|
|
|
|
# Available command removed
|
|
Scenario: Available subcommand no longer exists
|
|
When I run spec alignment available command
|
|
Then the spec alignment command should fail with unrecognized command
|