This commit is contained in:
@@ -59,6 +59,23 @@ def redact(value: str | None) -> str:
|
||||
return result[:12_000]
|
||||
|
||||
|
||||
def repair_files(report: FailureReport) -> tuple[str, ...]:
|
||||
expected = f"{report.user_feedback or ''}\n{report.expected_behavior or ''}".lower()
|
||||
if "cockpit_config" in expected and ("fk_" in expected or "erp" in expected):
|
||||
return (
|
||||
"app/Http/Controllers/ChatController.php",
|
||||
"app/Services/TenantDatabaseService.php",
|
||||
"tests/Unit/ChatControllerSourceResolutionTest.php",
|
||||
)
|
||||
if '__LAI_' in (report.response or ''):
|
||||
return (
|
||||
"app/Services/AIService.php",
|
||||
"app/Http/Controllers/ChatController.php",
|
||||
"tests/Feature/AIPrivacyBoundaryTest.php",
|
||||
)
|
||||
return ()
|
||||
|
||||
|
||||
def build_task(report: FailureReport) -> str:
|
||||
prompt = redact(report.prompt)
|
||||
feedback = redact(report.user_feedback)
|
||||
|
||||
Reference in New Issue
Block a user