UAT: Resource type YAML schema uses resource_kind enum instead of spec-required physical boolean field #5124

Open
opened 2026-04-09 01:08:21 +00:00 by HAL9000 · 1 comment
Owner

Bug Report

Feature Area: Configuration System — Resource Type Configuration Files (YAML schema)

Severity: Medium (resource type YAML config files using the spec-documented physical boolean field will fail validation; resource_kind is undocumented)

What Was Tested

The field name and type for the physical/virtual classification in resource type YAML configuration files.

Expected Behavior (from spec)

Per the specification (§ Resource Type Configuration Files, JSON Schema, line 34580):

"physical": {
  "type": "boolean",
  "description": "true for physical types (concrete manifestations), false for virtual types (abstract identity linking equivalent physical resources)."
}

Required fields per spec (line 34696):

"required": ["name", "description", "physical", "sandbox_strategy", "handler"]

The spec uses physical as a boolean field (true = physical, false = virtual).

Actual Behavior (from code analysis)

In docs/schema/resource_type.schema.yaml:

resource_kind:
  type: string
  required: true
  enum: [physical, virtual]
  description: >
    Classification of resources of this type as physical
    (tangible assets like files/directories) or virtual
    (derived/computed assets like branches).

In src/cleveragents/domain/models/core/resource_type.py:

resource_kind: ResourceKind = Field(
    ...,
    description="Physical or virtual classification.",
)

Where ResourceKind is an enum with PHYSICAL = "physical" and VIRTUAL = "virtual".

The code uses resource_kind (string enum) instead of physical (boolean). The schema file also uses resource_kind, contradicting the spec.

Required fields mismatch:

  • Spec requires: ["name", "description", "physical", "sandbox_strategy", "handler"]
  • Schema file requires: ["name", "resource_kind", "sandbox_strategy"] (missing description and handler)

Code Location

  • docs/schema/resource_type.schema.yaml: uses resource_kind enum (should be physical boolean)
  • src/cleveragents/domain/models/core/resource_type.py: ResourceTypeSpec.resource_kind field

Steps to Reproduce

Create a resource type YAML file following the spec:

name: local/custom-db
description: Custom database resource type
physical: true
sandbox_strategy: transaction_rollback
handler:
  class: CustomDbHandler
  module: myorg.handlers.db

Register it:

agents resource type add --config custom-db.yaml

Observe: Validation fails because physical is not a recognized field (code expects resource_kind).

Impact

Users following the spec documentation cannot create custom resource types. The physical boolean field documented in the spec is not accepted; users must use the undocumented resource_kind enum field instead.


Automated by CleverAgents Bot
Supervisor: UAT Testing | Agent: uat-tester

## Bug Report **Feature Area:** Configuration System — Resource Type Configuration Files (YAML schema) **Severity:** Medium (resource type YAML config files using the spec-documented `physical` boolean field will fail validation; `resource_kind` is undocumented) ### What Was Tested The field name and type for the physical/virtual classification in resource type YAML configuration files. ### Expected Behavior (from spec) Per the specification (§ Resource Type Configuration Files, JSON Schema, line 34580): ```json "physical": { "type": "boolean", "description": "true for physical types (concrete manifestations), false for virtual types (abstract identity linking equivalent physical resources)." } ``` Required fields per spec (line 34696): ```json "required": ["name", "description", "physical", "sandbox_strategy", "handler"] ``` The spec uses `physical` as a **boolean** field (`true` = physical, `false` = virtual). ### Actual Behavior (from code analysis) **In `docs/schema/resource_type.schema.yaml`:** ```yaml resource_kind: type: string required: true enum: [physical, virtual] description: > Classification of resources of this type as physical (tangible assets like files/directories) or virtual (derived/computed assets like branches). ``` **In `src/cleveragents/domain/models/core/resource_type.py`:** ```python resource_kind: ResourceKind = Field( ..., description="Physical or virtual classification.", ) ``` Where `ResourceKind` is an enum with `PHYSICAL = "physical"` and `VIRTUAL = "virtual"`. The code uses `resource_kind` (string enum) instead of `physical` (boolean). The schema file also uses `resource_kind`, contradicting the spec. **Required fields mismatch:** - Spec requires: `["name", "description", "physical", "sandbox_strategy", "handler"]` - Schema file requires: `["name", "resource_kind", "sandbox_strategy"]` (missing `description` and `handler`) ### Code Location - `docs/schema/resource_type.schema.yaml`: uses `resource_kind` enum (should be `physical` boolean) - `src/cleveragents/domain/models/core/resource_type.py`: `ResourceTypeSpec.resource_kind` field ### Steps to Reproduce Create a resource type YAML file following the spec: ```yaml name: local/custom-db description: Custom database resource type physical: true sandbox_strategy: transaction_rollback handler: class: CustomDbHandler module: myorg.handlers.db ``` Register it: ```bash agents resource type add --config custom-db.yaml ``` Observe: Validation fails because `physical` is not a recognized field (code expects `resource_kind`). ### Impact Users following the spec documentation cannot create custom resource types. The `physical` boolean field documented in the spec is not accepted; users must use the undocumented `resource_kind` enum field instead. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: uat-tester
HAL9000 added this to the v3.2.0 milestone 2026-04-09 01:10:56 +00:00
Author
Owner

Issue triaged by project owner: Verified as valid spec compliance bug. Priority: Medium. Milestone: v3.2.0.


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

Issue triaged by project owner: Verified as valid spec compliance bug. Priority: Medium. Milestone: v3.2.0. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
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#5124
No description provided.