UAT: docs/schema/tool.schema.yaml missing wrapped source enum value — schema diverges from ToolSource domain model #3902

Open
opened 2026-04-06 07:19:45 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/tool-schema-missing-wrapped-source-enum
  • Commit Message: fix(schema): add missing wrapped value to tool.schema.yaml source enum
  • Milestone: (none — backlog, see note below)
  • Parent Epic: #392

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.

Summary

docs/schema/tool.schema.yaml defines the source field enum as:

source:
  type: string
  enum: [mcp, agent_skill, builtin, custom]

However, the ToolSource domain model in src/cleveragents/domain/models/core/tool.py defines 5 values:

class ToolSource(StrEnum):
    MCP = "mcp"
    AGENT_SKILL = "agent_skill"
    BUILTIN = "builtin"
    CUSTOM = "custom"
    WRAPPED = "wrapped"  # <-- MISSING from tool.schema.yaml

The wrapped source is used by the Validation domain model (which extends Tool) when wraps is set. Validation.from_config() explicitly sets source = ToolSource.WRAPPED when wraps is present. The validation.schema.yaml correctly includes wrapped in its source enum, but tool.schema.yaml does not — creating an inconsistency between the base schema and the domain model.

Impact: Any tool configuration validator that uses tool.schema.yaml to validate a Validation config with source: wrapped will incorrectly reject it as invalid. The schema is inconsistent with the domain model, creating confusion for users and tooling.

Code Locations:

  • docs/schema/tool.schema.yaml line 21 — source enum missing wrapped
  • src/cleveragents/domain/models/core/tool.pyToolSource enum has WRAPPED
  • docs/schema/validation.schema.yaml — correctly includes wrapped in source enum (reference for correct behaviour)

Subtasks

  • Add wrapped to the source field enum in docs/schema/tool.schema.yaml (line 21) so it matches all 5 ToolSource values
  • Write Behave unit test scenarios verifying that tool.schema.yaml accepts all valid ToolSource enum values, including wrapped
  • Write Behave unit test scenario verifying that tool.schema.yaml rejects unknown source values (negative test)
  • Confirm docs/schema/validation.schema.yaml remains consistent (already correct — no change expected)
  • Run nox -e lint and nox -e typecheck to verify no regressions
  • Run nox -e unit_tests and nox -e coverage_report to confirm coverage >= 97%

Definition of Done

  • docs/schema/tool.schema.yaml source enum includes all 5 ToolSource values: mcp, agent_skill, builtin, custom, wrapped
  • tool.schema.yaml is fully consistent with the ToolSource domain model in src/cleveragents/domain/models/core/tool.py
  • Behave unit tests cover schema validation for all ToolSource enum values (positive and negative cases)
  • No other YAML schema files referencing ToolSource are missing the wrapped value
  • All nox stages pass
  • Coverage >= 97%

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

## Metadata - **Branch**: `fix/tool-schema-missing-wrapped-source-enum` - **Commit Message**: `fix(schema): add missing wrapped value to tool.schema.yaml source enum` - **Milestone**: *(none — backlog, see note below)* - **Parent Epic**: #392 > **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. ## Summary `docs/schema/tool.schema.yaml` defines the `source` field enum as: ```yaml source: type: string enum: [mcp, agent_skill, builtin, custom] ``` However, the `ToolSource` domain model in `src/cleveragents/domain/models/core/tool.py` defines **5** values: ```python class ToolSource(StrEnum): MCP = "mcp" AGENT_SKILL = "agent_skill" BUILTIN = "builtin" CUSTOM = "custom" WRAPPED = "wrapped" # <-- MISSING from tool.schema.yaml ``` The `wrapped` source is used by the `Validation` domain model (which extends `Tool`) when `wraps` is set. `Validation.from_config()` explicitly sets `source = ToolSource.WRAPPED` when `wraps` is present. The `validation.schema.yaml` correctly includes `wrapped` in its source enum, but `tool.schema.yaml` does not — creating an inconsistency between the base schema and the domain model. **Impact:** Any tool configuration validator that uses `tool.schema.yaml` to validate a `Validation` config with `source: wrapped` will incorrectly reject it as invalid. The schema is inconsistent with the domain model, creating confusion for users and tooling. **Code Locations:** - `docs/schema/tool.schema.yaml` line 21 — `source` enum missing `wrapped` - `src/cleveragents/domain/models/core/tool.py` — `ToolSource` enum has `WRAPPED` - `docs/schema/validation.schema.yaml` — correctly includes `wrapped` in source enum (reference for correct behaviour) ## Subtasks - [ ] Add `wrapped` to the `source` field enum in `docs/schema/tool.schema.yaml` (line 21) so it matches all 5 `ToolSource` values - [ ] Write Behave unit test scenarios verifying that `tool.schema.yaml` accepts all valid `ToolSource` enum values, including `wrapped` - [ ] Write Behave unit test scenario verifying that `tool.schema.yaml` rejects unknown `source` values (negative test) - [ ] Confirm `docs/schema/validation.schema.yaml` remains consistent (already correct — no change expected) - [ ] Run `nox -e lint` and `nox -e typecheck` to verify no regressions - [ ] Run `nox -e unit_tests` and `nox -e coverage_report` to confirm coverage >= 97% ## Definition of Done - [ ] `docs/schema/tool.schema.yaml` `source` enum includes all 5 `ToolSource` values: `mcp`, `agent_skill`, `builtin`, `custom`, `wrapped` - [ ] `tool.schema.yaml` is fully consistent with the `ToolSource` domain model in `src/cleveragents/domain/models/core/tool.py` - [ ] Behave unit tests cover schema validation for all `ToolSource` enum values (positive and negative cases) - [ ] No other YAML schema files referencing `ToolSource` are missing the `wrapped` value - [ ] 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.

Blocks
#392 Epic: Actor YAML & Compiler
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3902
No description provided.