@container-id
Feature: container-instance --container-id flag
  Verifies that resource add container-instance accepts --container-id
  as an alternative to --image, enforces mutual exclusion, and that
  the DevcontainerHandler fast path returns the stored container ID.

  Scenario: Happy path - container-instance with --container-id stores the ID
    Given a resource registry service for container_id
    When I add a container-instance with container-id "abc123def456" for container_id
    Then the container_id resource should have container_id "abc123def456"

  Scenario: Mutual exclusion - providing both --container-id and --image fails
    When I validate container-instance with both container-id "abc123" and image "ubuntu:latest" for container_id
    Then container_id validation should fail with "mutually exclusive"

  Scenario: Neither provided - container-instance without --image or --container-id fails
    When I validate container-instance with neither container-id nor image for container_id
    Then container_id validation should fail with "require either"

  Scenario: Wrong type - --container-id on git-checkout fails
    When I validate type "git-checkout" with container-id "abc123" for container_id
    Then container_id validation should fail with "only valid for container-instance"

  Scenario: Handler fast path - _find_running_container returns stored container_id
    Given a resource with container_id "abc123def456" in properties for container_id
    When I call _find_running_container for container_id
    Then the container_id result should be "abc123def456"
