UAT: RxPyLangGraphBridge.create_graph_from_config() silently drops all edges from actor YAML config — graphs constructed from config have no edges #3664

Open
opened 2026-04-05 21:14:39 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/langgraph-entry-point-hardcoded-start
  • Commit Message: fix(langgraph): use config.entry_point instead of hardcoded start node in execute() and start()
  • Milestone: v3.6.0
  • Parent Epic: #366

Background

Per docs/specification.md, every custom actor IS a LangGraph defined via YAML configuration. The RxPyLangGraphBridge.create_graph_from_config() method is the primary entry point for constructing a LangGraph from an actor's YAML-derived configuration dict.

Current Behavior

LangGraph.execute() and LangGraph.start() in src/cleveragents/langgraph/graph.py hardcode the entry stream name as f"__{self.name}_node_start__", completely ignoring self.config.entry_point. Additionally, _initialize_nodes() always injects a "start" node regardless of the configured entry point.

Affected code locations:

  • src/cleveragents/langgraph/graph.py lines 79–91: execute() hardcodes start_stream = f"__{self.name}_node_start__" ignoring config.entry_point
  • src/cleveragents/langgraph/graph.py lines 255–262: start() also hardcodes start_stream = f"__{self.name}_node_start__" ignoring config.entry_point
  • src/cleveragents/langgraph/graph.py lines 118–124: _initialize_nodes() always adds "start" node regardless of entry_point

Steps to Reproduce

from cleveragents.langgraph.bridge import RxPyLangGraphBridge
from cleveragents.reactive.stream_router import ReactiveStreamRouter

router = ReactiveStreamRouter(None)
bridge = RxPyLangGraphBridge(router)

config = {
    "name": "my_graph",
    "entry_point": "analyze",  # Custom entry point
    "nodes": {
        "analyze": {"type": "function", "function": "my_func"},
        "end": {"type": "end"},
    },
    "edges": [{"source": "analyze", "target": "end"}],
}
graph = bridge.create_graph_from_config(config)
# Bug: graph.config.entry_point == "analyze" but execute() will try to use "start" stream
# which doesn't exist, causing execute() to silently skip node execution

Expected Behavior (per spec)

When entry_point: my_custom_start is specified in the actor graph config, the graph should:

  1. Use my_custom_start as the entry node
  2. The execute() and start() methods should send to the stream for my_custom_start, not start

Impact

Any actor graph that uses a custom entry point (not named "start") will silently fail to execute. The execute() method checks if start_stream in self.stream_router.streams and returns immediately if the stream doesn't exist, so the failure is silent — no exception is raised, no warning is logged, execution simply does nothing.

Subtasks

  • Update execute() to use self.config.entry_point instead of hardcoded "start"
  • Update start() to use self.config.entry_point instead of hardcoded "start"
  • Update _create_graph_streams() to create the entry stream based on config.entry_point
  • Write Behave unit tests verifying custom entry points work correctly
  • Verify all nox stages pass; coverage ≥ 97%

Definition of Done

  • execute() uses config.entry_point to determine the starting node
  • start() uses config.entry_point to determine the starting node
  • Custom entry points work correctly in actor graph configs
  • Unit tests pass for custom entry point behaviour
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/langgraph-entry-point-hardcoded-start` - **Commit Message**: `fix(langgraph): use config.entry_point instead of hardcoded start node in execute() and start()` - **Milestone**: v3.6.0 - **Parent Epic**: #366 ## Background Per `docs/specification.md`, every custom actor IS a LangGraph defined via YAML configuration. The `RxPyLangGraphBridge.create_graph_from_config()` method is the primary entry point for constructing a `LangGraph` from an actor's YAML-derived configuration dict. ## Current Behavior `LangGraph.execute()` and `LangGraph.start()` in `src/cleveragents/langgraph/graph.py` hardcode the entry stream name as `f"__{self.name}_node_start__"`, completely ignoring `self.config.entry_point`. Additionally, `_initialize_nodes()` always injects a `"start"` node regardless of the configured entry point. **Affected code locations:** - `src/cleveragents/langgraph/graph.py` lines 79–91: `execute()` hardcodes `start_stream = f"__{self.name}_node_start__"` ignoring `config.entry_point` - `src/cleveragents/langgraph/graph.py` lines 255–262: `start()` also hardcodes `start_stream = f"__{self.name}_node_start__"` ignoring `config.entry_point` - `src/cleveragents/langgraph/graph.py` lines 118–124: `_initialize_nodes()` always adds `"start"` node regardless of `entry_point` ## Steps to Reproduce ```python from cleveragents.langgraph.bridge import RxPyLangGraphBridge from cleveragents.reactive.stream_router import ReactiveStreamRouter router = ReactiveStreamRouter(None) bridge = RxPyLangGraphBridge(router) config = { "name": "my_graph", "entry_point": "analyze", # Custom entry point "nodes": { "analyze": {"type": "function", "function": "my_func"}, "end": {"type": "end"}, }, "edges": [{"source": "analyze", "target": "end"}], } graph = bridge.create_graph_from_config(config) # Bug: graph.config.entry_point == "analyze" but execute() will try to use "start" stream # which doesn't exist, causing execute() to silently skip node execution ``` ## Expected Behavior (per spec) When `entry_point: my_custom_start` is specified in the actor graph config, the graph should: 1. Use `my_custom_start` as the entry node 2. The `execute()` and `start()` methods should send to the stream for `my_custom_start`, not `start` ## Impact Any actor graph that uses a custom entry point (not named `"start"`) will silently fail to execute. The `execute()` method checks `if start_stream in self.stream_router.streams` and returns immediately if the stream doesn't exist, so the failure is **silent** — no exception is raised, no warning is logged, execution simply does nothing. ## Subtasks - [ ] Update `execute()` to use `self.config.entry_point` instead of hardcoded `"start"` - [ ] Update `start()` to use `self.config.entry_point` instead of hardcoded `"start"` - [ ] Update `_create_graph_streams()` to create the entry stream based on `config.entry_point` - [ ] Write Behave unit tests verifying custom entry points work correctly - [ ] Verify all nox stages pass; coverage ≥ 97% ## Definition of Done - [ ] `execute()` uses `config.entry_point` to determine the starting node - [ ] `start()` uses `config.entry_point` to determine the starting node - [ ] Custom entry points work correctly in actor graph configs - [ ] Unit tests pass for custom entry point behaviour - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.6.0 milestone 2026-04-05 21:14:44 +00:00
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.

Blocks
#366 Epic: Post-MVP Deferred Work
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3664
No description provided.