UAT: SkillService._schema_to_skill_dict() drops inline tool name field — anonymous tools lose their identity #3740

Open
opened 2026-04-05 22:23:38 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/backlog/skill-service-inline-tool-name-drop
  • Commit Message: fix(skill-service): preserve all SkillInlineTool fields in _schema_to_skill_dict()
  • Milestone: (none — backlog)
  • Parent Epic: #3374

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

Background and Context

SkillService._schema_to_skill_dict() in src/cleveragents/application/services/skill_service.py drops the name field when converting inline tools from SkillInlineTool schema objects to the domain model dict. This means inline tools lose their name during the add_skill() flow.

What Was Tested

Code-level analysis of src/cleveragents/application/services/skill_service.py and src/cleveragents/skills/schema.py.

Expected Behavior (from spec)

Inline tools defined in skill YAML have a name field (per SkillInlineTool schema). This name should be preserved when converting to the domain model.

Actual Behavior

In _schema_to_skill_dict() (line ~200):

if config.inline_tools:
    data["anonymous_tools"] = []
    for it in config.inline_tools:
        tool_dict: dict[str, Any] = {
            "description": it.description or it.name,
            "source": it.source,
            "code": it.code,
        }
        data["anonymous_tools"].append(tool_dict)

The name field from SkillInlineTool (which has name: str) is not included in tool_dict. Only description, source, and code are passed. The writes, checkpointable, and side_effects fields are also dropped.

Impact

  • Inline tools lose their name when registered via agents skill add
  • Tool capability flags (writes, checkpointable, side_effects) are silently dropped
  • The domain model may receive incomplete data, potentially causing validation failures or incorrect behavior

Code Location

src/cleveragents/application/services/skill_service.py_schema_to_skill_dict() method, inline tools conversion block

Subtasks

  • Add name field to inline tool dict conversion
  • Add writes, checkpointable, and side_effects fields to inline tool dict conversion
  • Add Behave tests verifying inline tool fields are preserved end-to-end

Definition of Done

  • All SkillInlineTool fields are preserved in _schema_to_skill_dict()
  • Unit tests verify field preservation
  • nox -e typecheck passes
  • nox -e unit_tests passes
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/backlog/skill-service-inline-tool-name-drop` - **Commit Message**: `fix(skill-service): preserve all SkillInlineTool fields in _schema_to_skill_dict()` - **Milestone**: *(none — backlog)* - **Parent Epic**: #3374 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.6.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Background and Context `SkillService._schema_to_skill_dict()` in `src/cleveragents/application/services/skill_service.py` drops the `name` field when converting inline tools from `SkillInlineTool` schema objects to the domain model dict. This means inline tools lose their name during the `add_skill()` flow. ## What Was Tested Code-level analysis of `src/cleveragents/application/services/skill_service.py` and `src/cleveragents/skills/schema.py`. ## Expected Behavior (from spec) Inline tools defined in skill YAML have a `name` field (per `SkillInlineTool` schema). This name should be preserved when converting to the domain model. ## Actual Behavior In `_schema_to_skill_dict()` (line ~200): ```python if config.inline_tools: data["anonymous_tools"] = [] for it in config.inline_tools: tool_dict: dict[str, Any] = { "description": it.description or it.name, "source": it.source, "code": it.code, } data["anonymous_tools"].append(tool_dict) ``` The `name` field from `SkillInlineTool` (which has `name: str`) is not included in `tool_dict`. Only `description`, `source`, and `code` are passed. The `writes`, `checkpointable`, and `side_effects` fields are also dropped. ## Impact - Inline tools lose their name when registered via `agents skill add` - Tool capability flags (`writes`, `checkpointable`, `side_effects`) are silently dropped - The domain model may receive incomplete data, potentially causing validation failures or incorrect behavior ## Code Location `src/cleveragents/application/services/skill_service.py` — `_schema_to_skill_dict()` method, inline tools conversion block ## Subtasks - [ ] Add `name` field to inline tool dict conversion - [ ] Add `writes`, `checkpointable`, and `side_effects` fields to inline tool dict conversion - [ ] Add Behave tests verifying inline tool fields are preserved end-to-end ## Definition of Done - [ ] All `SkillInlineTool` fields are preserved in `_schema_to_skill_dict()` - [ ] Unit tests verify field preservation - [ ] `nox -e typecheck` passes - [ ] `nox -e unit_tests` passes - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
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#3740
No description provided.