@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"
