UAT: bug(resource-registry): SandboxStrategy enum includes undocumented 'overlay' value not in spec #2932

Open
opened 2026-04-05 02:52:00 +00:00 by freemo · 4 comments
Owner

Metadata

  • Commit Message: fix(resource-registry): remove undocumented overlay sandbox strategy from SandboxStrategy enum
  • Branch: bugfix/sandbox-strategy-overlay-undocumented
  • Parent Epic: #353
  • Milestone: v3.1.0

Background and Context

The specification defines exactly five sandbox strategies:

SandboxStrategy JSON schema (lines 17135-17138):

  • git_worktree — Isolate via Git worktree
  • copy_on_write — Isolate via filesystem copy
  • transaction_rollback — Isolate via database transaction rollback
  • snapshot — Isolate via snapshot/restore
  • none — No isolation

The resource/schema.py _VALID_STRATEGIES correctly lists only these five values. However, the domain models and sandbox factory include an undocumented overlay strategy.

Current Behavior

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

class SandboxStrategy(StrEnum):
    GIT_WORKTREE = "git_worktree"
    COPY_ON_WRITE = "copy_on_write"
    TRANSACTION_ROLLBACK = "transaction_rollback"
    SNAPSHOT = "snapshot"
    OVERLAY = "overlay"   # ← Not in spec
    NONE = "none"

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

class SandboxStrategy(StrEnum):
    GIT_WORKTREE = "git_worktree"
    COPY_ON_WRITE = "copy_on_write"
    TRANSACTION_ROLLBACK = "transaction_rollback"
    SNAPSHOT = "snapshot"
    OVERLAY = "overlay"   # ← Not in spec
    NONE = "none"

In src/cleveragents/infrastructure/sandbox/factory.py:

STRATEGY_OVERLAY: Literal["overlay"] = "overlay"

The resource/schema.py correctly omits overlay from _VALID_STRATEGIES, creating an inconsistency: YAML-loaded resource types cannot use overlay, but domain-model-constructed types can.

Expected Behavior

The SandboxStrategy enum in both resource.py and resource_type.py should only contain the five spec-defined values. If overlay is needed as an internal implementation detail, it must be documented in the spec first. Until then, it should be removed from the public enum and the sandbox factory.

Acceptance Criteria

  • SandboxStrategy in resource.py contains only the 5 spec-defined values
  • SandboxStrategy in resource_type.py contains only the 5 spec-defined values
  • resource/schema.py _VALID_STRATEGIES remains consistent with the domain enums
  • Any code using OVERLAY is updated or removed
  • Unit tests verify that overlay is rejected as an invalid strategy

Subtasks

  • Remove OVERLAY from SandboxStrategy in resource.py
  • Remove OVERLAY from SandboxStrategy in resource_type.py
  • Update sandbox/factory.py to remove STRATEGY_OVERLAY or document it as internal
  • Search for any resource type definitions using overlay and update them
  • Add unit tests verifying the enum values match the spec
  • Run nox and ensure all sessions pass

Definition of Done

This issue is complete when:

  • All subtasks above 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.
  • 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.

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

