From 2453ce884d7552bebe7dd46eda7cfd87904ccc10 Mon Sep 17 00:00:00 2001 From: OpenHarness Self-Heal Date: Sat, 18 Jul 2026 12:09:54 +0000 Subject: [PATCH] Fix controlled-failure crash in run skill The 'run' skill raised RuntimeError for scenario='controlled-failure', causing HTTP500 in production. Return the safe recovered result instead, matching the existing regression test. Fingerprint: 8c31f04b20bc68ab54843d6f --- agent.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/agent.py b/agent.py index 72a859a..80ae633 100644 --- a/agent.py +++ b/agent.py @@ -23,7 +23,7 @@ class SelfHealingDemo(A2AAgent): scenario: str = "normal", ) -> dict[str, object]: if scenario == "controlled-failure": - # Intentional smoke fixture: the regression test specifies the safe - # result. The production self-healing worker must repair this source. - raise RuntimeError("SELF_HEAL_SMOKE: controlled invoice total handler crashed") + # Repaired: the controlled invoice total handler previously raised a + # RuntimeError. It now returns the safe recovered result. + return {"ok": True, "scenario": scenario, "result": "recovered"} return {"ok": True, "scenario": scenario, "result": "healthy"}