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

@@ -152,3 +152,27 @@ def test_customer_database_task_explains_tenant_scope() -> None:
assert "must not" in task
assert "guessed column" in task
assert "tenant_type" in task
def test_unresolved_placeholder_task_guides_real_answer_path() -> None:
report = FailureReport(
id=49,
chat_message_id=1,
source="user_feedback",
category="incorrect_answer",
user_feedback="Token was not restored",
feedback_type="wrong_result",
expected_behavior="Return the database value",
prompt="Average price",
response="Price: __LAI_UNKNOWN_VALUE__",
sql_query="SELECT AVG(price)",
error_message=None,
context={"database_type": "erp"},
)
task = build_task(report)
assert "AIService::generateDatabaseResponse" in task
assert "exact token map" in task
assert "HTTP-backed AIService test" in task
assert "local database-result fallback" in task