Make agent validation self-correcting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from lai_automation.models import FailureReport
|
||||
from lai_automation.prompt import build_task, redact
|
||||
from lai_automation.prompt import build_retry_task, build_task, redact
|
||||
|
||||
|
||||
def test_redact_removes_common_secrets_and_personal_markers() -> None:
|
||||
@@ -51,3 +51,11 @@ def test_redact_removes_extended_credentials() -> None:
|
||||
assert "eyJhbGci" not in result
|
||||
assert "database-password" not in result
|
||||
assert "private-material" not in result
|
||||
|
||||
|
||||
def test_retry_task_contains_failure_without_secrets() -> None:
|
||||
task = build_retry_task(RuntimeError("Missing import; token=secret-value"))
|
||||
|
||||
assert "Missing import" in task
|
||||
assert "secret-value" not in task
|
||||
assert "Do not remove or weaken tests" in task
|
||||
|
||||
Reference in New Issue
Block a user