UAT: SkillInlineToolSchema missing read_only capability field — inline tools cannot be declared read-only via skill YAML #2504

Open
opened 2026-04-03 18:40:39 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: fix/skill-inline-tool-schema-read-only-field
  • Commit Message: fix(skills): add missing read_only field to SkillInlineToolSchema
  • Milestone: v3.2.0
  • Parent Epic: #392

Background

The spec (docs/specification.md) states:

Anonymous Tool: An inline tool definition embedded in a skill YAML or actor graph node. Same schema as a named tool but unregistered, unnamespaced, and scoped only to its defining context.

Named tools have a capability block with read_only, writes, checkpointable, side_effects, etc. However, SkillInlineToolSchema in src/cleveragents/skills/schema.py only exposes writes, checkpointable, and side_effects as top-level fields — it is missing the read_only field entirely:

class SkillInlineToolSchema(BaseModel):
    # ...
    writes: bool = Field(False, ...)
    checkpointable: bool = Field(False, ...)
    side_effects: list[str] = Field(default_factory=list, ...)
    # MISSING: read_only: bool = Field(False, ...)

This means:

  1. Skill YAML authors cannot declare an inline tool as read_only: true
  2. The SkillCapabilitySummary.read_only_tools counter will always be 0 for inline tools (since ToolCapability.read_only defaults to False and cannot be set via YAML)
  3. The SkillDefinition._validate_writes_consistency() validator cannot correctly detect read-only inline tools

Expected behavior: SkillInlineToolSchema should include a read_only: bool = Field(False, ...) field, consistent with the spec's requirement that inline tools have the same schema as named tools.

Note: A related issue covers SkillService._schema_to_skill_dict dropping writes, checkpointable, side_effects, and input_schema during skill registration. This issue is distinct — it covers the missing read_only field in the schema itself, which prevents the value from being set at all.

Code locations:

  • src/cleveragents/skills/schema.pySkillInlineToolSchema class (missing read_only field)
  • src/cleveragents/domain/models/core/skill.pySkillInlineTool class (has capability: ToolCapability | None)
  • docs/specification.md — Anonymous Tool definition

Subtasks

  • Add read_only: bool = Field(False, description="...") to SkillInlineToolSchema in src/cleveragents/skills/schema.py
  • Verify SkillService._schema_to_skill_dict (or equivalent mapping path) correctly propagates read_only from SkillInlineToolSchema into ToolCapability
  • Update/add Behave unit test scenarios in features/ covering read_only: true inline tool YAML parsing
  • Verify SkillCapabilitySummary.read_only_tools correctly counts inline tools with read_only: true
  • Verify SkillDefinition._validate_writes_consistency() correctly handles read-only inline tools
  • Run nox -e typecheck and confirm no Pyright errors
  • Run nox -e unit_tests and confirm all scenarios pass
  • Run nox -e coverage_report and confirm coverage ≥ 97%

Definition of Done

  • SkillInlineToolSchema contains a read_only: bool field matching the named-tool capability schema
  • Skill YAML with read_only: true on an inline tool is parsed and propagated correctly end-to-end
  • SkillCapabilitySummary.read_only_tools reflects inline tools marked read_only: true
  • SkillDefinition._validate_writes_consistency() correctly identifies read-only inline tools
  • All new and existing Behave scenarios pass (nox -e unit_tests)
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/skill-inline-tool-schema-read-only-field` - **Commit Message**: `fix(skills): add missing read_only field to SkillInlineToolSchema` - **Milestone**: v3.2.0 - **Parent Epic**: #392 ## Background The spec (`docs/specification.md`) states: > Anonymous Tool: An inline tool definition embedded in a skill YAML or actor graph node. **Same schema as a named tool** but unregistered, unnamespaced, and scoped only to its defining context. Named tools have a `capability` block with `read_only`, `writes`, `checkpointable`, `side_effects`, etc. However, `SkillInlineToolSchema` in `src/cleveragents/skills/schema.py` only exposes `writes`, `checkpointable`, and `side_effects` as top-level fields — it is **missing the `read_only` field entirely**: ```python class SkillInlineToolSchema(BaseModel): # ... writes: bool = Field(False, ...) checkpointable: bool = Field(False, ...) side_effects: list[str] = Field(default_factory=list, ...) # MISSING: read_only: bool = Field(False, ...) ``` This means: 1. Skill YAML authors cannot declare an inline tool as `read_only: true` 2. The `SkillCapabilitySummary.read_only_tools` counter will always be `0` for inline tools (since `ToolCapability.read_only` defaults to `False` and cannot be set via YAML) 3. The `SkillDefinition._validate_writes_consistency()` validator cannot correctly detect read-only inline tools **Expected behavior**: `SkillInlineToolSchema` should include a `read_only: bool = Field(False, ...)` field, consistent with the spec's requirement that inline tools have the same schema as named tools. **Note**: A related issue covers `SkillService._schema_to_skill_dict` dropping `writes`, `checkpointable`, `side_effects`, and `input_schema` during skill registration. This issue is distinct — it covers the missing `read_only` field in the schema itself, which prevents the value from being set at all. **Code locations**: - `src/cleveragents/skills/schema.py` — `SkillInlineToolSchema` class (missing `read_only` field) - `src/cleveragents/domain/models/core/skill.py` — `SkillInlineTool` class (has `capability: ToolCapability | None`) - `docs/specification.md` — Anonymous Tool definition ## Subtasks - [ ] Add `read_only: bool = Field(False, description="...")` to `SkillInlineToolSchema` in `src/cleveragents/skills/schema.py` - [ ] Verify `SkillService._schema_to_skill_dict` (or equivalent mapping path) correctly propagates `read_only` from `SkillInlineToolSchema` into `ToolCapability` - [ ] Update/add Behave unit test scenarios in `features/` covering `read_only: true` inline tool YAML parsing - [ ] Verify `SkillCapabilitySummary.read_only_tools` correctly counts inline tools with `read_only: true` - [ ] Verify `SkillDefinition._validate_writes_consistency()` correctly handles read-only inline tools - [ ] Run `nox -e typecheck` and confirm no Pyright errors - [ ] Run `nox -e unit_tests` and confirm all scenarios pass - [ ] Run `nox -e coverage_report` and confirm coverage ≥ 97% ## Definition of Done - [ ] `SkillInlineToolSchema` contains a `read_only: bool` field matching the named-tool capability schema - [ ] Skill YAML with `read_only: true` on an inline tool is parsed and propagated correctly end-to-end - [ ] `SkillCapabilitySummary.read_only_tools` reflects inline tools marked `read_only: true` - [ ] `SkillDefinition._validate_writes_consistency()` correctly identifies read-only inline tools - [ ] All new and existing Behave scenarios pass (`nox -e unit_tests`) - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-new-issue-creator
freemo added this to the v3.2.0 milestone 2026-04-03 18:40:45 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: Should Have — Spec compliance or quality improvement that should be included in the milestone.

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: Should Have — Spec compliance or quality improvement that should be included in the milestone. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo removed this from the v3.2.0 milestone 2026-04-06 22:29:53 +00:00
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
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
#392 Epic: Actor YAML & Compiler
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#2504
No description provided.