Plan complex repairs before editing
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-08-28 14:14:43 +02:00
parent 34bf645957
commit 886cdbf7ef
4 changed files with 27 additions and 1 deletions

View File

@@ -27,8 +27,19 @@ def test_aider_command_adds_existing_routed_files(tmp_path) -> None:
("app/Http/Controllers/ChatController.php", "missing.php"),
)
assert command[-2:] == ["--file", "app/Http/Controllers/ChatController.php"]
assert ["--file", "app/Http/Controllers/ChatController.php"] == command[
command.index("--file"):command.index("--file") + 2
]
assert "missing.php" not in command
assert "--architect" in command
assert command[command.index("--editor-model") + 1] == "mistral/test"
assert command[command.index("--editor-edit-format") + 1] == "udiff"
def test_unrouted_aider_command_stays_in_direct_edit_mode() -> None:
command = AiderAgent(settings()).command(Path("/repo/.git/task.txt"))
assert "--architect" not in command
def test_aider_environment_does_not_include_database_credentials(tmp_path, monkeypatch) -> None:

View File

@@ -200,6 +200,9 @@ 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 "editing only config/*_semantics.php or tests is an invalid repair" in task
assert "describe the data" in task
assert "flow, connection used at each stage" in task
assert repair_files(report) == (
"app/Http/Controllers/ChatController.php",
"app/Services/TenantDatabaseService.php",