forked from cleveragents/cleveragents-core
85 lines
3.9 KiB
Gherkin
85 lines
3.9 KiB
Gherkin
Feature: Stream Router additional uncovered branches
|
|
As a developer
|
|
I want Behave coverage for remaining stream_router gaps
|
|
So that uncovered branches are exercised
|
|
|
|
Background:
|
|
Given the CleverAgents reactive system is available
|
|
And I have a base stream message with context metadata
|
|
|
|
Scenario: Copying stream message with metadata override uses provided metadata
|
|
Given I have a base stream message with context metadata
|
|
When I copy the message with explicit metadata override
|
|
Then the copy should use the provided metadata
|
|
|
|
Scenario: Creating a hot stream initializes with initial value
|
|
When I create a hot stream named "hot_stream" with initial value 5
|
|
Then the hot stream should store the initial value
|
|
|
|
Scenario: Creating a replay stream uses buffer size
|
|
When I create a replay stream named "replay_stream" with buffer size 3
|
|
Then the replay stream should be created with buffer size 3
|
|
|
|
Scenario: LangGraph operator without bridge raises routing error
|
|
When I build a langgraph operator "graph_execute" without bridge
|
|
Then I should get a stream routing error about missing langgraph bridge
|
|
|
|
Scenario: Map operator with unknown agent raises routing error
|
|
When I build a map operator targeting unknown agent "ghost"
|
|
Then I should get a stream routing error about missing agent
|
|
|
|
Scenario: Debounce, throttle, and delay operators are created
|
|
When I build debounce, throttle, and delay operators
|
|
Then the temporal operators should be created successfully
|
|
|
|
Scenario: Buffer and window operators with count are created
|
|
When I build buffer and window operators with count 2
|
|
Then the buffer and window operators should be created successfully
|
|
|
|
Scenario: Take and skip operators are created
|
|
When I build take and skip operators
|
|
Then the take and skip operators should be created successfully
|
|
|
|
Scenario: Merge operator merges existing streams
|
|
Given I have two source streams named "merge_x" and "merge_y"
|
|
When I create a merge operator for those streams
|
|
Then the merge operator should be usable
|
|
|
|
Scenario: Accumulate operator with sum processes numbers
|
|
When I build an accumulate operator with sum
|
|
Then the accumulate operator should sum incoming numbers
|
|
|
|
Scenario: Transform extract_field returns field value
|
|
When I apply an extract_field transform to a dictionary message
|
|
Then the extracted field should be returned
|
|
|
|
Scenario: Evaluate condition equals and empty cases
|
|
When I evaluate empty and equals conditions against messages
|
|
Then the empty condition should be true and equals should match
|
|
|
|
Scenario: Agent mapper uses sync processor and handles errors
|
|
When I map messages through agent mapper success and failure paths
|
|
Then the mapper should emit processed content and blank on error
|
|
|
|
Scenario: Append accumulator with non-list leaves accumulator unchanged
|
|
When I apply append accumulator to non-list accumulator
|
|
Then the accumulator should remain unchanged
|
|
|
|
Scenario: Setup subscriptions ignores missing sources
|
|
When I setup subscriptions including a missing source
|
|
Then no subscription should be added for the missing source
|
|
|
|
Scenario: Split stream routes message when condition matches
|
|
Given I have a stream "source_split" and target "target_split"
|
|
When I split the source stream with a matching condition
|
|
Then the target stream should receive the routed message
|
|
|
|
Scenario: Subscribing to output and error streams delivers messages
|
|
When I subscribe to output and error streams and emit messages
|
|
Then the observers should receive the respective messages
|
|
|
|
Scenario: Dispose handles stream dispose errors gracefully
|
|
Given I have a stream router with disposable streams and subscriptions that may fail
|
|
When I dispose the stream router with failing disposables
|
|
Then the stream router internals should be cleared even on dispose errors
|