Files
cleveragents-core/features/langgraph_nodes_additional_coverage.feature
T

41 lines
1.8 KiB
Gherkin

Feature: Additional LangGraph nodes coverage
As a developer
I want to exercise remaining uncovered branches in langgraph nodes
So that code coverage for nodes.py increases
Scenario: Conversation history handles empty messages
Given a node with default history limits
When I prepare the conversation history for empty input
Then it should return empty history without truncation
Scenario: Conversation history falls back on invalid limits
Given a node with invalid history metadata and two messages
When I prepare the conversation history with invalid limits
Then it should return full history without truncation
Scenario: Agent node without configured agent returns failure metadata
Given an agent node without an agent configured
When I execute the node expecting an agent configuration error
Then the result should include failed_node and error text
Scenario: Agent receives empty input when no messages exist
Given an agent node with no prior messages
When I execute the agent node with empty history
Then the agent should receive empty input and track node metadata
Scenario: Agent merges nested metadata context and flags truncation
Given an agent node with nested metadata context and long history
When I execute the agent node with nested context
Then the agent context should merge nested values and mark truncation
Scenario: Agent error path captures processing failures
Given an agent node whose handler raises an exception
When I execute the failing agent node
Then the agent response should contain the error string
Scenario: Function node retries and reports missing function
Given a function node missing a target with retry policy
When I execute the function node with retries
Then it should report failure after retries