Reject test-only agent repairs
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-08-28 00:18:21 +02:00
parent 6463394e7a
commit e97cbd7698
6 changed files with 102 additions and 7 deletions

View File

@@ -44,6 +44,8 @@ def evaluate_changes(
errors: list[str] = []
if not summary.files:
errors.append("Agent produced no file changes")
elif all(filename.startswith("tests/") for filename in summary.files):
errors.append("Agent changed only tests; production behavior was not fixed")
if len(summary.files) > settings.max_changed_files:
errors.append(f"Changed {len(summary.files)} files; limit is {settings.max_changed_files}")
if summary.changed_lines > settings.max_changed_lines: