Route agents to owning application files
Some checks failed
CI / test (push) Has been cancelled

This commit is contained in:
2026-08-28 13:39:37 +02:00
parent 75894f8b52
commit 0f2f131034
6 changed files with 57 additions and 8 deletions

View File

@@ -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)