Feature: ResourceType domain model coverage
  Scenarios exercising previously uncovered code paths in
  src/cleveragents/domain/models/core/resource_type.py.

  Background:
    Given the resource type model module is imported

  # -- validate_inherits: invalid format (lines 325-326) ---------------------

  Scenario: Invalid inherits name is rejected
    When I create a resource type spec with inherits set to an invalid name
    Then a validation error should be raised mentioning invalid inherits type name

  # -- validate_capabilities: fill missing keys (line 360) --------------------

  Scenario: Capabilities dict with missing keys gets defaults filled in
    When I create a resource type spec with capabilities missing some keys
    Then the resulting capabilities should contain all expected keys with defaults

  # -- validate_capabilities: non-boolean value (lines 368-370) ---------------

  Scenario: Non-boolean capability value is rejected
    When I create a resource type spec with a non-boolean capability value
    Then a validation error should be raised mentioning capability must be a boolean

  # -- _validate_model: virtual type missing criteria key (lines 397-398) -----

  Scenario: Virtual type equivalence without criteria key is rejected
    When I create a virtual resource type with equivalence missing the criteria key
    Then a validation error should be raised mentioning equivalence must contain criteria

  # -- _validate_model: virtual type user_addable (lines 419-420) -------------

  Scenario: Virtual type that is user-addable is rejected
    When I create a virtual resource type that is user addable
    Then a validation error should be raised mentioning virtual must not be user addable

  # -- _validate_model: virtual type wrong sandbox strategy (lines 424-425) ---

  Scenario: Virtual type with non-none sandbox strategy is rejected
    When I create a virtual resource type with a non-none sandbox strategy
    Then a validation error should be raised mentioning virtual must have sandbox strategy none

  # -- _validate_model: virtual type with handler (lines 429-430) -------------

  Scenario: Virtual type with a handler is rejected
    When I create a virtual resource type with a handler set
    Then a validation error should be raised mentioning virtual must not have a handler

  # -- _validate_model: virtual type capabilities not all false (lines 437-438)

  Scenario: Virtual type with true capabilities is rejected
    When I create a virtual resource type with a true capability
    Then a validation error should be raised mentioning virtual must have all capabilities false

  # -- _validate_model: self-inheritance (line 444) ---------------------------

  Scenario: Resource type that inherits from itself is rejected
    When I create a resource type spec that inherits from itself
    Then a validation error should be raised mentioning cannot inherit from itself

  # -- _validate_model: built-in inherits from custom (lines 447-448) ---------

  Scenario: Built-in type inheriting from a custom namespaced type is rejected
    When I create a built-in resource type that inherits from a custom type
    Then a validation error should be raised mentioning built-in cannot inherit from custom

  # -- as_cli_dict with inherits set (line 537) --------------------------------

  Scenario: as_cli_dict includes inherits when set
    Given a valid physical resource type spec with inherits set
    When I call as_cli_dict on the spec
    Then the resulting dict should contain the inherits key
