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
135 lines
5.3 KiB
Gherkin
135 lines
5.3 KiB
Gherkin
Feature: Action CLI commands
|
|
As a developer
|
|
I want to manage actions via CLI commands
|
|
So that I can create and use reusable plan templates
|
|
|
|
Background:
|
|
Given an action CLI runner with mocks
|
|
And a mocked plan lifecycle service
|
|
|
|
# Create command tests (config-only)
|
|
Scenario: Create action via config file
|
|
Given a valid action config YAML file
|
|
When I run action CLI create with --config pointing to the YAML file
|
|
Then the action CLI create should succeed
|
|
And the action CLI created name should be "local/test-action"
|
|
|
|
Scenario: Create action via config with all fields
|
|
Given a full action config YAML file
|
|
When I run action CLI create with --config pointing to the full YAML file
|
|
Then the action CLI create should succeed
|
|
And the action CLI should have specified arguments
|
|
|
|
Scenario: Create action always creates in available state
|
|
Given a valid action config YAML file
|
|
When I run action CLI create with --config pointing to the YAML file
|
|
Then the action CLI should create in available state
|
|
|
|
Scenario: Create action with missing config file fails
|
|
When I run action CLI create with --config pointing to a missing file
|
|
Then the action CLI command should abort
|
|
|
|
Scenario: Create action surfaces validation error
|
|
Given a valid action config YAML file
|
|
When I run action CLI create with validation error from service
|
|
Then the action CLI should abort with validation error
|
|
|
|
Scenario: Create action surfaces service error
|
|
Given a valid action config YAML file
|
|
When I run action CLI create with service error from config
|
|
Then the action CLI should abort with service error
|
|
|
|
# List command tests
|
|
Scenario: List actions shows all actions
|
|
Given there are mocked existing actions
|
|
When I run action CLI list
|
|
Then the action CLI should show all actions in a table
|
|
|
|
Scenario: List actions with namespace filter
|
|
Given there are mocked existing actions
|
|
When I run action CLI list with namespace filter "local"
|
|
Then the action CLI should show only local namespace actions
|
|
|
|
Scenario: List actions with state filter
|
|
Given there are mocked existing actions
|
|
When I run action CLI list with state filter "available"
|
|
Then the action CLI list should succeed with results
|
|
|
|
Scenario: List actions with invalid state filter
|
|
When I run action CLI list with invalid state "unknown"
|
|
Then the action CLI should abort with invalid state
|
|
|
|
Scenario: List actions handles service error
|
|
When I run action CLI list with service error
|
|
Then the action CLI should abort with service error
|
|
|
|
Scenario: List actions when empty
|
|
Given there are no mocked actions
|
|
When I run action CLI list
|
|
Then the action CLI should show no actions message
|
|
|
|
# Show command tests
|
|
Scenario: Show action by name lookup
|
|
Given there is a mocked action with name "local/test-action"
|
|
When I run action CLI show with name "local/test-action"
|
|
Then the action CLI should show the action details
|
|
|
|
Scenario: Show action by name
|
|
Given there is a mocked action with name "local/my-action"
|
|
When I run action CLI show with name "local/my-action"
|
|
Then the action CLI should show the action details
|
|
|
|
Scenario: Show action without optional descriptions
|
|
Given there is a mocked action without descriptions
|
|
When I run action CLI show with name "local/no-description"
|
|
Then the action CLI should show the action details
|
|
|
|
Scenario: Show action not found
|
|
When I run action CLI show with unknown ID
|
|
Then the action CLI command should abort for missing action
|
|
|
|
Scenario: Show action handles service error
|
|
When I run action CLI show with service error
|
|
Then the action CLI should abort with service error
|
|
|
|
# Show command (additional paths)
|
|
Scenario: Show action by ID via show command
|
|
Given there is a mocked available action
|
|
When I run action CLI show with that ID
|
|
Then the action CLI should show the action details
|
|
|
|
Scenario: Show action by name resolves via name lookup
|
|
Given there is a mocked available action
|
|
When I run action CLI show by name lookup
|
|
Then the action CLI should show the action details
|
|
And the action CLI should resolve action by name
|
|
|
|
Scenario: Archive action then verify it is archived
|
|
Given there is a mocked available action
|
|
When I run action CLI archive with the action ID
|
|
Then the action CLI should archive the action
|
|
|
|
Scenario: Show action not found via show command
|
|
When I run action CLI show with unknown ID
|
|
Then the action CLI command should abort for missing action
|
|
|
|
Scenario: Show action handles service error via show command
|
|
Given there is a mocked available action
|
|
When I run action CLI show with service error
|
|
Then the action CLI should abort with service error
|
|
|
|
# Archive command tests
|
|
Scenario: Archive action
|
|
Given there is a mocked available action
|
|
When I run action CLI archive with the action ID
|
|
Then the action CLI should archive the action
|
|
|
|
Scenario: Archive action not found
|
|
When I run action CLI archive with unknown ID
|
|
Then the action CLI command should abort for missing action
|
|
|
|
Scenario: Archive action handles service error
|
|
Given there is a mocked available action
|
|
When I run action CLI archive with service error
|
|
Then the action CLI should abort with service error
|