Guide tenant repair tests to owning behavior
This commit is contained in:
@@ -40,7 +40,9 @@ Tenant routing fact:
|
||||
The customer has already selected one tenant database. SQL inside that database must not
|
||||
invent an additional customer discriminator column. Use only columns present in tracked
|
||||
schema/semantics, and fix SQL-generation guidance rather than rewriting one unknown column
|
||||
to another guessed column.
|
||||
to another guessed column. TenantDatabaseService records the explicit source type in
|
||||
database.connections.<connection>.tenant_type; use that metadata instead of database-name
|
||||
patterns or heuristics.
|
||||
"""
|
||||
|
||||
return f"""You are fixing failure report #{report.id} in the Laravel AI Chat repository.
|
||||
@@ -93,5 +95,8 @@ Correct the existing changes using this test output:
|
||||
{failure}
|
||||
|
||||
Keep the regression test meaningful. Do not remove or weaken tests, safety checks,
|
||||
authentication, authorization, SQL validation, or tenant isolation. Do not commit or push.
|
||||
authentication, authorization, SQL validation, or tenant isolation. If a new test calls an
|
||||
unrelated specialized code path that correctly returns no result, repair the test to exercise
|
||||
the owning production behavior; never broaden unrelated production routing merely to make the
|
||||
test pass. Do not commit or push.
|
||||
"""
|
||||
|
||||
@@ -59,6 +59,7 @@ 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
|
||||
assert "unrelated production routing" in task
|
||||
|
||||
|
||||
def test_customer_database_task_explains_tenant_scope() -> None:
|
||||
@@ -82,3 +83,4 @@ def test_customer_database_task_explains_tenant_scope() -> None:
|
||||
assert "already selected one tenant database" in task
|
||||
assert "must not" in task
|
||||
assert "guessed column" in task
|
||||
assert "tenant_type" in task
|
||||
|
||||
Reference in New Issue
Block a user