From a9e2e9b1c4e1be32676c4073e3ea2440f256a8aa Mon Sep 17 00:00:00 2001 From: "juancarlos.cavero" Date: Mon, 7 Sep 2026 19:43:34 +0200 Subject: [PATCH] fix(alerts): keep the reframe v2 failure in a job's error text A clip render dies in two steps: reframe_v2.render raises (it has a single `return True` and no False path), main.py prints "Reframe v2 failed (: )" and falls back to the v1 frame loop, and only if v1 also fails does "Clip N failed" appear. The alert classifier picked the second line and not the first, so it named the fallback's exception and hid the one that actually started it. Both lines are wanted now. This matters because the zero-clip jobs fixed in ff2ad3d were reported as completed and never alerted at all; from now on they fail properly and page, and the page should carry the root cause rather than v1's symptom. Claude-Session: https://claude.ai/code/session_01UZGqjYcZyfmKww1gcyKrp5 --- app.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/app.py b/app.py index 170bd02..1ea5fd5 100644 --- a/app.py +++ b/app.py @@ -1381,7 +1381,15 @@ async def _notify_clip_activity(job_id): # alerts with a bare "Traceback ... exit code 1" and no cause (prod 20-ago). _ERROR_MARKERS = ("❌", "ERROR:", "Error:", "Traceback", "FATAL", "Exception", "Process failed with exit code", "No metadata file generated", - "Execution error:") + "Execution error:", + # A clip render dies in two steps: reframe_v2 raises (it has + # no False return, only `return True`), main.py prints this + # and falls back to the v1 loop, and only if v1 ALSO fails + # does "❌ Clip N failed" appear. The ❌ line then carries + # v1's exception, not the one that started it, so without + # this marker the alert names the fallback and hides the + # cause. Both lines are wanted. + "Reframe v2 failed") def _job_error_text(logs) -> str: