This commit is contained in:
a2a-platform
2026-07-18 12:28:53 +00:00
parent 2453ce884d
commit cc0a37e9fa
3 changed files with 6 additions and 18 deletions

View File

@@ -23,7 +23,7 @@ class SelfHealingDemo(A2AAgent):
scenario: str = "normal",
) -> dict[str, object]:
if scenario == "controlled-failure":
# Repaired: the controlled invoice total handler previously raised a
# RuntimeError. It now returns the safe recovered result.
return {"ok": True, "scenario": scenario, "result": "recovered"}
# 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")
return {"ok": True, "scenario": scenario, "result": "healthy"}