Files
cleveragents-core/features/cli_config_jinja_port.feature
T
brent.edwards 17fe46d925
CI / lint (pull_request) Successful in 18s
CI / typecheck (pull_request) Successful in 26s
CI / security (pull_request) Successful in 17s
CI / quality (pull_request) Successful in 14s
CI / build (pull_request) Successful in 12s
CI / behave (3.13) (pull_request) Failing after 3m50s
CI / docker (pull_request) Has been skipped
CI / helm (pull_request) Has been skipped
CI / coverage (pull_request) Failing after 4m20s
test(behave): fix behave tests
There had been over 100 behave tests failing. There should be none failing now.
2026-02-12 04:47:02 +00:00

104 lines
4.2 KiB
Gherkin

Feature: Actor-first port of v2 CLI/config/Jinja suites
As a developer migrating v2 flows
I want actor-only CLI and YAML template coverage
So that v3 matches the v2 behaviors without provider/model flags
# TODO: Uncomment when step definitions are implemented
# Scenario: Unknown command reports helpful error
# When I run the CleverAgents CLI with "invalid-command"
# Then the CLI command should fail
# And the CLI output should contain "No such command"
# And the exit code should be 2
#
# Scenario: Plan help highlights actor requirement
# When I run the CleverAgents CLI with "plan --help"
# Then the exit code should be 0
# And the CLI output should contain "actor"
# And the CLI output should not contain "--provider"
# And the CLI output should not contain "--model"
#
# Scenario: Render templated YAML with loops and context
# Given the YAML template engine is initialized for coverage
# And I have a YAML string with inline Jinja2 templates:
# """
# items:
# {% for item in items %}
# - {{ item }}
# {% endfor %}
# context_value: {{ context.existing }}
# """
# And I have a template context with list items
# When I render the YAML with context
# Then the rendered YAML should be parsed into a mapping
# And the rendered mapping should include loop results and merged context
#
# Scenario: Deferred template renders invalid YAML raises error
# Given the YAML template engine is initialized for coverage
# And I have invalid templated YAML for deferred rendering:
# """
# agent:
# name: {{ name
# """
# When I load YAML content without context for deferred rendering
# Then a YAML error should be raised for deferred loading
#
# Scenario: Rendering malformed mapping with colons surfaces YAML error
# Given the YAML template engine is initialized for coverage
# And I have a templated YAML that renders malformed mapping:
# """
# config: {{ value_with_colons }}
# """
# And I have a template context with colon rich value
# When I render the YAML with context
# Then a YAML parsing error should be raised after attempting fixes
#
# Scenario: Preprocess adds indentation hints for loops
# Given the YAML template engine is initialized for coverage
# And I have a YAML string with for loops requiring preprocessing:
# """
# agents:
# {% for item in items %}
# - name: {{ item }}
# {% endfor %}
# """
# When I preprocess the YAML content for rendering
# Then indentation hints should be present after the loop line
#
# Scenario: Sum filter raises for non-summable values
# Given the YAML template engine is initialized for coverage
# And I have non-summable values for the sum filter
# When I apply the sum filter expecting an error
# Then a ValueError should be raised for the sum filter
#
# Scenario: Utility functions are evaluated during render
# Given the YAML template engine is initialized for coverage
# And I have template using utility functions:
# """
# utilities:
# range_values: {{ range(3) | list }}
# abs_value: {{ abs(-4) }}
# round_value: {{ round(3.14159, 2) }}
# """
# When I process with complete render context utilities
# Then utility functions should be evaluated
#
# Scenario: Retry parsing recovers after transient YAML error
# Given the YAML template engine is initialized for coverage
# And I have YAML with a placeholder causing parse retry:
# """
# result: {{ value }}
# """
# And I have a template context for retry parsing
# When I render YAML with a transient YAML error on first parse
# Then the rendering retry should yield a mapping result
#
# Scenario: Retry parsing raises when repaired YAML is not a mapping
# Given the YAML template engine is initialized for coverage
# And I have YAML with a placeholder causing parse retry:
# """
# result: {{ value }}
# """
# And I have a template context for retry parsing
# When rendering retry returns non-mapping after YAML error
# Then a ValueError should be raised for non-mapping retry