feat(resource): add cloud infrastructure resources #343

Closed
opened 2026-02-22 23:41:27 +00:00 by freemo · 3 comments
Owner

Metadata

  • Commit Message: feat(resource): add cloud infrastructure resources
  • Branch: feature/m7-post-resource-cloud

Background

Cloud resource types (aws, gcp, azure) are defined with credential fields and region/tenant metadata. Sandbox strategies are stubbed, validating configuration but returning NotImplementedError for execution. Credential resolution uses environment variables and profile names.

Acceptance Criteria

  • Add cloud resource types (aws, gcp, azure) with credential fields and region/tenant metadata.
  • Add stubbed sandbox strategies that validate configuration and return NotImplementedError for execution.
  • Add credential resolution from environment variables and profile names (no secrets logged).
  • Document cloud resource configuration and local-only stub behavior.

Definition of Done

This issue is complete when:

  • All subtasks below are completed and checked off.
  • A Git commit is created where the first line of the commit message matches
    the Commit Message in Metadata exactly, followed by a blank line, then
    additional lines providing relevant details about the implementation. The
    commit body should be appropriate in size for a commit message and relatively
    complete in describing what was done.
  • The commit is pushed to the remote on the branch matching the Branch in
    Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and
    merged before this issue is marked done.

Subtasks

  • Add cloud resource types (aws, gcp, azure) with credential fields and region/tenant metadata.
  • Add stubbed sandbox strategies that validate configuration and return NotImplementedError for execution.
  • Add credential resolution from environment variables and profile names (no secrets logged).
  • Document cloud resource configuration and local-only stub behavior.
  • Tests (Behave): Add cloud resource scenarios (schema validation, stub errors).
  • Tests (Robot): Add cloud resource integration tests with stubbed responses.
  • Tests (ASV): Add benchmarks/cloud_resource_bench.py for resource registration baseline.
  • Verify coverage >=97% via nox -s coverage_report. If coverage is <97% then review the current unit test coverage report at build/coverage.xml and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun nox -s coverage_report to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%.
  • Run nox (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across entire code base, do not ignore any failure even if it seems unrelated to this commit, fix it.

Section: ### Section 18: Deferred Work
Status: Open

## Metadata - **Commit Message**: `feat(resource): add cloud infrastructure resources` - **Branch**: `feature/m7-post-resource-cloud` ## Background Cloud resource types (aws, gcp, azure) are defined with credential fields and region/tenant metadata. Sandbox strategies are stubbed, validating configuration but returning NotImplementedError for execution. Credential resolution uses environment variables and profile names. ## Acceptance Criteria - [ ] Add cloud resource types (aws, gcp, azure) with credential fields and region/tenant metadata. - [ ] Add stubbed sandbox strategies that validate configuration and return NotImplementedError for execution. - [ ] Add credential resolution from environment variables and profile names (no secrets logged). - [ ] Document cloud resource configuration and local-only stub behavior. ## Definition of Done This issue is complete when: - All subtasks below are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. The commit body should be appropriate in size for a commit message and relatively complete in describing what was done. - The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. ## Subtasks - [ ] Add cloud resource types (aws, gcp, azure) with credential fields and region/tenant metadata. - [ ] Add stubbed sandbox strategies that validate configuration and return NotImplementedError for execution. - [ ] Add credential resolution from environment variables and profile names (no secrets logged). - [ ] Document cloud resource configuration and local-only stub behavior. - [ ] Tests (Behave): Add cloud resource scenarios (schema validation, stub errors). - [ ] Tests (Robot): Add cloud resource integration tests with stubbed responses. - [ ] Tests (ASV): Add `benchmarks/cloud_resource_bench.py` for resource registration baseline. - [ ] Verify coverage >=97% via `nox -s coverage_report`. If coverage is <97% then review the current unit test coverage report at `build/coverage.xml` and use it to write new Behave based unit tests to improve code coverage. Specifically, write Behave style unit tests that are descriptively named and specifically improves coverage on whichever file has the most uncovered lines by writing tests that will target the uncovered lines in the report. Once that is done rerun `nox -s coverage_report` to verify all tests pass and coverage is above >=97%. Only mark this as complete once coverage is >=97%, if not repeat this task as many times as is needed until coverage reaches >=97%. - [ ] Run `nox` (all default sessions, including benchmark), fix any errors if needed ensuring nox passes across **entire** code base, do not ignore any failure even if it seems unrelated to this commit, fix it. **Section**: ### Section 18: Deferred Work **Status**: Open
freemo added this to the (deleted) milestone 2026-02-22 23:41:27 +00:00
freemo modified the milestone from (deleted) to v3.6.0 2026-02-23 00:07:04 +00:00
Author
Owner

Expected completion updated (Day 15 rebaseline): Day 53 / 2026-04-02 (previously Day 48 / 2026-03-28)

**Expected completion updated (Day 15 rebaseline):** Day 53 / 2026-04-02 (previously Day 48 / 2026-03-28)
freemo added the due date 2026-03-20 2026-02-23 18:42:01 +00:00
freemo self-assigned this 2026-02-24 21:53:38 +00:00
Author
Owner

Implementation complete. PR #669 is ready for review.

Summary

Implemented cloud infrastructure resource types (aws, gcp, azure) with:

  • CloudResourceHandler with credential resolution from env vars and profile names
  • Stubbed sandbox strategies (validate config, raise NotImplementedError)
  • Cloud types registered in bootstrap_builtin_types() with sandbox_strategy = "none"
  • Credential masking via existing redaction patterns (no secrets logged)

Test Results

  • Lint (ruff): All checks passed
  • Typecheck (pyright strict): 0 errors, 0 warnings
  • Unit tests (Behave): 9757 scenarios passed, 0 failed (including 29 new cloud resource scenarios)
  • Integration tests (Robot): 9 new cloud resource tests all pass
  • ASV benchmarks: Benchmark suite added for credential resolution/validation performance

Files Changed

File Status
src/cleveragents/resource/handlers/cloud.py New - CloudResourceHandler + CloudSandboxStrategy
src/cleveragents/domain/models/core/resource_type.py Modified - Added aws/gcp/azure to BUILTIN_NAMES
src/cleveragents/application/services/resource_registry_service.py Modified - Registered cloud types in _BUILTIN_TYPES
src/cleveragents/resource/handlers/__init__.py Modified - Export CloudResourceHandler
features/cloud_resources.feature New - 29 BDD scenarios
features/steps/cloud_resources_steps.py New - Step definitions
robot/cloud_resources.robot New - 9 Robot integration tests
robot/helper_cloud_resources.py New - Robot test helper
benchmarks/cloud_resource_bench.py New - ASV benchmarks
docs/reference/cloud_resources.md New - Documentation
Implementation complete. PR #669 is ready for review. ## Summary Implemented cloud infrastructure resource types (aws, gcp, azure) with: - `CloudResourceHandler` with credential resolution from env vars and profile names - Stubbed sandbox strategies (validate config, raise `NotImplementedError`) - Cloud types registered in `bootstrap_builtin_types()` with `sandbox_strategy = "none"` - Credential masking via existing redaction patterns (no secrets logged) ## Test Results - **Lint (ruff)**: All checks passed - **Typecheck (pyright strict)**: 0 errors, 0 warnings - **Unit tests (Behave)**: 9757 scenarios passed, 0 failed (including 29 new cloud resource scenarios) - **Integration tests (Robot)**: 9 new cloud resource tests all pass - **ASV benchmarks**: Benchmark suite added for credential resolution/validation performance ## Files Changed | File | Status | |------|--------| | `src/cleveragents/resource/handlers/cloud.py` | **New** - CloudResourceHandler + CloudSandboxStrategy | | `src/cleveragents/domain/models/core/resource_type.py` | Modified - Added aws/gcp/azure to BUILTIN_NAMES | | `src/cleveragents/application/services/resource_registry_service.py` | Modified - Registered cloud types in _BUILTIN_TYPES | | `src/cleveragents/resource/handlers/__init__.py` | Modified - Export CloudResourceHandler | | `features/cloud_resources.feature` | **New** - 29 BDD scenarios | | `features/steps/cloud_resources_steps.py` | **New** - Step definitions | | `robot/cloud_resources.robot` | **New** - 9 Robot integration tests | | `robot/helper_cloud_resources.py` | **New** - Robot test helper | | `benchmarks/cloud_resource_bench.py` | **New** - ASV benchmarks | | `docs/reference/cloud_resources.md` | **New** - Documentation |
Author
Owner

PM Acknowledgment (Day 31):

Thank you @freemo. PR submitted and tracked.

Status: All server/UI PRs have merge conflicts against current develop (17 PRs merged Days 30-31). Please rebase when ready for review.

Priority: M6 work — continue at current pace. Your velocity is strong (5 merges Day 30).

**PM Acknowledgment (Day 31)**: Thank you @freemo. PR submitted and tracked. **Status**: All server/UI PRs have merge conflicts against current develop (17 PRs merged Days 30-31). Please rebase when ready for review. **Priority**: M6 work — continue at current pace. Your velocity is strong (5 merges Day 30).
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".

2026-03-20

Reference
cleveragents/cleveragents-core#343
No description provided.