fix(heartbeat): suppress git-only alerts when rest is ok

Uncommitted files alone are not an actionable heartbeat alert.
Only send a message if there are other findings besides git status.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 08:04:34 +00:00
parent ad681c7a73
commit 0bfa652b31

View File

@@ -109,6 +109,11 @@ def run_heartbeat(config: dict | None = None) -> str:
if not all_results:
return "HEARTBEAT_OK"
# Git uncommitted files alone are not an actionable alert — stay silent
non_git = [r for r in all_results if not r.startswith("Git:")]
if not non_git:
return "HEARTBEAT_OK"
return " | ".join(all_results)