UAT: ResourceRegistryService missing update_resource method — no service-layer API to update resource properties, location, or description #3701

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

Bug Report

What Was Tested

src/cleveragents/application/services/resource_registry_service.py and its mixin _resource_registry_ops.py were analyzed for resource update capabilities.

Expected Behavior (from spec)

The spec defines a full resource CRUD lifecycle. Resources should be updatable after registration — for example, updating the location, description, properties, or sandbox_strategy of a registered resource. The service layer should expose an update_resource method consistent with the repository pattern (ADR-007).

Actual Behavior (from code analysis)

ResourceRegistryService (via ResourceInstanceMixin) provides only:

  • register_resource(...) — create
  • list_resources(...) — list
  • show_resource(...) — read

There is no update_resource method in:

  • src/cleveragents/application/services/_resource_registry_ops.py
  • src/cleveragents/application/services/resource_registry_service.py

The Resource domain model is frozen (model_config = ConfigDict(frozen=True)) and uses model_copy() for updates, but there is no service method to persist these updates to the database.

Impact

  • Resource properties cannot be updated after registration through the service layer
  • If a resource's location changes (e.g., a git repo is moved), there is no way to update it
  • Inconsistent with register_type / remove_type pattern — types have full CRUD but resources only have create/read/list
  • Any code that needs to update resource metadata must bypass the service layer

Code Locations

  • Missing method: src/cleveragents/application/services/_resource_registry_ops.py (ResourceInstanceMixin)
  • Frozen domain model: src/cleveragents/domain/models/core/resource.py line 216-220

Steps to Reproduce

  1. Review ResourceInstanceMixin — only register_resource, list_resources, show_resource exist
  2. Attempt to update a resource's location after registration — no service method available

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

## Bug Report ### What Was Tested `src/cleveragents/application/services/resource_registry_service.py` and its mixin `_resource_registry_ops.py` were analyzed for resource update capabilities. ### Expected Behavior (from spec) The spec defines a full resource CRUD lifecycle. Resources should be updatable after registration — for example, updating the `location`, `description`, `properties`, or `sandbox_strategy` of a registered resource. The service layer should expose an `update_resource` method consistent with the repository pattern (ADR-007). ### Actual Behavior (from code analysis) `ResourceRegistryService` (via `ResourceInstanceMixin`) provides only: - `register_resource(...)` — create - `list_resources(...)` — list - `show_resource(...)` — read There is **no `update_resource` method** in: - `src/cleveragents/application/services/_resource_registry_ops.py` - `src/cleveragents/application/services/resource_registry_service.py` The `Resource` domain model is frozen (`model_config = ConfigDict(frozen=True)`) and uses `model_copy()` for updates, but there is no service method to persist these updates to the database. ### Impact - Resource properties cannot be updated after registration through the service layer - If a resource's location changes (e.g., a git repo is moved), there is no way to update it - Inconsistent with `register_type` / `remove_type` pattern — types have full CRUD but resources only have create/read/list - Any code that needs to update resource metadata must bypass the service layer ### Code Locations - Missing method: `src/cleveragents/application/services/_resource_registry_ops.py` (ResourceInstanceMixin) - Frozen domain model: `src/cleveragents/domain/models/core/resource.py` line 216-220 ### Steps to Reproduce 1. Review `ResourceInstanceMixin` — only `register_resource`, `list_resources`, `show_resource` exist 2. Attempt to update a resource's location after registration — no service method available --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
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#3701
No description provided.