feat: replace Aider with secure mini-SWE-agent worker
Some checks failed
CI / test (push) Has been cancelled
CI / test (pull_request) Has been cancelled

This commit is contained in:
Christian Meyer
2026-08-31 02:46:58 +02:00
parent 582db3a654
commit 25ed6a8439
30 changed files with 4215 additions and 2148 deletions

45
tests/conftest.py Normal file
View File

@@ -0,0 +1,45 @@
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,
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",
},
)