UAT: LangGraph.parallel_groups computed but never used — parallel_execution: true has no effect on actual node execution #5565

Open
opened 2026-04-09 07:34:33 +00:00 by HAL9000 · 2 comments
Owner

Bug Report

Feature Area: LangGraph Integration — Parallel Node Execution
Milestone: v3.3.0 (Actor Graphs)
Severity: High — spec-required parallel execution is silently ignored


What Was Tested

Code-level analysis of LangGraph class parallel execution implementation in src/cleveragents/langgraph/graph.py.

Expected Behavior (from spec)

The spec states:

parallel_execution: false # Allow parallel node execution (default: false)

When parallel_execution: true is set in a graph route config, nodes at the same topological level should execute concurrently (e.g., using asyncio.gather()). The spec also states:

The system supports parallel execution of subplans, with orchestration handled by the subplan execution scheduler.

Actual Behavior

LangGraph._find_parallel_groups() correctly computes which nodes can run in parallel (lines 229–248 in graph.py):

def _find_parallel_groups(self) -> list[set[str]]:
    if not self.config.parallel_execution:
        return []
    # ... computes groups correctly ...
    return groups

However, self.parallel_groups is never used anywhere. The execute() method (line 97) simply sends to the start stream and returns immediately without traversing nodes at all (a separate known bug #3821). Even if execute() were fixed to traverse nodes, it has no code to use parallel_groups for concurrent execution.

Code location: src/cleveragents/langgraph/graph.py, lines 229–248 (_find_parallel_groups) and line 97 (execute).

Steps to Reproduce

  1. Create a GraphConfig with parallel_execution=True and multiple independent nodes.
  2. Call LangGraph.execute().
  3. Observe that nodes are not executed concurrently — parallel_groups is computed but discarded.

Impact

  • The parallel_execution configuration flag is a documented no-op.
  • Users who configure parallel_execution: true in actor YAML get no benefit.
  • Parallel subplan execution (a key v3.3.0 deliverable) is not functional.

Fix Direction

In the fixed execute() method, use self.parallel_groups to run nodes at the same level concurrently:

for level_nodes in self.parallel_groups:
    await asyncio.gather(*[self._run_node(node_name, state) for node_name in level_nodes])

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area**: LangGraph Integration — Parallel Node Execution **Milestone**: v3.3.0 (Actor Graphs) **Severity**: High — spec-required parallel execution is silently ignored --- ## What Was Tested Code-level analysis of `LangGraph` class parallel execution implementation in `src/cleveragents/langgraph/graph.py`. ## Expected Behavior (from spec) The spec states: > `parallel_execution: false # Allow parallel node execution (default: false)` When `parallel_execution: true` is set in a graph route config, nodes at the same topological level should execute concurrently (e.g., using `asyncio.gather()`). The spec also states: > The system supports parallel execution of subplans, with orchestration handled by the subplan execution scheduler. ## Actual Behavior `LangGraph._find_parallel_groups()` correctly computes which nodes can run in parallel (lines 229–248 in `graph.py`): ```python def _find_parallel_groups(self) -> list[set[str]]: if not self.config.parallel_execution: return [] # ... computes groups correctly ... return groups ``` However, `self.parallel_groups` is **never used anywhere**. The `execute()` method (line 97) simply sends to the start stream and returns immediately without traversing nodes at all (a separate known bug #3821). Even if `execute()` were fixed to traverse nodes, it has no code to use `parallel_groups` for concurrent execution. **Code location**: `src/cleveragents/langgraph/graph.py`, lines 229–248 (`_find_parallel_groups`) and line 97 (`execute`). ## Steps to Reproduce 1. Create a `GraphConfig` with `parallel_execution=True` and multiple independent nodes. 2. Call `LangGraph.execute()`. 3. Observe that nodes are not executed concurrently — `parallel_groups` is computed but discarded. ## Impact - The `parallel_execution` configuration flag is a documented no-op. - Users who configure `parallel_execution: true` in actor YAML get no benefit. - Parallel subplan execution (a key v3.3.0 deliverable) is not functional. ## Fix Direction In the fixed `execute()` method, use `self.parallel_groups` to run nodes at the same level concurrently: ```python for level_nodes in self.parallel_groups: await asyncio.gather(*[self._run_node(node_name, state) for node_name in level_nodes]) ``` --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
Author
Owner

Hierarchical Compliance Fix: This issue was detected as an orphan (no parent Epic).

Solution: Linked to Epic #5502 (Actor Execution & Configuration — GRAPH Actor, Config Schema & CLI Compliance) based on scope alignment.

Hierarchy: Issue #5565 → Epic #5502


Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

**Hierarchical Compliance Fix**: This issue was detected as an orphan (no parent Epic). **Solution**: Linked to Epic #5502 (Actor Execution & Configuration — GRAPH Actor, Config Schema & CLI Compliance) based on scope alignment. **Hierarchy**: Issue #5565 → Epic #5502 --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
Author
Owner

🏷️ Label Fix Applied by Backlog Groomer

The State/Verified label has been added to this issue.

Reason: During a routine backlog grooming pass, this issue was found to have Type/Bug and a Priority/ label but was missing a State/* label entirely — a violation of the CONTRIBUTING.md requirement that every issue must have exactly one State/ label.

Since this issue has been triaged with a priority and type, State/Verified is the appropriate state: the issue has been confirmed as legitimate and is now part of the active backlog.

No other changes were made.


Automated by CleverAgents Bot
Supervisor: Label Management | Agent: forgejo-label-manager

## 🏷️ Label Fix Applied by Backlog Groomer The `State/Verified` label has been added to this issue. **Reason**: During a routine backlog grooming pass, this issue was found to have `Type/Bug` and a `Priority/` label but was missing a `State/*` label entirely — a violation of the CONTRIBUTING.md requirement that every issue must have exactly one `State/` label. Since this issue has been triaged with a priority and type, `State/Verified` is the appropriate state: the issue has been confirmed as legitimate and is now part of the active backlog. No other changes were made. --- **Automated by CleverAgents Bot** Supervisor: Label Management | Agent: forgejo-label-manager
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5565
No description provided.