Files
cleveragents-core/features/actor_config_coverage_boost.feature
freemo a808c395f9
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 15s
CI / quality (pull_request) Successful in 17s
CI / typecheck (pull_request) Successful in 35s
CI / security (pull_request) Successful in 50s
CI / unit_tests (pull_request) Successful in 2m46s
CI / integration_tests (pull_request) Successful in 3m16s
CI / docker (pull_request) Successful in 40s
CI / coverage (pull_request) Successful in 5m6s
CI / lint (push) Successful in 13s
CI / quality (push) Successful in 16s
CI / build (push) Successful in 18s
CI / security (push) Successful in 32s
CI / typecheck (push) Successful in 35s
CI / benchmark-regression (push) Has been skipped
CI / unit_tests (push) Successful in 2m52s
CI / integration_tests (push) Successful in 3m8s
CI / docker (push) Successful in 39s
CI / coverage (push) Successful in 5m53s
CI / benchmark-publish (push) Successful in 16m55s
CI / benchmark-regression (pull_request) Successful in 33m0s
test(coverage): add Behave BDD tests to improve unit test coverage across 53 source modules
Add 53 new .feature files and corresponding step definition files targeting
uncovered lines identified in build/coverage.xml. Fix AmbiguousStep conflicts
in 7 pre-existing step files by disambiguating step text.

New tests cover: ACP clients/facade, actor CLI/config, application container,
ACMS service/strategies, async worker, automation profile CLI, autonomy
guardrail, bridge, change model, config CLI/service, context service,
cross-plan correction, database models, decision service, decomposition
clustering/service, discovery handler, langchain chat provider, langgraph
nodes, materializers, multi-project service, plan apply/CLI/lifecycle/model/
preflight/resume/service, PostgreSQL analyzer, project CLI/context CLI,
provider registry, reactive application/route, repositories, resolver handler,
resource registry service, resume model, retry patterns, sandbox protocol,
server CLI, skill CLI/service, skills registry, subplan execution/service,
system CLI, UKO loader, UoW, and YAML template engine.

Closes #645
2026-03-09 13:01:58 -04:00

42 lines
2.1 KiB
Gherkin

Feature: ActorConfiguration.load_yaml_text and defensive paths
Coverage-boost scenarios targeting uncovered lines in actor/config.py
# --- load_yaml_text: JSON null input (lines 50-51) ---
Scenario: load_yaml_text returns empty dict for JSON null
When I call load_yaml_text with "null"
Then the load_yaml_text result should be an empty dict
# --- load_yaml_text: JSON non-dict input (lines 52-53) ---
Scenario: load_yaml_text raises ValueError for a JSON string
When I call load_yaml_text with a JSON string value
Then a ValueError with message containing "object" should be raised
Scenario: load_yaml_text raises ValueError for a JSON array
When I call load_yaml_text with a JSON array value
Then a ValueError with message containing "object" should be raised
Scenario: load_yaml_text raises ValueError for a JSON integer
When I call load_yaml_text with a JSON integer value
Then a ValueError with message containing "object" should be raised
# --- load_yaml_text: valid JSON dict (line 54) ---
Scenario: load_yaml_text returns parsed dict for valid JSON object
When I call load_yaml_text with '{"provider": "openai", "model": "gpt-4"}'
Then the load_yaml_text result should have key "provider" equal to "openai"
And the load_yaml_text result should have key "model" equal to "gpt-4"
Scenario: load_yaml_text returns parsed dict for empty JSON object
When I call load_yaml_text with '{}'
Then the load_yaml_text result should be an empty dict
# --- load_yaml_text: YAML fallback path ---
Scenario: load_yaml_text falls back to YAML for non-JSON input
When I call load_yaml_text with YAML text "provider: openai\nmodel: gpt-4\n"
Then the load_yaml_text result should have key "provider" equal to "openai"
# --- _load_v2_yaml_content: interpolation returns non-dict (line 127) ---
Scenario: _load_v2_yaml_content raises ValueError when interpolation returns non-dict
Given _interpolate_env_vars is patched to return a list
When I call _load_v2_yaml_content with valid YAML via patched interpolation
Then a ValueError with message containing "object" should be raised