50 lines
1.9 KiB
Gherkin
50 lines
1.9 KiB
Gherkin
Feature: LangGraph nodes uncovered lines
|
|
As a developer
|
|
I want to cover remaining uncovered branches in langgraph nodes
|
|
So that code coverage improves for nodes.py
|
|
|
|
Scenario: Tool node marks execution
|
|
Given a tool node configured
|
|
When I execute the tool node
|
|
Then it should mark tool executed
|
|
|
|
Scenario: ToolAgent branch uses current_message for input
|
|
Given a tool agent node using ToolAgent with current_message "override"
|
|
When I execute the tool agent node with ToolAgent branch
|
|
Then the ToolAgent should receive input "override"
|
|
|
|
Scenario: Agent falls back to last assistant message when no user entries exist
|
|
Given an agent node with only assistant history
|
|
When I execute the agent node for assistant fallback
|
|
Then the agent should receive the assistant fallback content
|
|
|
|
Scenario: Agent clearing context skips metadata merge
|
|
Given an agent that clears context during processing
|
|
When I execute the clearing agent node
|
|
Then only last_agent_node metadata should remain
|
|
|
|
Scenario: Agent mutation adds metadata updates
|
|
Given an agent that mutates context to add metadata
|
|
When I execute the mutating agent node
|
|
Then the metadata should include the mutated key
|
|
|
|
Scenario: Subgraph node reports invocation
|
|
Given a subgraph node named "child_subgraph"
|
|
When I execute the subgraph node
|
|
Then it should report the invoked subgraph "child_subgraph"
|
|
|
|
Scenario: Start node indicates start
|
|
Given a start node
|
|
When I execute the start node
|
|
Then it should indicate graph start
|
|
|
|
Scenario: End node indicates completion
|
|
Given an end node
|
|
When I execute the end node
|
|
Then it should indicate graph completion
|
|
|
|
Scenario: Non-dict tool result leaves base state updates
|
|
Given a tool node patched to return non dict
|
|
When I execute the patched tool node
|
|
Then the execute result should only include current_node
|