BUG-HUNT: [SPEC-ALIGNMENT] LangGraph tool execution is non-functional stub violating specification requirements #7175

Open
opened 2026-04-10 08:31:11 +00:00 by HAL9000 · 2 comments
Owner

Background / Context

The project specification requires the Tool/Skill System to provide "independently registered callable operations with resource bindings" and emphasises integration with "MCP, LSP, AgentSkills.io integration." The LangGraph module's ToolNode class is the primary mechanism by which tool-type graph nodes execute their operations. However, the _execute_tool() method in src/cleveragents/langgraph/nodes.py is a non-functional stub that returns a hardcoded placeholder dictionary instead of dispatching to the real Tool/Skill System.

Current Behaviour

ToolNode._execute_tool() (line ~289 of src/cleveragents/langgraph/nodes.py) returns a static placeholder:

async def _execute_tool(self) -> dict[str, Any]:
    return {"tool_executed": True, "node": self.name}  # Non-functional stub

Any LangGraph graph that contains a ToolNode silently "succeeds" without actually invoking any tool, producing meaningless output and masking the absence of real execution.

Expected Behaviour

_execute_tool() must resolve the tool registered on the node, bind the appropriate resources, and invoke the callable operation — consistent with the specification's description of the Tool/Skill System: "independently registered callable operations with resource bindings."

Acceptance Criteria

  • ToolNode._execute_tool() dispatches to the project's Tool/Skill System and executes the registered callable.
  • Resource bindings are resolved and passed to the tool at call time.
  • The method raises an appropriate exception (not silently succeeds) when no tool is registered or the tool cannot be resolved.
  • All existing LangGraph BDD scenarios continue to pass.
  • New BDD scenarios cover: successful tool execution, missing tool registration, and resource binding failure.

Supporting Information

  • File: src/cleveragents/langgraph/nodes.py
  • Method: ToolNode._execute_tool (line ~289)
  • Call site: line ~118 (result = await self._execute_tool())
  • Specification reference: Tool/Skill System — "Independently registered callable operations with resource bindings"; MCP, LSP, AgentSkills.io integration.

Backlog note: This issue was discovered during autonomous operation
on milestone v3.2.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.

Metadata

  • Branch: fix/langgraph-tool-execution-stub
  • Commit Message: fix(langgraph): implement tool execution to replace non-functional stub
  • Milestone: (backlog — see note above)
  • Parent Epic: (orphan — see comment below)

Subtasks

  • Identify the Tool/Skill System API surface for resolving and invoking registered tools
  • Implement resource binding resolution in ToolNode._execute_tool()
  • Implement actual tool dispatch (replace the stub return)
  • Add argument validation: raise if no tool is registered on the node
  • Write BDD scenarios: successful execution, missing registration, resource binding failure
  • Update integration tests to exercise real tool dispatch through a ToolNode
  • Update module documentation to reflect the corrected behaviour

Definition of Done

  • _execute_tool() invokes the registered tool via the Tool/Skill System
  • Resource bindings are resolved and forwarded at call time
  • Missing-tool and binding-failure paths raise explicit exceptions (no silent failures)
  • New BDD scenarios are implemented and passing
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: Acting on behalf of: Bug Hunter | Agent: new-issue-creator

