Files
cleveragents-core/features/actor_add_name_positional.feature
Dev User 23e9848f95
CI / lint (push) Successful in 1m6s
CI / helm (push) Successful in 42s
CI / build (push) Successful in 1m12s
CI / quality (push) Successful in 1m28s
CI / typecheck (push) Successful in 1m30s
CI / security (push) Successful in 2m23s
CI / push-validation (push) Successful in 21s
CI / e2e_tests (push) Successful in 4m5s
CI / integration_tests (push) Successful in 4m18s
CI / unit_tests (push) Successful in 4m56s
CI / docker (push) Successful in 1m29s
CI / benchmark-regression (push) Has been skipped
CI / coverage (push) Successful in 10m33s
CI / status-check (push) Successful in 4s
CI / benchmark-publish (push) Successful in 1h17m53s
CI / benchmark-publish (pull_request) Has been skipped
CI / coverage (pull_request) Successful in 10m54s
CI / push-validation (pull_request) Successful in 40s
CI / build (pull_request) Successful in 1m2s
CI / helm (pull_request) Successful in 44s
CI / lint (pull_request) Successful in 1m15s
CI / quality (pull_request) Successful in 1m32s
CI / typecheck (pull_request) Successful in 1m40s
CI / security (pull_request) Successful in 1m41s
CI / integration_tests (pull_request) Successful in 4m55s
CI / e2e_tests (pull_request) Successful in 4m54s
CI / unit_tests (pull_request) Successful in 6m29s
CI / docker (pull_request) Successful in 1m36s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-regression (pull_request) Failing after 14m44s
fix(cli): make actor NAME argument optional, derive from YAML config
Implement NAME argument as optional with derivation from config file when not provided.

Changes:
- actor.py: NAME argument changed from required 'str' to optional 'str | None = None'
- Added help text explaining NAME can be omitted and derived from config
- Added logic to derive name from config_blob.get('name') when name arg is None
- Raises BadParameter if neither name argument nor config 'name' field is provided
- Updated docstring signature to reflect optional NAME: 'agents actor add [--config|-c <FILE>] [<NAME>]'
- Updated examples to show config-only usage

ISSUES CLOSED: #4186
2026-05-07 20:05:33 +00:00

33 lines
1.6 KiB
Gherkin

Feature: agents actor add NAME positional argument
As a user of the CleverAgents CLI
I want to pass the actor name as a positional argument to `agents actor add`
So that the CLI matches the spec synopsis: agents actor add --config <FILE> [<NAME>]
@tdd_issue @tdd_issue_4230 @tdd_expected_fail
Scenario: actor add accepts NAME as positional argument
Given an actor CLI runner
And I have an actor JSON config file without a name field
When I run actor add with NAME positional argument and config
Then the actor add should succeed with the positional name
@tdd_issue @tdd_issue_4230 @tdd_expected_fail
Scenario: actor add NAME positional argument takes precedence over config name
Given an actor CLI runner
And I have an actor JSON config file with a different name
When I run actor add with NAME positional argument overriding config name
Then the actor add should use the positional NAME not the config name
@tdd_issue @tdd_issue_4186
Scenario: actor add without NAME positional argument uses config name
Given an actor CLI runner
And I have an actor JSON config file with name "local/config-derived-actor"
When I run actor add with config but no NAME positional argument
Then the actor add should succeed using the config name
@tdd_issue @tdd_issue_4186
Scenario: actor add without NAME and without config name field raises BadParameter
Given an actor CLI runner
And I have an actor JSON config file without a name field
When I run actor add with config but no NAME positional argument
Then the actor add should fail with a BadParameter error about missing actor name