Files
cleveractors-core/features/yte_remaining_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

42 lines
1.9 KiB
Gherkin

Feature: YAML Template Engine Remaining Uncovered Paths
As a developer
I want to exercise remaining uncovered lines in yaml_template_engine.py
So that coverage improves
Background:
Given a fresh yte remaining test context (ytr)
Scenario: Load string returns non-dict YAML raises ValueError
Given a fresh yte remaining test context (ytr)
When I load a YAML string that parses as a bare list (ytr)
Then a ValueError should be raised for non-dict result (ytr)
Scenario: Postprocessing splits multi-value lines
Given a fresh yte remaining test context (ytr)
When I postprocess rendered YAML with multi-value lines (ytr)
Then the lines should be split into separate entries (ytr)
Scenario: Modified content parses as non-dict after extraction
Given a fresh yte remaining test context (ytr)
When extraction produces modified content that is not a dict (ytr)
Then the simple extraction fallback should be used (ytr)
Scenario: Sum filter with object attributes
Given a fresh yte remaining test context (ytr)
When I call _sum_filter with a list of objects and attribute name (ytr)
Then it should sum using getattr with default 0 (ytr)
Scenario: Reconstruct with non-string template content
Given a fresh yte remaining test context (ytr)
When _reconstruct_from_structure encounters non-string _template_content (ytr)
Then the template content error should be raised (ytr)
Scenario: Reconstruct skips underscore keys
Given a fresh yte remaining test context (ytr)
When _reconstruct_from_structure processes a dict with underscore keys (ytr)
Then underscore keys should be excluded from output (ytr)
Scenario: Reconstruct with non-string template value
Given a fresh yte remaining test context (ytr)
When _reconstruct_from_structure encounters non-string _template_value (ytr)
Then the template value error should be raised (ytr)