Files
cleveragents-core/features/validation_attach_named_options.feature
freemo 225eab25b1
ci.yml / fix(cli): change `agents validation attach` extra args to use `--key value` named option format (#3837) (push) Failing after 0s
fix(cli): change agents validation attach extra args to use --key value named option format (#3837)
Co-authored-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
Co-committed-by: Jeffrey Phillips Freeman <the@jeffreyfreeman.me>
2026-04-06 07:55:09 +00:00

48 lines
2.6 KiB
Gherkin

Feature: Validation attach uses --key value named option format for extra arguments
As a CleverAgents user
I want the "agents validation attach" command to accept extra arguments
as named options in the format "--key value" (e.g. "--coverage-threshold 90")
So that the CLI is consistent with the specification and other commands
Background:
Given a validation attach type guard test runner
And a validation attach type guard mocked environment
# --- Spec-compliant named option format ---
Scenario: Attach accepts a single named option argument
Given a genuine validation "local/run-tests" is registered with tool_type "validation"
When I invoke validation attach with named option "--coverage-threshold" "90" for "local/run-tests" to "local/api-repo"
Then the validation attach should succeed
Scenario: Attach accepts a named option with hyphenated key
Given a genuine validation "local/lint-check" is registered with tool_type "validation"
When I invoke validation attach with named option "--max-line-length" "120" for "local/lint-check" to "git-checkout/my-repo"
Then the validation attach should succeed
Scenario: Attach accepts multiple named option arguments
Given a genuine validation "local/coverage-check" is registered with tool_type "validation"
When I invoke validation attach with named options "--threshold" "80" "--strict" "true" for "local/coverage-check" to "local/api-repo"
Then the validation attach should succeed
# --- Rejection of old positional key=value format ---
Scenario: Attach rejects positional key=value argument format
Given a genuine validation "local/run-tests" is registered with tool_type "validation"
When I invoke validation attach with positional arg "coverage_threshold=90" for "local/run-tests" to "local/api-repo"
Then the validation attach should be rejected
And the rejection output should contain "Invalid argument format"
Scenario: Attach rejects bare positional argument without equals sign
Given a genuine validation "local/run-tests" is registered with tool_type "validation"
When I invoke validation attach with positional arg "badarg" for "local/run-tests" to "local/api-repo"
Then the validation attach should be rejected
# --- Named option missing value ---
Scenario: Attach rejects named option without a value
Given a genuine validation "local/run-tests" is registered with tool_type "validation"
When I invoke validation attach with dangling option "--coverage-threshold" for "local/run-tests" to "local/api-repo"
Then the validation attach should be rejected
And the rejection output should contain "Missing value"