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
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.
209 lines
9.7 KiB
Gherkin
209 lines
9.7 KiB
Gherkin
@skip @wip
|
|
Feature: Application Advanced Routing, Pipelines, and Graph Execution
|
|
As a developer
|
|
I want route template instantiation, hybrid pipelines, graph state routing, and visualization to work correctly
|
|
So that advanced application configurations behave predictably
|
|
|
|
Background:
|
|
Given the missing lines test environment is setup
|
|
|
|
Scenario: Single-shot with no config loaded error on line 220
|
|
Given I have an uninitialized application instance
|
|
When I attempt single-shot without loaded configuration
|
|
Then missing lines CleverAgentsException should be raised with "Configuration not loaded"
|
|
|
|
Scenario: Single-shot with None message content handling lines 231-236
|
|
Given I have an application with mocked stream router for None handling
|
|
When single-shot processes a None message on line 231
|
|
Then missing lines empty result should be returned on line 232
|
|
|
|
Scenario: Single-shot with message without content attribute lines 234-236
|
|
Given I have an application with mocked stream router for no content
|
|
When single-shot processes a message without content attribute
|
|
Then missing lines empty result should be returned for no content
|
|
|
|
Scenario: Interactive session with no config loaded error on line 288
|
|
Given I have an uninitialized application instance
|
|
When I attempt interactive session without loaded configuration
|
|
Then missing lines CleverAgentsException should be raised with "Configuration not loaded"
|
|
|
|
Scenario: Interactive help command lines 320-321
|
|
Given I have a configured application for interactive session
|
|
When interactive help command is processed on line 320
|
|
Then missing lines help information should be printed
|
|
|
|
Scenario: Interactive stream command processing lines 322-324
|
|
Given I have a configured application with named streams
|
|
When interactive stream command is handled on line 323
|
|
Then missing lines stream message should be sent
|
|
|
|
Scenario: Interactive graph command processing lines 325-327
|
|
Given I have a configured application with graph routes
|
|
When interactive graph command is handled on line 326
|
|
Then missing lines graph should be executed
|
|
|
|
Scenario: Interactive empty input handling lines 328-329
|
|
Given I have a configured application for interactive session
|
|
When empty input is provided to interactive session
|
|
Then missing lines processing should continue normally
|
|
|
|
Scenario: Interactive keyboard interrupt handling lines 340-342
|
|
Given I have a configured application for interactive session
|
|
When keyboard interrupt occurs during interactive session
|
|
Then missing lines interrupt should be caught and handled
|
|
|
|
Scenario: Interactive EOF handling lines 343-344
|
|
Given I have a configured application for interactive session
|
|
When EOF is encountered during interactive session
|
|
Then missing lines session should break gracefully
|
|
|
|
Scenario: Config to dict conversion with no config line 358-359
|
|
Given I have an application with no configuration loaded
|
|
When configuration is converted to dictionary format
|
|
Then missing lines empty dictionary should be returned
|
|
|
|
Scenario: Template registration with no config early return line 376-377
|
|
Given I have an application with no configuration loaded
|
|
When template registration is attempted
|
|
Then missing lines method should return early
|
|
|
|
Scenario: Template registration with non-dict templates lines 384-385
|
|
Given I have an application with string template configuration
|
|
When template registration processes non-dict templates
|
|
Then missing lines string templates should be skipped
|
|
|
|
Scenario: Enhanced registry with raw template processing lines 414-441
|
|
Given I have an application with enhanced registry and raw templates
|
|
When raw templates are processed by enhanced registry
|
|
Then missing lines raw templates should be registered with correct types
|
|
|
|
Scenario: Agent creation error with no factory line 455-456
|
|
Given I have an application with no agent factory
|
|
When agent creation is attempted
|
|
Then missing lines AgentCreationError should be raised
|
|
|
|
Scenario: Agent creation with enhanced registry template instances line 474-491
|
|
Given I have an application with enhanced registry for template instances
|
|
When template instance agents are created with enhanced registry
|
|
Then missing lines enhanced instantiation should be used
|
|
|
|
Scenario: Agent creation with regular registry fallback lines 490-491
|
|
Given I have an application with enhanced registry but missing template
|
|
When template instance creation falls back
|
|
Then missing lines fallback agent definition should be used
|
|
|
|
Scenario: Agent creation with regular registry instantiation lines 495-498
|
|
Given I have an application with regular registry having instantiate capability
|
|
When regular template instantiation is used
|
|
Then missing lines regular registry should instantiate agent
|
|
|
|
Scenario: Agent creation with no instantiate capability lines 501-502
|
|
Given I have an application with limited registry without instantiate
|
|
When template instantiation is attempted without capability
|
|
Then missing lines instance config should be used directly
|
|
|
|
Scenario: Route setup with no routes early return lines 518-519
|
|
Given I have an application with no routes configuration
|
|
When route setup is attempted
|
|
Then missing lines method should return early
|
|
|
|
Scenario: Route setup bridge initialization lines 522-527
|
|
Given I have an application with routes but no bridge
|
|
When route setup initializes bridge
|
|
Then missing lines RouteBridge should be created
|
|
|
|
Scenario: Route template with no registry fallback lines 538-544
|
|
Given I have an application with route templates but no registry
|
|
When route template instantiation falls back
|
|
Then missing lines template config should be used directly
|
|
|
|
Scenario: Stream route template field updates lines 548-561
|
|
Given I have an application with stream route templates
|
|
When stream route configuration is updated from template
|
|
Then missing lines stream fields should be properly updated
|
|
|
|
Scenario: Graph route template field updates lines 562-567
|
|
Given I have an application with graph route templates
|
|
When graph route configuration is updated from template
|
|
Then missing lines graph fields should be properly updated
|
|
|
|
Scenario: State class resolution failure lines 582-591
|
|
Given I have an application with invalid state class in graph route
|
|
When state class resolution fails
|
|
Then missing lines warning should be logged
|
|
|
|
Scenario: Bridge route registration lines 607-609
|
|
Given I have an application with bridge routes
|
|
When bridge routes are processed
|
|
Then missing lines bridge route should be logged
|
|
|
|
Scenario: Stream operations with no config early return line 615-616
|
|
Given I have an application with no configuration
|
|
When stream operations setup is attempted
|
|
Then missing lines method should return early
|
|
|
|
Scenario: Merge operations processing lines 619-624
|
|
Given I have an application with merge configurations
|
|
When merge operations are setup
|
|
Then missing lines streams should be merged correctly
|
|
|
|
Scenario: Split operations processing lines 627-632
|
|
Given I have an application with split configurations
|
|
When split operations are setup
|
|
Then missing lines streams should be split correctly
|
|
|
|
Scenario: Subscription re-setup after operations lines 644-648
|
|
Given I have an application with stream routes and operations
|
|
When subscriptions are re-setup after operations
|
|
Then missing lines subscriptions should be re-established
|
|
|
|
Scenario: Pipeline setup with no config early return line 654-655
|
|
Given I have an application with no pipeline configuration
|
|
When pipeline setup is attempted
|
|
Then missing lines method should return early
|
|
|
|
Scenario: Pipeline configuration conversion lines 658-667
|
|
Given I have an application with pipeline configurations
|
|
When pipeline setup converts configurations
|
|
Then missing lines pipelines should be created through bridge
|
|
|
|
Scenario: Stream command with invalid stream lines 682-683
|
|
Given I have an application for interactive commands
|
|
When stream command uses non-existent stream
|
|
Then missing lines stream not found error should be shown
|
|
|
|
Scenario: Graph command with invalid graph lines 702-703
|
|
Given I have an application for interactive commands
|
|
When graph command uses non-existent graph
|
|
Then missing lines graph not found error should be shown
|
|
|
|
Scenario: Graph command usage error line 720
|
|
Given I have an application for interactive commands
|
|
When graph command has invalid usage
|
|
Then missing lines usage error should be shown
|
|
|
|
Scenario: Graph execution with no messages lines 736-739
|
|
Given I have an application with graph that returns no messages
|
|
When graph is executed
|
|
Then missing lines state should be displayed instead
|
|
|
|
Scenario: Graph execution error handling lines 741-742
|
|
Given I have an application with graph execution errors
|
|
When graph execution fails
|
|
Then missing lines error should be caught and displayed
|
|
|
|
Scenario: Application disposal lines 746-747
|
|
Given I have an application with stream router
|
|
When application is disposed
|
|
Then missing lines stream router should be disposed
|
|
|
|
Scenario: Network visualization with complex configuration lines 760-795
|
|
Given I have an application with complex network configuration
|
|
When network visualization is generated
|
|
Then missing lines visualization should include all components
|
|
|
|
Scenario: Network visualization with unsupported format lines 798
|
|
Given I have an application for visualization
|
|
When unsupported format is requested
|
|
Then missing lines unsupported format message should be returned
|