Feature: Domain Models Validation As a developer I want to ensure domain models are properly validated So that data integrity is maintained Scenario: Create valid Project model Given I have valid project data When I create a Project model Then the project model should be created successfully And the project name should be validated And the project path should be absolute Scenario: Project name validation Given I have project data with invalid name "123!@#" When I try to create a Project model Then a validation error should be raised And the error should mention "Name must be alphanumeric" Scenario: Create valid Plan model Given I have valid plan data When I create a Plan model Then the plan model should be created successfully And the plan status should be "pending" And the plan should have timestamps Scenario: Plan status transitions Given I have a plan with status "pending" When I update the plan status to "building" Then the updated plan status should be "building" And the updated_at timestamp should be updated Scenario: Create valid Context model Given I have valid context data When I create a Context model Then the context model should be created successfully And the context type should be "file" And the context should have a path Scenario: Create valid Change model Given I have valid change data When I create a Change model Then the change model should be created successfully And the change operation should be valid And the change should not be applied by default Scenario: ChangeSet statistics Given I have a changeset with multiple changes When I get the changeset statistics Then the stats should show correct counts And the stats should count creates, modifies, and deletes Scenario: Import auto-generated models When I import the auto-generated models Then all models should load without errors And the models should have proper Pydantic configuration # TODO: Uncomment when step definitions are implemented # Scenario: Create an AIModel with default values # Given I create an "AIModel" with the following data: # | name | value | # | provider_id | test | # | model_id | test | # Then the "AIModel" object should have the following attributes: # | name | value | # | provider_id | test | # | model_id | test | # | is_chat | False | # | is_image_to_text | False | # | is_multi_modal | False | # | is_fine_tunable | False | # | is_function_calling | False | # # TODO: Uncomment when step definitions are implemented # Scenario: Create a Provider with default values # Given I create a "Provider" with the following data: # | name | value | # | provider_id | test | # | name | test | # Then the "Provider" object should have the following attributes: # | name | value | # | provider_id | test | # | name | test | # # TODO: Uncomment when step definitions are implemented # Scenario: Create a CustomAIModel with default values # Given I create a "CustomAIModel" with the following data: # | name | value | # | provider_id | test | # | model_id | test | # Then the "CustomAIModel" object should have the following attributes: # | name | value | # | provider_id | test | # | model_id | test | # | is_chat | False | # | is_image_to_text | False | # | is_multi_modal | False | # | is_fine_tunable | False | # | is_function_calling | False | Scenario: Context update result aggregates statistics Given I have context update statistics When I create a ContextUpdateResult summary Then the context update summary should report correct totals And the token diffs should remain non-negative Scenario: Context update summary parameters accept camelCase payloads Given I have summary counts for context updates When I create a SummaryForUpdateContextParams model Then the summary counts should match the source data Scenario: Create cloud billing fields from camelCase payload Given I have sample cloud billing data When I create a CloudBillingFields model Then the billing fields should expose decimal values Scenario: Create organization with billing fields Given I have organization data with billing When I create an Org domain model Then the org should include billing configuration Scenario: Create a user with default plan config Given I have user data referencing a default plan config When I create a User model Then the user should include the default plan config Scenario: Create an org role definition Given I have an org role definition When I create an OrgRole model Then the org role should retain its label Scenario: Create an org user association Given I have an org user association When I create an OrgUser model Then the org user config should be attached Scenario: Create an invite record with timestamps Given I have invite metadata When I create an Invite model Then the invite should track acceptance timestamps Scenario: Create a credits transaction entry Given I have credits transaction data When I create a CreditsTransaction model Then the credits transaction should track balances