UAT: docs/schema/resource_type.schema.yaml missing overlay sandbox_strategy enum value — schema diverges from SandboxStrategy domain model #3914

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

Metadata

  • Branch: fix/resource-type-schema-overlay-sandbox-strategy
  • Commit Message: fix(schema): add missing overlay value to sandbox_strategy enum in resource_type.schema.yaml
  • Milestone: Backlog (see note below)
  • Parent Epic: #398

Background

The docs/schema/resource_type.schema.yaml YAML schema file defines the sandbox_strategy field enum but is missing the overlay value that exists in the SandboxStrategy domain model enum in src/cleveragents/domain/models/core/resource_type.py. This causes any schema-based validator to incorrectly reject resource type configurations that use sandbox_strategy: overlay, even though overlay is a fully supported and tested strategy.

Problem Description

docs/schema/resource_type.schema.yaml line 57 defines:

sandbox_strategy:
  type: string
  required: true
  enum: [git_worktree, copy_on_write, transaction_rollback, snapshot, none]

But SandboxStrategy in src/cleveragents/domain/models/core/resource_type.py has 6 values:

class SandboxStrategy(StrEnum):
    GIT_WORKTREE = "git_worktree"
    COPY_ON_WRITE = "copy_on_write"
    TRANSACTION_ROLLBACK = "transaction_rollback"
    SNAPSHOT = "snapshot"
    OVERLAY = "overlay"  # <-- MISSING from schema
    NONE = "none"

The overlay strategy is also present in src/cleveragents/domain/models/core/resource.py. Existing BDD tests in features/consolidated_sandbox.feature confirm that overlay is a valid and actively used strategy:

  • "The overlay strategy is supported"
  • "A fs-mount resource supports copy-on-write, overlay, and none"
  • "A fs-directory resource supports copy-on-write, overlay, and none"

Impact

  • Any resource type configuration validator using resource_type.schema.yaml will incorrectly reject sandbox_strategy: overlay as invalid.
  • The schema is inconsistent with the domain model and existing test coverage.
  • Users creating custom resource types with the overlay sandbox strategy will receive confusing validation errors.

Code Locations

  • docs/schema/resource_type.schema.yaml line 57 — sandbox_strategy enum missing overlay
  • src/cleveragents/domain/models/core/resource_type.pySandboxStrategy enum has OVERLAY
  • src/cleveragents/domain/models/core/resource.pySandboxStrategy enum also has OVERLAY
  • features/consolidated_sandbox.feature — BDD tests confirm overlay is a valid strategy

Subtasks

  • Add a TDD issue-capture BDD scenario in features/ tagged @tdd_expected_fail that validates resource_type.schema.yaml accepts sandbox_strategy: overlay
  • Add overlay to the sandbox_strategy enum in docs/schema/resource_type.schema.yaml (line 57)
  • Verify both SandboxStrategy enums in resource_type.py and resource.py are fully reflected in the schema
  • Run nox -e lint and nox -e typecheck to confirm no regressions
  • Run nox -e unit_tests to confirm the TDD capture test now passes
  • Run nox -e coverage_report to confirm coverage remains ≥ 97%

Definition of Done

  • All subtasks above are checked off
  • docs/schema/resource_type.schema.yaml sandbox_strategy enum includes all 6 values: git_worktree, copy_on_write, transaction_rollback, snapshot, overlay, none
  • The schema enum is kept in sync with SandboxStrategy in both resource_type.py and resource.py
  • A BDD scenario confirms schema validation accepts sandbox_strategy: overlay
  • The commit is created with the exact first-line message from Metadata
  • The commit is pushed to the branch specified in Metadata
  • A Pull Request is created, reviewed (≥ 2 approvals), and merged
  • All nox stages pass
  • Coverage >= 97%

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.


Automated by CleverAgents Bot
Supervisor: Acting on behalf of: UAT Testing | Agent: ca-new-issue-creator

