Retry incomplete agent repairs safely
This commit is contained in:
@@ -59,3 +59,26 @@ def test_retry_task_contains_failure_without_secrets() -> None:
|
||||
assert "Missing import" in task
|
||||
assert "secret-value" not in task
|
||||
assert "Do not remove or weaken tests" in task
|
||||
|
||||
|
||||
def test_customer_database_task_explains_tenant_scope() -> None:
|
||||
report = FailureReport(
|
||||
id=13,
|
||||
chat_message_id=1,
|
||||
source="automatic",
|
||||
category="sql_execution",
|
||||
user_feedback=None,
|
||||
feedback_type=None,
|
||||
expected_behavior=None,
|
||||
prompt="What did this customer buy most?",
|
||||
response=None,
|
||||
sql_query="SELECT * FROM invoice_row WHERE InvoiceCreator = 'tenant'",
|
||||
error_message="Unknown column InvoiceCreator",
|
||||
context={"database_type": "customer"},
|
||||
)
|
||||
|
||||
task = build_task(report)
|
||||
|
||||
assert "already selected one tenant database" in task
|
||||
assert "must not" in task
|
||||
assert "guessed column" in task
|
||||
|
||||
Reference in New Issue
Block a user