self-review 2026-07-28: close ISE lifecycle observability gaps
- session_start now also posted to the HTTP Engram via ise_post: the local engram_node_full write never crossed to the observable stream (sync flows HTTP->soul only), so boots 5+ were invisible — last visible session_start was boot 4, two weeks ago - graceful shutdown emits a final ISE with boot/pulse/uptime; a boot with no shutdown event now reliably signals a crash/SIGKILL - empty /api/sync responses emit a sync_empty warn ISE instead of being silently skipped — unreachable engram no longer looks identical to quiet-but-healthy - sync backflow prune reads ENGRAM_ISE_RETENTION_MS instead of duplicating the 48h magic number server.el already honors
This commit is contained in:
+1
@@ -465,6 +465,7 @@ el_val_t emit_session_start_event(void) {
|
||||
el_val_t payload = el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(el_str_concat(EL_STR("{\"event\":\"session_start\""), EL_STR(",\"boot\":")), boot_num), EL_STR(",\"cgi\":\"")), eff_cgi), EL_STR("\"")), EL_STR(",\"node_count\":")), int_to_str(node_ct)), EL_STR(",\"edge_count\":")), int_to_str(edge_ct)), EL_STR(",\"identity_loaded\":")), has_identity), EL_STR(",\"prev_session_summary_loaded\":")), has_prev_sum), EL_STR(",\"ts\":")), int_to_str(ts)), EL_STR("}"));
|
||||
el_val_t tags = EL_STR("[\"internal-state\",\"session-start\",\"InternalStateEvent\"]");
|
||||
el_val_t discard = engram_node_full(payload, EL_STR("InternalStateEvent"), EL_STR("session-start"), el_from_float(0.9), el_from_float(0.9), el_from_float(1.0), EL_STR("Episodic"), tags);
|
||||
ise_post(payload);
|
||||
el_val_t keep_n = 10;
|
||||
el_val_t old_events = engram_search_json(EL_STR("session-start InternalStateEvent"), 200);
|
||||
if (!str_eq(old_events, EL_STR("")) && !str_eq(old_events, EL_STR("[]"))) {
|
||||
|
||||
Reference in New Issue
Block a user