[Bug]: GraphSpec.validate() accepts entry points targeting missing nodes
GraphSpec.validate() validates the main entry_node, terminal nodes, and edge references, but it does not validate the node IDs referenced by entry_points.
As a result, a graph can pass validation even when an alternate entry point targets a node that does not exist. The failure is only discovered later during execution or session resume.
Location
core/framework/orchestrator/edge.pyGraphSpec.validate()GraphSpec.get_entry_point()
Steps to Reproduce
Create a graph with an
entry_pointsmapping such as:entry_points = { "resume": "missing_node" }Define nodes that do not include
missing_node.Call:
graph.validate()
Expected Behavior
Validation should return a blocking error identifying the invalid entry point and the missing target node.
Example:
Entry point 'resume' references missing node 'missing_node'Actual Behavior
Validation succeeds because only the main entry node, terminal nodes, and edge source/target references are checked.
Later, get_entry_point() can return missing_node, causing execution or resume to fail outside the validation step.
Impact
Invalid agent graphs can pass validation and fail at runtime. This is especially risky for pause/resume flows and alternate execution entry points, where the configuration error may be difficult to diagnose.
Proposed Fix
Update GraphSpec.validate() to verify that every value in entry_points references an existing node.
Add regression tests covering:
- A valid entry point target.
- A missing entry point target.
- Multiple entry points with mixed valid and invalid targets.
- Preservation of existing validation behavior.
Additional Context
This is related to validation gaps discussed in issue #6090, but this report focuses specifically on missing validation for entry_points targets.
Source: aden-hive/hive