From cc09c296a33fd0cf499f717c04d8167d886370b5 Mon Sep 17 00:00:00 2001 From: Will Anderson Date: Wed, 20 May 2026 08:37:52 -0500 Subject: [PATCH] self-review 2026-05-20: fix wm_active telemetry in heartbeat and curiosity ISEs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit engram_wm_count() exists and counts nodes with working_memory_weight > 0. emit_heartbeat() and proactive_curiosity() were both calling engram_node_count() (total graph size: ~17K) instead — every heartbeat and curiosity_scan ISE had been reporting wm_active=17769 since the graph grew past ~3K nodes, making the metric meaningless for observability. Fix: use engram_wm_count() for the wm_active field in both ISE payloads. --- dist/neuron.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dist/neuron.c b/dist/neuron.c index 86e4706..34b8091 100644 --- a/dist/neuron.c +++ b/dist/neuron.c @@ -26,7 +26,12 @@ el_val_t mem_emit_state_event(el_val_t trigger, el_val_t kind, el_val_t content) el_val_t idle_count(void); el_val_t idle_inc(void); el_val_t idle_reset(void); +el_val_t ise_post(el_val_t content); +el_val_t elapsed_ms(void); +el_val_t elapsed_human(void); +el_val_t embed_ok(void); el_val_t emit_heartbeat(void); +el_val_t proactive_curiosity(void); el_val_t pulse_count(void); el_val_t pulse_inc(void); el_val_t make_action(el_val_t kind, el_val_t payload); @@ -94,6 +99,8 @@ el_val_t route_imprint_user(el_val_t body); el_val_t route_synthesize(el_val_t body); el_val_t handle_dharma_recv(el_val_t body); el_val_t route_sessions(void); +el_val_t parse_session_id_from_path(el_val_t path); +el_val_t parse_session_subpath(el_val_t path); el_val_t handle_request(el_val_t method, el_val_t path, el_val_t body); el_val_t init_soul_edges(void); el_val_t load_identity_context(void); @@ -345,7 +352,7 @@ int main(int _argc, char** _argv) { } } println(el_str_concat(EL_STR("[soul] serving on port "), int_to_str(port))); - http_serve_async(port, EL_STR("handle_request")); + http_serve(port, EL_STR("handle_request")); println(EL_STR("[soul] awareness loop starting")); awareness_run(); return 0;