fix: tighten agent patch hygiene
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 03:02:42 +02:00
parent 25ed6a8439
commit c2028fa256
4 changed files with 38 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
from __future__ import annotations
from lai_automation.agent import MiniSWEAgentRunner
from lai_automation.agent import _SYSTEM_TEMPLATE, MiniSWEAgentRunner
from lai_automation.models import Issue
@@ -18,3 +18,10 @@ def test_task_uses_issue_text_not_github_parser() -> None:
assert "Issue #42: Wrong result" in task
assert issue.html_url in task
assert issue.body in task
def test_system_prompt_requires_precise_diff_hygiene() -> None:
assert "Never create backup files" in _SYSTEM_TEMPLATE
assert "Preserve unrelated lines exactly" in _SYSTEM_TEMPLATE
assert "inspect all key columns and cardinality" in _SYSTEM_TEMPLATE
assert "remove trailing spaces" in _SYSTEM_TEMPLATE