331bf343dc
Add is_closed guard to StateManager.replace_state() so that LangGraph.execute() — which delegates to replace_state() — raises RuntimeError when the StateManager has been closed. This prevents silent state corruption after StateManager.close() is called. Add Behave BDD scenarios verifying the guard and the happy path. ISSUES CLOSED: #9994
19 lines
839 B
Gherkin
19 lines
839 B
Gherkin
@tdd_issue @tdd_issue_9994
|
|
Feature: TDD Issue #9994 — LangGraph.execute() bypasses is_closed guard
|
|
As a developer using LangGraph
|
|
I want execute() to raise RuntimeError when StateManager is closed
|
|
So that state corruption after close() is prevented
|
|
|
|
Background:
|
|
Given the state management system is available
|
|
|
|
Scenario: execute() raises RuntimeError after StateManager.close()
|
|
Given a LangGraph instance in running state with a closed StateManager
|
|
When I attempt to execute the graph after close
|
|
Then a RuntimeError should be raised with message "StateManager is closed"
|
|
|
|
Scenario: execute() succeeds when StateManager is open
|
|
Given a LangGraph instance in running state with an open StateManager
|
|
When I execute the graph with valid input
|
|
Then the execution should succeed and return a GraphState
|