UAT: CloudResourceHandler.resolve() always raises NotImplementedError — never returns a BoundResource even for valid configurations #3148

Open
opened 2026-04-05 06:53:33 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: fix/cloud-resource-handler-resolve-not-implemented
  • Commit Message: fix(resource): return BoundResource stub from CloudResourceHandler.resolve() for read-only access
  • Milestone: None (backlog)
  • Parent Epic: #343

Background

The CloudResourceHandler.resolve() method in src/cleveragents/resource/handlers/cloud.py performs credential validation correctly but then unconditionally raises NotImplementedError for all cloud resource types, including after successful validation. This means cloud resources can never be bound to tool slots, even for read-only operations.

What was tested:

  • Code analysis of src/cleveragents/resource/handlers/cloud.py — the resolve() method
  • Code analysis of CloudSandboxStrategy — all lifecycle methods raise NotImplementedError

Expected behavior (from spec):
The spec (docs/specification.md) describes cloud infrastructure resources (AWS, GCP, Azure) as supported resource types. While sandbox provisioning for cloud resources may be deferred, the resolve() method should return a BoundResource stub that allows read-only access to cloud resource metadata (ARN, project ID, subscription ID). The spec states cloud resources support read operations.

Actual behavior:
CloudResourceHandler.resolve() always raises NotImplementedError after validation:

# src/cleveragents/resource/handlers/cloud.py
def resolve(self, *, resource, plan_id, slot_name, sandbox_manager, access="read_only"):
    # ... validation code ...
    raise NotImplementedError(  # ← ALWAYS raises, even after successful validation
        f"Cloud resource execution for '{type_name}' "
        f"(provider={provider}) is not yet implemented. "
        ...
    )

This means:

  1. Cloud resources registered in the Resource Registry can never be bound to any tool slot
  2. Even read-only access to cloud resource metadata is blocked
  3. The CloudSandboxStrategy class also raises NotImplementedError for all lifecycle operations (create, commit, rollback)
  4. The read(), write(), delete(), list_children(), diff() methods all raise NotImplementedError

Code location:
src/cleveragents/resource/handlers/cloud.py:

  • CloudResourceHandler.resolve() — lines ~250–290
  • CloudResourceHandler.read() — raises NotImplementedError
  • CloudSandboxStrategy.create/commit/rollback() — all raise NotImplementedError

Steps to reproduce:

  1. Register a cloud resource: agents resource add aws my-aws-account --access-key-id KEY --secret-access-key SECRET
  2. Attempt to use it in a plan — the handler will raise NotImplementedError during resolve()

Impact:
Cloud infrastructure resources (AWS, GCP, Azure) are completely non-functional. Any plan that references a cloud resource will fail with NotImplementedError. The credential validation code is implemented but the resource can never be used.

Note: This is expected for sandbox provisioning (cloud sandboxes are complex), but the handler should at minimum return a BoundResource stub for read-only metadata access so cloud resources can be referenced in plans.

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.

Subtasks

  • Investigate CloudResourceHandler.resolve() and identify the exact point where NotImplementedError is raised unconditionally
  • Implement a BoundResource stub return path in CloudResourceHandler.resolve() for access="read_only" that exposes cloud resource metadata (ARN, project ID, subscription ID) without requiring sandbox provisioning
  • Implement CloudResourceHandler.read() to return cloud resource metadata for read-only bound resources
  • Document the read-only stub behaviour and the deferred sandbox provisioning limitation in code comments and docstrings
  • Tests (Behave): Add unit test scenarios covering resolve() returning a BoundResource stub for each cloud provider (aws, gcp, azure) with valid credentials
  • Tests (Behave): Add unit test scenarios verifying NotImplementedError is still raised for write/sandbox operations
  • Tests (Robot): Add integration test confirming a cloud resource can be registered and resolved to a read-only BoundResource without error
  • Verify coverage ≥97% via nox -s coverage_report; if below, add targeted Behave unit tests until threshold is met
  • Run nox (all default sessions including benchmarks) and fix any failures across the entire codebase

Definition of Done

  • CloudResourceHandler.resolve() returns a valid BoundResource stub for read-only access instead of raising NotImplementedError
  • CloudResourceHandler.read() returns cloud resource metadata for read-only bound resources without raising NotImplementedError
  • CloudSandboxStrategy lifecycle methods (create, commit, rollback) may continue to raise NotImplementedError (sandbox provisioning is deferred), but this is clearly documented
  • All new behaviour is covered by Behave unit tests and Robot Framework integration tests
  • All nox stages pass
  • Coverage >= 97%
  • A Git commit is created where the first line matches the Commit Message in Metadata exactly, pushed to the branch in Metadata, submitted as a pull request to master, reviewed, and merged before this issue is marked done

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

