Feature: Resource type name/namespace must start with a letter
  The spec requires that namespace and name components in the
  ``[[server:]namespace/]name`` format start with a letter.
  The ``_NAMESPACED_RE`` pattern in both ``resource_type.py`` and
  ``_resource_type_validation.py`` must enforce this constraint.

  Background:
    Given the resource type model module is imported

  # -- Rejection of digit-starting namespace --------------------------------

  Scenario: Custom resource type with digit-starting namespace is rejected
    When I create a custom resource type with name "123abc/my-type"
    Then a validation error should be raised mentioning invalid resource type name

  Scenario: Custom resource type with digit-starting name component is rejected
    When I create a custom resource type with name "local/456-type"
    Then a validation error should be raised mentioning invalid resource type name

  Scenario: Custom resource type with digit-starting both components is rejected
    When I create a custom resource type with name "1ns/2name"
    Then a validation error should be raised mentioning invalid resource type name

  # -- Valid namespaced names still accepted --------------------------------

  Scenario: Custom resource type with letter-starting namespace and name is accepted
    When I create a custom resource type with name "local/my-type"
    Then no validation error should be raised

  Scenario: Custom resource type with org-style name is accepted
    When I create a custom resource type with name "myorg/custom-db"
    Then no validation error should be raised

  Scenario: Custom resource type with underscore in namespace is accepted
    When I create a custom resource type with name "my_org/my_type"
    Then no validation error should be raised

  # -- Digit-starting names rejected via inherits field ---------------------

  Scenario: inherits field with digit-starting namespace is rejected
    When I create a resource type spec with inherits set to "123abc/parent-type"
    Then a validation error should be raised mentioning invalid inherits type name

  Scenario: inherits field with digit-starting name component is rejected
    When I create a resource type spec with inherits set to "myorg/456-parent"
    Then a validation error should be raised mentioning invalid inherits type name
