From ac92280b9a0ddea7cdd3e2d483654f0ffb4a3134 Mon Sep 17 00:00:00 2001 From: momentum dev Date: Fri, 2 Oct 2026 11:11:27 -0500 Subject: [PATCH] fix: daily report no longer flags a stack as silent when run mid-session Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01B3PXXn2tHBzdv6rYtGPz86 --- research/daily_report.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/research/daily_report.py b/research/daily_report.py index 2c95381..315fa21 100644 --- a/research/daily_report.py +++ b/research/daily_report.py @@ -193,7 +193,8 @@ def health_section(paper, live, today, alerts) -> list[str]: alerts.append(f"The {name} stack was silent for {gap_min:.0f} min during market hours.") if n == 0: alerts.append(f"The {name} stack wrote no heartbeats during market hours.") - elif last and last.strftime("%H:%M") < "15:45": + elif last and (datetime.now(ET).replace(tzinfo=None) - last).total_seconds() > 900 \ + and last.strftime("%H:%M") < "15:45": # silent for 15+ min, before the close alerts.append(f"The {name} stack went silent at {last:%H:%M} ET.") except Exception as e: # noqa: BLE001 lines.append(f"- {name}: ERROR {str(e)[:120]}")