Update plan Task 9: PMNotify calls stage_notify directly (trace on failed runs)

This commit is contained in:
tlg
2026-07-09 11:11:21 +02:00
parent 2032305d90
commit 1481bbc30c

View File

@@ -2119,8 +2119,9 @@ class PMNotify(Component):
def build_out(self) -> Message:
cfg = Cfg(imap_password=self.imap_password, notify_to=self.notify_to)
ctx = stages.run_stage("notify", stages.stage_notify,
dict(self.ctx.data), cfg)
# stage_notify is called DIRECTLY (not via run_stage): it must run for
# every terminal status so failed runs still post their Langfuse trace.
ctx = stages.stage_notify(dict(self.ctx.data), cfg)
self.status = ctx.get("status", "")
return Message(text=stages.summary(ctx))
```