fix(api): Ensure is_resumption for node_started event is correctly set

This commit is contained in:
QuantumGhost
2026-01-13 09:25:44 +08:00
parent 5523df6023
commit 6bcd4ad740
9 changed files with 76 additions and 20 deletions

View File

@ -301,6 +301,7 @@ class Node(Generic[NodeDataT]):
def run(self) -> Generator[GraphNodeEventBase, None, None]:
execution_id = self.ensure_execution_id()
self._start_at = naive_utc_now()
is_resumption = self.graph_runtime_state.is_node_resumption(self._node_id, execution_id)
# Create and push start event with required fields
start_event = NodeRunStartedEvent(
@ -310,6 +311,7 @@ class Node(Generic[NodeDataT]):
node_title=self.title,
in_iteration_id=None,
start_at=self._start_at,
is_resumption=is_resumption,
)
# === FIXME(-LAN-): Needs to refactor.