From 0ef888337075947cd875c8f980683105fd925a41 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Thu, 14 May 2026 11:06:03 -0500 Subject: [PATCH] feat(awareness): enrich heartbeat ISE with graph stats and idle count MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Heartbeat ISEs previously emitted only {event, pulse, boot, ts} — sparse enough to be nearly useless for observability. Now they include node_count, edge_count (from engram_node_count/edge_count builtins), and the current idle cycle count. This gives each heartbeat a snapshot of graph growth over time and rhythm health without adding any overhead. --- awareness.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/awareness.el b/awareness.el index 1867d37..cebebf2 100644 --- a/awareness.el +++ b/awareness.el @@ -39,8 +39,11 @@ fn ise_post(content: String) -> Void { fn emit_heartbeat() -> Void { let pulse: String = state_get("soul.pulse") let boot: String = state_get("soul_boot_count") + let idle: String = int_to_str(idle_count()) let ts: Int = time_now() - let payload: String = "{\"event\":\"heartbeat\",\"pulse\":" + pulse + ",\"boot\":" + boot + ",\"ts\":" + int_to_str(ts) + "}" + let nc: Int = engram_node_count() + let ec: Int = engram_edge_count() + let payload: String = "{\"event\":\"heartbeat\",\"pulse\":" + pulse + ",\"boot\":" + boot + ",\"idle\":" + idle + ",\"node_count\":" + int_to_str(nc) + ",\"edge_count\":" + int_to_str(ec) + ",\"ts\":" + int_to_str(ts) + "}" ise_post(payload) }