## Metadata - **Commit Message**: `fix(resource-registry): remove undocumented overlay sandbox strategy from SandboxStrategy enum` - **Branch**: `bugfix/sandbox-strategy-overlay-undocumented` - **Parent Epic**: #353 - **Milestone**: v3.1.0 ## Background and Context The specification defines exactly five sandbox strategies: > **SandboxStrategy JSON schema (lines 17135-17138):** > - `git_worktree` — Isolate via Git worktree > - `copy_on_write` — Isolate via filesystem copy > - `transaction_rollback` — Isolate via database transaction rollback > - `snapshot` — Isolate via snapshot/restore > - `none` — No isolation The `resource/schema.py` `_VALID_STRATEGIES` correctly lists only these five values. However, the domain models and sandbox factory include an undocumented `overlay` strategy. ## Current Behavior In `src/cleveragents/domain/models/core/resource.py`: ```python class SandboxStrategy(StrEnum): GIT_WORKTREE = "git_worktree" COPY_ON_WRITE = "copy_on_write" TRANSACTION_ROLLBACK = "transaction_rollback" SNAPSHOT = "snapshot" OVERLAY = "overlay" # ← Not in spec NONE = "none" ``` In `src/cleveragents/domain/models/core/resource_type.py`: ```python class SandboxStrategy(StrEnum): GIT_WORKTREE = "git_worktree" COPY_ON_WRITE = "copy_on_write" TRANSACTION_ROLLBACK = "transaction_rollback" SNAPSHOT = "snapshot" OVERLAY = "overlay" # ← Not in spec NONE = "none" ``` In `src/cleveragents/infrastructure/sandbox/factory.py`: ```python STRATEGY_OVERLAY: Literal["overlay"] = "overlay" ``` The `resource/schema.py` correctly omits `overlay` from `_VALID_STRATEGIES`, creating an inconsistency: YAML-loaded resource types cannot use `overlay`, but domain-model-constructed types can. ## Expected Behavior The `SandboxStrategy` enum in both `resource.py` and `resource_type.py` should only contain the five spec-defined values. If `overlay` is needed as an internal implementation detail, it must be documented in the spec first. Until then, it should be removed from the public enum and the sandbox factory. ## Acceptance Criteria - [ ] `SandboxStrategy` in `resource.py` contains only the 5 spec-defined values - [ ] `SandboxStrategy` in `resource_type.py` contains only the 5 spec-defined values - [ ] `resource/schema.py` `_VALID_STRATEGIES` remains consistent with the domain enums - [ ] Any code using `OVERLAY` is updated or removed - [ ] Unit tests verify that `overlay` is rejected as an invalid strategy ## Subtasks - [ ] Remove `OVERLAY` from `SandboxStrategy` in `resource.py` - [ ] Remove `OVERLAY` from `SandboxStrategy` in `resource_type.py` - [ ] Update `sandbox/factory.py` to remove `STRATEGY_OVERLAY` or document it as internal - [ ] Search for any resource type definitions using `overlay` and update them - [ ] Add unit tests verifying the enum values match the spec - [ ] Run `nox` and ensure all sessions pass ## Definition of Done This issue is complete when: - All subtasks above 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. - 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**. --- **Automated by CleverAgents Bot** Supervisor: UAT Testing | Agent: ca-uat-tester
Author
Owner

Label compliance fix applied:

  • Added missing labels: Priority/Medium, State/Unverified, Type/Bug
  • Reason: Issue was missing all required labels per CONTRIBUTING.md. Inferred Type/Bug from the "UAT: bug" prefix. Applied Priority/Medium and State/Unverified as defaults.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Label compliance fix applied: - Added missing labels: `Priority/Medium`, `State/Unverified`, `Type/Bug` - Reason: Issue was missing all required labels per CONTRIBUTING.md. Inferred `Type/Bug` from the "UAT: bug" prefix. Applied `Priority/Medium` and `State/Unverified` as defaults. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Confirmed
  • MoSCoW: Should Have

Valid finding verified during batch triage.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: Confirmed - **MoSCoW**: Should Have Valid finding verified during batch triage. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo added this to the v3.2.0 milestone 2026-04-05 04:49:25 +00:00
Author
Owner

Milestone compliance fix applied:

  • Assigned to milestone: v3.2.0
  • Reason: Issue is State/Verified (ready for implementation) but had no milestone. Issue body references Milestone: v3.1.0 which is no longer an active open milestone. Assigned to the earliest active milestone v3.2.0 as the appropriate target.

Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Milestone compliance fix applied: - Assigned to milestone: `v3.2.0` - Reason: Issue is `State/Verified` (ready for implementation) but had no milestone. Issue body references `Milestone: v3.1.0` which is no longer an active open milestone. Assigned to the earliest active milestone `v3.2.0` as the appropriate target. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
freemo removed this from the v3.2.0 milestone 2026-04-06 22:28:16 +00:00
Author
Owner

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.

This issue has been moved to the backlog as part of an aggressive grooming of the v3.2.0 milestone. It has been deemed non-critical for the minimal viability of the milestone and will be addressed in a future release.
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#2932
No description provided.