## Background / Context The project specification requires the Tool/Skill System to provide "independently registered callable operations with resource bindings" and emphasises integration with "MCP, LSP, AgentSkills.io integration." The LangGraph module's `ToolNode` class is the primary mechanism by which tool-type graph nodes execute their operations. However, the `_execute_tool()` method in `src/cleveragents/langgraph/nodes.py` is a non-functional stub that returns a hardcoded placeholder dictionary instead of dispatching to the real Tool/Skill System. ## Current Behaviour `ToolNode._execute_tool()` (line ~289 of `src/cleveragents/langgraph/nodes.py`) returns a static placeholder: ```python async def _execute_tool(self) -> dict[str, Any]: return {"tool_executed": True, "node": self.name} # Non-functional stub ``` Any LangGraph graph that contains a `ToolNode` silently "succeeds" without actually invoking any tool, producing meaningless output and masking the absence of real execution. ## Expected Behaviour `_execute_tool()` must resolve the tool registered on the node, bind the appropriate resources, and invoke the callable operation — consistent with the specification's description of the Tool/Skill System: "independently registered callable operations with resource bindings." ## Acceptance Criteria - `ToolNode._execute_tool()` dispatches to the project's Tool/Skill System and executes the registered callable. - Resource bindings are resolved and passed to the tool at call time. - The method raises an appropriate exception (not silently succeeds) when no tool is registered or the tool cannot be resolved. - All existing LangGraph BDD scenarios continue to pass. - New BDD scenarios cover: successful tool execution, missing tool registration, and resource binding failure. ## Supporting Information - **File**: `src/cleveragents/langgraph/nodes.py` - **Method**: `ToolNode._execute_tool` (line ~289) - **Call site**: line ~118 (`result = await self._execute_tool()`) - **Specification reference**: Tool/Skill System — "Independently registered callable operations with resource bindings"; MCP, LSP, AgentSkills.io integration. --- > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.2.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Metadata - **Branch**: `fix/langgraph-tool-execution-stub` - **Commit Message**: `fix(langgraph): implement tool execution to replace non-functional stub` - **Milestone**: *(backlog — see note above)* - **Parent Epic**: *(orphan — see comment below)* ## Subtasks - [ ] Identify the Tool/Skill System API surface for resolving and invoking registered tools - [ ] Implement resource binding resolution in `ToolNode._execute_tool()` - [ ] Implement actual tool dispatch (replace the stub return) - [ ] Add argument validation: raise if no tool is registered on the node - [ ] Write BDD scenarios: successful execution, missing registration, resource binding failure - [ ] Update integration tests to exercise real tool dispatch through a `ToolNode` - [ ] Update module documentation to reflect the corrected behaviour ## Definition of Done - [ ] `_execute_tool()` invokes the registered tool via the Tool/Skill System - [ ] Resource bindings are resolved and forwarded at call time - [ ] Missing-tool and binding-failure paths raise explicit exceptions (no silent failures) - [ ] New BDD scenarios are implemented and passing - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: Acting on behalf of: Bug Hunter | Agent: new-issue-creator
Author
Owner

⚠️ Orphan Issue — Parent Epic Required

This issue was created by an automated agent and no parent Epic could be identified for the LangGraph tool execution / Tool/Skill System implementation work.

Per CONTRIBUTING.md, every issue must be linked to a parent Epic via Forgejo's dependency system (child blocks parent). A human maintainer should:

  1. Identify or create the appropriate parent Epic (e.g., a LangGraph implementation Epic or a Tool/Skill System Epic).
  2. Link this issue as a dependency: this issue blocks the parent Epic.

Until that link is established, this issue is considered an orphan and should not be picked up for implementation.


Automated by CleverAgents Bot
Supervisor: Acting on behalf of: Bug Hunter | Agent: new-issue-creator

⚠️ **Orphan Issue — Parent Epic Required** This issue was created by an automated agent and no parent Epic could be identified for the LangGraph tool execution / Tool/Skill System implementation work. Per `CONTRIBUTING.md`, every issue must be linked to a parent Epic via Forgejo's dependency system (child **blocks** parent). A human maintainer should: 1. Identify or create the appropriate parent Epic (e.g., a LangGraph implementation Epic or a Tool/Skill System Epic). 2. Link this issue as a dependency: this issue **blocks** the parent Epic. Until that link is established, this issue is considered an orphan and should not be picked up for implementation. --- **Automated by CleverAgents Bot** Supervisor: Acting on behalf of: Bug Hunter | Agent: new-issue-creator
Author
Owner

Verified — Spec alignment bug: LangGraph tool execution is a non-functional stub. MoSCoW: Must-have. Priority: Medium — spec compliance required.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — Spec alignment bug: LangGraph tool execution is a non-functional stub. MoSCoW: Must-have. Priority: Medium — spec compliance required. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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.

Dependencies

No dependencies set.

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