Files
cleveragents-core/features/devcontainer_sandbox_strategy.feature
T
HAL9000 619e8eff36 feat(resource): add --clone-into to container-instance and fix devcontainer-instance sandbox strategy
- Adds a --clone-into option to the container-instance command to clone repository contents into a specified path during container setup.
- Fixes the devcontainer-instance sandbox strategy to ensure proper isolation, correct mount permissions, and deterministic behavior across environments.
- Updates related validation and error handling to reflect the new option and sandbox changes.

ISSUES CLOSED: #7555
2026-06-02 20:37:35 -04:00

59 lines
3.0 KiB
Gherkin

@devcontainer-sandbox
Feature: devcontainer-instance uses snapshot sandbox strategy
As a CleverAgents developer
I want devcontainer-instance resources to use the snapshot sandbox strategy
So that plan execution inside containers is safely isolated
# DevcontainerHandler default strategy
Scenario: DevcontainerHandler default strategy is snapshot
When I inspect DevcontainerHandler class attributes
Then the DevcontainerHandler _default_strategy should be "snapshot"
# ── devcontainer-instance resource type spec ───────────────
Scenario: devcontainer-instance resource type has snapshot sandbox strategy
When I look up the "devcontainer-instance" resource type spec
Then the spec sandbox_strategy should be "snapshot"
# ── devcontainer-instance child types ──────────────────────
Scenario: devcontainer-instance child_types includes container-mount
When I look up the "devcontainer-instance" resource type spec
Then the spec child_types should contain "container-mount"
Scenario: devcontainer-instance child_types includes container-exec-env
When I look up the "devcontainer-instance" resource type spec
Then the spec child_types should contain "container-exec-env"
Scenario: devcontainer-instance child_types includes container-port
When I look up the "devcontainer-instance" resource type spec
Then the spec child_types should contain "container-port"
Scenario: devcontainer-instance child_types includes devcontainer-file
When I look up the "devcontainer-instance" resource type spec
Then the spec child_types should contain "devcontainer-file"
# ── ContainerLifecycleState initial state ──────────────────
Scenario: ContainerLifecycleTracker default state is discovered
When I create a new ContainerLifecycleTracker for resource "01SANDBOX0000000000000001"
Then the tracker initial state should be "discovered"
Scenario: ContainerLifecycleState has discovered value
When I inspect ContainerLifecycleState enum values
Then the lifecycle enum values should contain "discovered"
And the lifecycle enum values should not contain "detected"
# ── BUILTIN_TYPES registration ─────────────────────────────
Scenario: devcontainer-instance in BUILTIN_TYPES has snapshot strategy
When I look up "devcontainer-instance" in BUILTIN_TYPES
Then the BUILTIN_TYPES entry sandbox_strategy should be "snapshot"
Scenario: devcontainer-instance in BUILTIN_TYPES has correct child_types
When I look up "devcontainer-instance" in BUILTIN_TYPES
Then the BUILTIN_TYPES entry child_types should include "container-mount"
And the BUILTIN_TYPES entry child_types should include "container-exec-env"
And the BUILTIN_TYPES entry child_types should include "container-port"