This commit is contained in:
@@ -15,6 +15,22 @@ def test_aider_command_cannot_mutate_git_configuration_or_send_analytics() -> No
|
||||
assert command[-4:] == ["--edit-format", "udiff", "--timeout", "180"]
|
||||
|
||||
|
||||
def test_aider_command_adds_existing_routed_files(tmp_path) -> None:
|
||||
git_dir = tmp_path / ".git"
|
||||
git_dir.mkdir()
|
||||
controller = tmp_path / "app/Http/Controllers/ChatController.php"
|
||||
controller.parent.mkdir(parents=True)
|
||||
controller.write_text("<?php\n")
|
||||
|
||||
command = AiderAgent(settings()).command(
|
||||
git_dir / "task.txt",
|
||||
("app/Http/Controllers/ChatController.php", "missing.php"),
|
||||
)
|
||||
|
||||
assert command[-2:] == ["--file", "app/Http/Controllers/ChatController.php"]
|
||||
assert "missing.php" not in command
|
||||
|
||||
|
||||
def test_aider_environment_does_not_include_database_credentials(tmp_path, monkeypatch) -> None:
|
||||
config = settings(workspace_root=tmp_path)
|
||||
workspace = tmp_path / "repo"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from lai_automation.models import FailureReport
|
||||
from lai_automation.prompt import build_retry_task, build_task, redact
|
||||
from lai_automation.prompt import build_retry_task, build_task, redact, repair_files
|
||||
|
||||
|
||||
def test_redact_removes_common_secrets_and_personal_markers() -> None:
|
||||
@@ -200,3 +200,8 @@ def test_cross_database_report_guides_staged_source_routing() -> None:
|
||||
assert "staged-query workflows" in task
|
||||
assert "Do not put an impossible cross-connection join" in task
|
||||
assert "preserving tenant isolation" in task
|
||||
assert repair_files(report) == (
|
||||
"app/Http/Controllers/ChatController.php",
|
||||
"app/Services/TenantDatabaseService.php",
|
||||
"tests/Unit/ChatControllerSourceResolutionTest.php",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user