Files
freemo bc8eaeebcb fix(resource): add overlay to ResourceTypeConfigSchema._VALID_STRATEGIES
Implemented test coverage and documentation updates to ensure overlay is properly recognized and communicated across the sandbox strategy validation surface.

- Verification: Confirmed that overlay already exists in the _VALID_STRATEGIES frozenset within src/cleveragents/resource/schema.py (introduced in a prior commit that closed issue #2827).
- Comprehensive audit: Audited strategy validation points to ensure consistency:
  - _VALID_STRATEGIES in schema.py
  - _IMPLEMENTED_STRATEGIES and _SUPPORTED_STRATEGIES in factory.py
  - SandboxStrategy enum definitions in both resource.py and resource_type.py
  All include overlay as an allowed strategy.
- Tests: Added a new BDD scenario titled: "Invalid sandbox_strategy error message lists overlay as allowed" to features/consolidated_resource.feature. This asserts that validation errors explicitly list overlay among the allowed values when an invalid strategy is used.
- Documentation: Updated docstring in src/cleveragents/infrastructure/sandbox/strategy_registry.py to reflect that the built-in SandboxFactory handles six strategies, including snapshot and overlay.
- Design considerations: The fix itself was already applied in a previous commit (dbf3b8d7) addressing #2827. Issue #3614, raised by the UAT bot, required additional test coverage and accurate documentation of the available strategies.
- Impact: No behavioral changes beyond ensuring test coverage and documentation are aligned with the existing implementation. The added test guarantees that error messages remain accurate and comprehensive as strategies evolve.
- Affected areas: resource/schema.py, factory.py, resource.py, resource_type.py, features/consolidated_resource.feature, strategy_registry.py.

ISSUES CLOSED: #3614
2026-04-08 16:01:35 +00:00
..