Files
cleveractors-core/features/config_parser_comprehensive_coverage.feature
CoreRasurae 9753b31c7e
CI / quality (push) Successful in 36s
CI / lint (push) Successful in 38s
CI / typecheck (push) Successful in 49s
CI / security (push) Successful in 51s
CI / integration_tests (push) Successful in 55s
CI / unit_tests (push) Successful in 3m35s
CI / build (push) Successful in 33s
CI / coverage (push) Successful in 3m36s
CI / status-check (push) Successful in 3s
test: add coverage gap tests improving coverage from 81.4% to 96.90%
Add 13 BDD scenarios covering previously uncovered code paths:
- SAFE_BUILTINS validation (sandbox.py: 0% → 100%)
- ConfigurationError re-raise path (config.py: 99.3% → 100%)
- CLI hello/main functions (cli.py: 72.7% → 90.9%)
- GraphState message truncation (state.py: 98.7% → 100%)
- ProgressBarManager update/context rendering (progress.py: 0% → 87.7%)
- MessageRouter regex/exact/contains routing (message_router.py: 0% → 59.4%)
- RoutingAdapter parse_routing_command (routing_adapter.py)
- DynamicRouterNode pattern-based routing (dynamic_router.py)
- EnhancedTemplateRegistry unknown template type (enhanced_registry.py: 99.2%)
- CompositeAgent null-graph error path (composite.py: 97.8% → 98.6%)

Cover routing_adapter.py (17% → 100%): all GOTO/ROUTE patterns,
create_routing_node, create_conditional_router, dynamic config conversion.

Cover dynamic_router.py (21% → 87%): execute with empty/dict/string
messages, extract_message with colon parsing, config creation, graph
extension with edge generation.

Cover message_router.py (59% → 78%): regex, exact, contains, prefix,
suffix match types, invalid regex handling, non-string message, set_state.

Exercise Node._prepare_conversation_history with invalid configs,
_runtime error paths, _execute_message_router with rules,
_execute_agent with current_message and metadata propagation,
_execute_function with dynamic_router, and _execute_conditional
with content_contains/content_not_contains/content_starts_with
and custom condition types. Improves nodes.py from 71.3% to 72.5%.

Exercise PureGraphConfig, PureLangGraph init with dict/config,
RxPyLangGraphBridge registration/connection/lookup,
ReactiveStreamRouter operator creation and condition functions,
ReactiveConfigParser config/route/graph parsing,
ToolAgent tool execution with JSON, space-separated, single,
file_read, progress_bar invocations, and
ReactiveCleverAgentsApp init/dispose/visualization.
2026-06-02 20:02:01 +01:00

83 lines
3.3 KiB
Gherkin

Feature: ReactiveConfigParser Merge, Environment Variable Interpolation, and Validation
As a developer
I want the reactive config parser to merge configurations, interpolate environment variables, validate routes and pipelines, and handle template instances
So that all reactive configuration parsing paths produce correct merged route/stream/graph definitions
Background:
Given I have a reactive config parser setup
Scenario: Parse configuration with merge edge cases
Given I have configuration files with merge edge cases
When I parse the configuration files
Then the configurations should be merged handling all edge cases
Scenario: Environment variable interpolation with all types
Given I have configuration with environment variable patterns
When I interpolate environment variables
Then all variable types should be converted correctly
Scenario: Template string processing
Given I have configuration with template strings
When I process the template strings
Then template strings should be processed correctly
Scenario: Route configuration validation errors
Given I have invalid route configurations
When I try to parse the configurations
Then appropriate configuration errors should be raised
Scenario: Bridge configuration edge cases
Given I have bridge configurations with edge cases
When I parse the bridge configurations
Then bridge configurations should be parsed correctly
Scenario: Configuration validation comprehensive
Given I have configurations with validation issues
When I validate the configurations
Then all validation scenarios should be tested
Scenario: Merge operation validation
Given I have merge operations with various issues
When I validate merge operations
Then merge validation should handle all cases
Scenario: Split operation validation
Given I have split operations with various issues
When I validate split operations
Then split validation should handle all cases
Scenario: Pipeline validation comprehensive
Given I have pipeline configurations with issues
When I validate pipeline configurations
Then pipeline validation should handle all scenarios
Scenario: Template instance creation
Given I have template instance configurations
When I create template instances
Then template instances should be created correctly
Scenario: Type conversion comprehensive
Given I have values requiring type conversion
When I perform type conversion
Then all type conversions should work correctly
Scenario: Config file with Jinja2 syntax detection
Given I have files with Jinja2 syntax
When I detect Jinja2 syntax in files
Then Jinja2 files should be processed with template engine
Scenario: Error handling for missing environment variables
Given I have configuration with missing environment variables
When I try to interpolate environment variables
Then appropriate errors should be raised for missing variables
Scenario: Complex nested configuration merging
Given I have deeply nested configurations to merge
When I merge the nested configurations
Then deep merging should work correctly
Scenario: Route type validation comprehensive
Given I have routes with various type issues
When I validate route types
Then all route type validation scenarios should be covered