## Metadata - **Branch**: `fix/resource-type-schema-overlay-sandbox-strategy` - **Commit Message**: `fix(schema): add missing overlay value to sandbox_strategy enum in resource_type.schema.yaml` - **Milestone**: Backlog (see note below) - **Parent Epic**: #398 ## Background The `docs/schema/resource_type.schema.yaml` YAML schema file defines the `sandbox_strategy` field enum but is missing the `overlay` value that exists in the `SandboxStrategy` domain model enum in `src/cleveragents/domain/models/core/resource_type.py`. This causes any schema-based validator to incorrectly reject resource type configurations that use `sandbox_strategy: overlay`, even though `overlay` is a fully supported and tested strategy. ## Problem Description `docs/schema/resource_type.schema.yaml` line 57 defines: ```yaml sandbox_strategy: type: string required: true enum: [git_worktree, copy_on_write, transaction_rollback, snapshot, none] ``` But `SandboxStrategy` in `src/cleveragents/domain/models/core/resource_type.py` has 6 values: ```python class SandboxStrategy(StrEnum): GIT_WORKTREE = "git_worktree" COPY_ON_WRITE = "copy_on_write" TRANSACTION_ROLLBACK = "transaction_rollback" SNAPSHOT = "snapshot" OVERLAY = "overlay" # <-- MISSING from schema NONE = "none" ``` The `overlay` strategy is also present in `src/cleveragents/domain/models/core/resource.py`. Existing BDD tests in `features/consolidated_sandbox.feature` confirm that `overlay` is a valid and actively used strategy: - "The overlay strategy is supported" - "A fs-mount resource supports copy-on-write, overlay, and none" - "A fs-directory resource supports copy-on-write, overlay, and none" ## Impact - Any resource type configuration validator using `resource_type.schema.yaml` will incorrectly reject `sandbox_strategy: overlay` as invalid. - The schema is inconsistent with the domain model and existing test coverage. - Users creating custom resource types with the overlay sandbox strategy will receive confusing validation errors. ## Code Locations - `docs/schema/resource_type.schema.yaml` line 57 — `sandbox_strategy` enum missing `overlay` - `src/cleveragents/domain/models/core/resource_type.py` — `SandboxStrategy` enum has `OVERLAY` - `src/cleveragents/domain/models/core/resource.py` — `SandboxStrategy` enum also has `OVERLAY` - `features/consolidated_sandbox.feature` — BDD tests confirm overlay is a valid strategy ## Subtasks - [ ] Add a TDD issue-capture BDD scenario in `features/` tagged `@tdd_expected_fail` that validates `resource_type.schema.yaml` accepts `sandbox_strategy: overlay` - [ ] Add `overlay` to the `sandbox_strategy` enum in `docs/schema/resource_type.schema.yaml` (line 57) - [ ] Verify both `SandboxStrategy` enums in `resource_type.py` and `resource.py` are fully reflected in the schema - [ ] Run `nox -e lint` and `nox -e typecheck` to confirm no regressions - [ ] Run `nox -e unit_tests` to confirm the TDD capture test now passes - [ ] Run `nox -e coverage_report` to confirm coverage remains ≥ 97% ## Definition of Done - [ ] All subtasks above are checked off - [ ] `docs/schema/resource_type.schema.yaml` `sandbox_strategy` enum includes all 6 values: `git_worktree`, `copy_on_write`, `transaction_rollback`, `snapshot`, `overlay`, `none` - [ ] The schema enum is kept in sync with `SandboxStrategy` in both `resource_type.py` and `resource.py` - [ ] A BDD scenario confirms schema validation accepts `sandbox_strategy: overlay` - [ ] The commit is created with the exact first-line message from Metadata - [ ] The commit is pushed to the branch specified in Metadata - [ ] A Pull Request is created, reviewed (≥ 2 approvals), and merged - [ ] All nox stages pass - [ ] Coverage >= 97% > **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. --- **Automated by CleverAgents Bot** Supervisor: Acting on behalf of: 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
#398 Epic: Post-MVP Resources
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#3914
No description provided.