58c9760856
Refactors the 'agents validation attach' command to accept extra validation
arguments as named CLI options using '--key value' format (e.g.
'--coverage-threshold 90'), as required by the specification.
Changes:
- validation.py: Replace positional 'key=value' Argument with Typer context
settings (allow_extra_args=True, ignore_unknown_options=True) to capture
'--key value' named options from ctx.args. Strips '--' prefix and maps
tokens to {key: value} dict entries. Rejects bare tokens (not '--key value')
with a clear error message.
- features/tdd_validation_attach_named_options.feature: New TDD Behave
scenarios covering single/multiple named options, no-args case, and
rejection of old positional key=value format.
- features/steps/tdd_validation_attach_named_options_steps.py: Step
definitions for the new feature.
- robot/validation_attach_named_options.robot: Robot Framework integration
tests verifying spec-compliant '--key value' option format.
- robot/helper_validation_attach_named_options.py: Helper script for the
Robot Framework tests.
- features/steps/tdd_cli_incomplete_subcommand_registration_steps.py: Fix
pre-existing CliRunner(mix_stderr=False) incompatibility with current Typer.
- features/steps/tool_runtime_steps.py: Fix pre-existing AmbiguousStep error
by converting conflicting parse-based step definitions to regex matchers.
- features/consolidated_tool.feature: Update step text to match renamed step.
Closes #3684
45 lines
2.5 KiB
Plaintext
45 lines
2.5 KiB
Plaintext
*** Settings ***
|
|
Documentation Integration tests for the validation attach named option format.
|
|
... Verifies that ``agents validation attach`` accepts ``--key value``
|
|
... named option format for extra validation arguments, as required
|
|
... by the specification.
|
|
Resource ${CURDIR}/common.resource
|
|
Suite Setup Setup Test Environment With Database Isolation
|
|
Suite Teardown Cleanup Test Environment
|
|
|
|
*** Variables ***
|
|
${HELPER} ${CURDIR}/helper_validation_attach_named_options.py
|
|
|
|
*** Test Cases ***
|
|
Validation Attach Accepts Named Option Coverage Threshold
|
|
[Documentation] Attaching with --coverage-threshold 90 must succeed and forward the arg.
|
|
${result}= Run Process ${PYTHON} ${HELPER} attach-with-coverage-threshold cwd=${WORKSPACE} timeout=120s on_timeout=kill
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} validation-attach-named-option-coverage-threshold-ok
|
|
|
|
Validation Attach Accepts Multiple Named Options
|
|
[Documentation] Attaching with multiple --key value pairs must succeed and forward all args.
|
|
${result}= Run Process ${PYTHON} ${HELPER} attach-with-multiple-named-options cwd=${WORKSPACE} timeout=120s on_timeout=kill
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} validation-attach-named-option-multiple-ok
|
|
|
|
Validation Attach Works Without Extra Named Options
|
|
[Documentation] Attaching without extra named options must still succeed.
|
|
${result}= Run Process ${PYTHON} ${HELPER} attach-without-extra-args cwd=${WORKSPACE} timeout=120s on_timeout=kill
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} validation-attach-named-option-no-extra-args-ok
|
|
|
|
Validation Attach Rejects Positional Key Equals Value Format
|
|
[Documentation] Old-style positional key=value format must be rejected with a clear error.
|
|
${result}= Run Process ${PYTHON} ${HELPER} attach-with-positional-key-value-rejected cwd=${WORKSPACE} timeout=120s on_timeout=kill
|
|
Log ${result.stdout}
|
|
Log ${result.stderr}
|
|
Should Be Equal As Integers ${result.rc} 0
|
|
Should Contain ${result.stdout} validation-attach-positional-key-value-rejected-ok
|