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
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
75 lines
4.3 KiB
Gherkin
75 lines
4.3 KiB
Gherkin
Feature: ConfigService coverage boost for uncovered branches
|
||
Target uncovered lines in config_service.py that existing tests miss:
|
||
resolve() verbose mode with CLI and ENV values, set_project_value
|
||
with empty project name and corrupted TOML data, get_project_overrides
|
||
with corrupted TOML data.
|
||
|
||
Background:
|
||
Given a fresh temporary config directory for coverage boost tests
|
||
|
||
# -----------------------------------------------------------------------
|
||
# resolve() verbose mode – CLI_FLAG branch (line 1267)
|
||
# -----------------------------------------------------------------------
|
||
|
||
Scenario: Resolve with cli_value and verbose produces CLI_FLAG chain entry with value
|
||
Given a coverage boost ConfigService with empty config
|
||
When I resolve "core.log.level" with cli_value "TRACE" and verbose True
|
||
Then the chain should contain a CLI_FLAG entry with value "TRACE"
|
||
|
||
# -----------------------------------------------------------------------
|
||
# resolve() verbose mode – ENV_VAR branch (lines 1279-1283)
|
||
# -----------------------------------------------------------------------
|
||
|
||
Scenario: Resolve with env var set and verbose produces ENV_VAR chain entry with value and env_name
|
||
Given a coverage boost ConfigService with empty config
|
||
And the coverage boost env var "CLEVERAGENTS_LOG_LEVEL" is injected as "WARN"
|
||
When I resolve "core.log.level" with verbose True and no cli_value
|
||
Then the chain should contain an ENV_VAR entry with value "WARN" and env_name "CLEVERAGENTS_LOG_LEVEL"
|
||
|
||
# -----------------------------------------------------------------------
|
||
# set_project_value() empty project name (lines 1404-1405)
|
||
# -----------------------------------------------------------------------
|
||
|
||
Scenario: set_project_value raises ValueError when project_name is empty
|
||
Given a coverage boost ConfigService with empty config
|
||
When I call set_project_value with empty project name and key "plan.concurrency" value 8
|
||
Then a ValueError with message "project_name must not be empty" should be raised
|
||
|
||
# -----------------------------------------------------------------------
|
||
# set_project_value() corrupted project section – not a dict (line 1415)
|
||
# -----------------------------------------------------------------------
|
||
|
||
Scenario: set_project_value handles non-dict project section in TOML gracefully
|
||
Given a coverage boost ConfigService with project section set to a string
|
||
When I call set_project_value for project "myproj" key "plan.concurrency" value 8
|
||
Then the call should succeed without error
|
||
And get_project_overrides for "myproj" should contain key "plan.concurrency"
|
||
|
||
# -----------------------------------------------------------------------
|
||
# set_project_value() corrupted project overrides – not a dict (line 1418)
|
||
# -----------------------------------------------------------------------
|
||
|
||
Scenario: set_project_value handles non-dict project overrides for a project gracefully
|
||
Given a coverage boost ConfigService with project overrides for "myproj" set to a string
|
||
When I call set_project_value for project "myproj" key "plan.concurrency" value 8
|
||
Then the call should succeed without error
|
||
And get_project_overrides for "myproj" should contain key "plan.concurrency"
|
||
|
||
# -----------------------------------------------------------------------
|
||
# get_project_overrides() corrupted project section – not a dict (line 1450)
|
||
# -----------------------------------------------------------------------
|
||
|
||
Scenario: get_project_overrides returns empty dict when project section is not a dict
|
||
Given a coverage boost ConfigService with project section set to a string
|
||
When I call get_project_overrides for project "myproj"
|
||
Then the coverage boost result should be an empty dictionary
|
||
|
||
# -----------------------------------------------------------------------
|
||
# get_project_overrides() corrupted project data – not a dict (line 1453)
|
||
# -----------------------------------------------------------------------
|
||
|
||
Scenario: get_project_overrides returns empty dict when project data for name is not a dict
|
||
Given a coverage boost ConfigService with project overrides for "myproj" set to a string
|
||
When I call get_project_overrides for project "myproj"
|
||
Then the coverage boost result should be an empty dictionary
|