Files
cleveragents-core/features/context_service_coverage_boost.feature
freemo a808c395f9 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

33 lines
1.6 KiB
Gherkin

Feature: Context service coverage boost
As a maintainer
I want remaining uncovered defensive branches in context_service.py exercised
So that coverage reaches the maximum achievable level
# Line 566: `or {}` fallback when Settings.build_langsmith_config returns None
@coverage
Scenario: _build_langsmith_config falls back to empty dict when settings helper returns None
Given a boost workspace with LangSmith enabled but build returning None
When I build a LangSmith config via the boost service
Then the boost LangSmith config should be an empty dict
# Lines 603-607: except Exception branch in _refresh_vector_index
@coverage
Scenario: _refresh_vector_index catches generic non-ConfigurationError exceptions
Given a boost workspace with a vector store that raises RuntimeError on refresh
When I trigger a boost vector index refresh
Then the boost refresh should complete without raising
# Line 923: service is None defensive guard in search_context
@coverage
Scenario: search_context returns empty when vector store available reports true but service is None
Given a boost workspace where vector_store_available is true but service is None
When I search the boost context for "test query"
Then the boost search results should be empty
# Lines 938-939: except Exception branch in search_context
@coverage
Scenario: search_context catches generic non-ConfigurationError from vector store search
Given a boost workspace with a vector store that raises RuntimeError on search
When I search the boost context for "find me"
Then the boost search results should be empty