from __future__ import annotations from pathlib import Path import pytest from lai_automation.config import Settings @pytest.fixture def settings(tmp_path: Path) -> Settings: return Settings( source_repository="https://gitea.example.test/owner/lai.git", source_branch="main", workspace_root=tmp_path, gitea_url="https://gitea.example.test", gitea_owner="owner", gitea_repository="lai", gitea_token="top-secret-token", gitea_username="automation-bot", queued_label="ai:queued", running_label="ai:running", ready_label="ai:ready", failed_label="ai:failed", poll_seconds=60, worker_id="test-worker", agent_model="mistral/devstral-latest", agent_model_api_base="", agent_command_timeout_seconds=180, agent_wall_time_seconds=1200, agent_step_limit=40, agent_cost_limit=5.0, max_agent_attempts=1, agent_user="coder", setup_commands=("composer install",), test_commands=("php artisan test",), max_changed_files=12, max_changed_lines=800, test_environment={ "APP_ENV": "testing", "DB_DATABASE": "lai_agent_test", "TEST_CUSTOMER_DB": "customer_agent_test", "TEST_CONFIG_DB": "config_agent_test", "DB_PASSWORD": "isolated-test-password", }, )