## Metadata - **Branch**: `fix/cloud-resource-handler-resolve-not-implemented` - **Commit Message**: `fix(resource): return BoundResource stub from CloudResourceHandler.resolve() for read-only access` - **Milestone**: None (backlog) - **Parent Epic**: #343 ## Background The `CloudResourceHandler.resolve()` method in `src/cleveragents/resource/handlers/cloud.py` performs credential validation correctly but then unconditionally raises `NotImplementedError` for **all** cloud resource types, including after successful validation. This means cloud resources can never be bound to tool slots, even for read-only operations. **What was tested:** - Code analysis of `src/cleveragents/resource/handlers/cloud.py` — the `resolve()` method - Code analysis of `CloudSandboxStrategy` — all lifecycle methods raise `NotImplementedError` **Expected behavior (from spec):** The spec (`docs/specification.md`) describes cloud infrastructure resources (AWS, GCP, Azure) as supported resource types. While sandbox provisioning for cloud resources may be deferred, the `resolve()` method should return a `BoundResource` stub that allows read-only access to cloud resource metadata (ARN, project ID, subscription ID). The spec states cloud resources support `read` operations. **Actual behavior:** `CloudResourceHandler.resolve()` always raises `NotImplementedError` after validation: ```python # src/cleveragents/resource/handlers/cloud.py def resolve(self, *, resource, plan_id, slot_name, sandbox_manager, access="read_only"): # ... validation code ... raise NotImplementedError( # ← ALWAYS raises, even after successful validation f"Cloud resource execution for '{type_name}' " f"(provider={provider}) is not yet implemented. " ... ) ``` This means: 1. Cloud resources registered in the Resource Registry can never be bound to any tool slot 2. Even read-only access to cloud resource metadata is blocked 3. The `CloudSandboxStrategy` class also raises `NotImplementedError` for all lifecycle operations (create, commit, rollback) 4. The `read()`, `write()`, `delete()`, `list_children()`, `diff()` methods all raise `NotImplementedError` **Code location:** `src/cleveragents/resource/handlers/cloud.py`: - `CloudResourceHandler.resolve()` — lines ~250–290 - `CloudResourceHandler.read()` — raises `NotImplementedError` - `CloudSandboxStrategy.create/commit/rollback()` — all raise `NotImplementedError` **Steps to reproduce:** 1. Register a cloud resource: `agents resource add aws my-aws-account --access-key-id KEY --secret-access-key SECRET` 2. Attempt to use it in a plan — the handler will raise `NotImplementedError` during `resolve()` **Impact:** Cloud infrastructure resources (AWS, GCP, Azure) are completely non-functional. Any plan that references a cloud resource will fail with `NotImplementedError`. The credential validation code is implemented but the resource can never be used. **Note:** This is expected for sandbox provisioning (cloud sandboxes are complex), but the handler should at minimum return a `BoundResource` stub for read-only metadata access so cloud resources can be referenced in plans. > **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. ## Subtasks - [ ] Investigate `CloudResourceHandler.resolve()` and identify the exact point where `NotImplementedError` is raised unconditionally - [ ] Implement a `BoundResource` stub return path in `CloudResourceHandler.resolve()` for `access="read_only"` that exposes cloud resource metadata (ARN, project ID, subscription ID) without requiring sandbox provisioning - [ ] Implement `CloudResourceHandler.read()` to return cloud resource metadata for read-only bound resources - [ ] Document the read-only stub behaviour and the deferred sandbox provisioning limitation in code comments and docstrings - [ ] Tests (Behave): Add unit test scenarios covering `resolve()` returning a `BoundResource` stub for each cloud provider (aws, gcp, azure) with valid credentials - [ ] Tests (Behave): Add unit test scenarios verifying `NotImplementedError` is still raised for write/sandbox operations - [ ] Tests (Robot): Add integration test confirming a cloud resource can be registered and resolved to a read-only `BoundResource` without error - [ ] Verify coverage ≥97% via `nox -s coverage_report`; if below, add targeted Behave unit tests until threshold is met - [ ] Run `nox` (all default sessions including benchmarks) and fix any failures across the entire codebase ## Definition of Done - [ ] `CloudResourceHandler.resolve()` returns a valid `BoundResource` stub for read-only access instead of raising `NotImplementedError` - [ ] `CloudResourceHandler.read()` returns cloud resource metadata for read-only bound resources without raising `NotImplementedError` - [ ] `CloudSandboxStrategy` lifecycle methods (`create`, `commit`, `rollback`) may continue to raise `NotImplementedError` (sandbox provisioning is deferred), but this is clearly documented - [ ] All new behaviour is covered by Behave unit tests and Robot Framework integration tests - [ ] All nox stages pass - [ ] Coverage >= 97% - [ ] A Git commit is created where the first line matches the Commit Message in Metadata exactly, pushed to the branch in Metadata, submitted as a pull request to `master`, reviewed, and merged before this issue is marked done --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
freemo added this to the v3.6.0 milestone 2026-04-05 07:01:53 +00:00
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
Reference
cleveragents/cleveragents-core#3148
No description provided.