self-review 2026-08-10: plumb the gauges that were computed and discarded
el_runtime.c emitted 19 metric keys from engram_metrics_json; emit_heartbeat forwarded 14. Dropped on the floor: hebb_cands, hebb_cand_max, hebb_mass, hebb_edges, embed_consec_fail. The first two are exactly the pair the runtime added to answer the 08-06 question -- whether a stalled hebb_links means nothing co-activates or the threshold is too high. Undiagnosable from the durable record without them. An instrument computed but not plumbed to durable storage is not an instrument. Also adds the corpus damage STOCK, not just the flow. 08-08 fixed the JSON parser, watched txt_damaged (nodes damaged by a write THIS process) fall to 0, and recorded the defect closed. Census today: 2781 of 4100 nodes still damaged -- 67.8%, including the self root and every values node. A flow gauge reads 0 both when the corpus is clean and when it is uniformly damaged but quiescent. Sampled on a 30-beat countdown and carried with an explicit age.
This commit is contained in:
+81
-1
@@ -404,6 +404,33 @@ fn emit_heartbeat() -> Void {
|
||||
let hebb_max: String = if str_eq(hebb_max_raw, "") { "-1" } else { hebb_max_raw }
|
||||
let hebb_links_raw: String = json_get(act_stats, "hebb_links")
|
||||
let hebb_links: String = if str_eq(hebb_links_raw, "") { "-1" } else { hebb_links_raw }
|
||||
// Candidate-table gauges (2026-08-10 self-review). el_runtime.c COMPUTES
|
||||
// hebb_cands/hebb_cand_max/hebb_mass/hebb_edges and emits them from
|
||||
// engram_metrics_json — and this function dropped all four on the floor.
|
||||
// Nineteen keys crossed the C boundary; fourteen reached the ISE stream.
|
||||
// The two that mattered most are exactly the pair the runtime added to
|
||||
// answer the question the 08-06 review had to instrument for:
|
||||
// hebb_cands — associations currently being tracked toward
|
||||
// consolidation. 0 ⇒ nothing co-activates at all.
|
||||
// hebb_cand_max — how close the leading candidate is to
|
||||
// ENGRAM_HEBB_LINK_MIN (0.15). Sustained just-below ⇒
|
||||
// the THRESHOLD is the bottleneck, not the event rate.
|
||||
// Without both, "hebb_links stopped climbing" is undiagnosable from the
|
||||
// durable record: nothing-co-activates and threshold-too-high look
|
||||
// identical. An instrument that is computed but not plumbed to durable
|
||||
// storage is not an instrument — it is a local variable.
|
||||
// hebb_mass — Σ hebb across edges; the runaway detector against the
|
||||
// ENGRAM_HEBB_NODE_BUDGET homeostatic cap.
|
||||
// hebb_edges — total potentiated edges (hebb > MIN), the denominator
|
||||
// hebb_max is the max of.
|
||||
let hebb_cands_raw: String = json_get(act_stats, "hebb_cands")
|
||||
let hebb_cands: String = if str_eq(hebb_cands_raw, "") { "-1" } else { hebb_cands_raw }
|
||||
let hebb_cmax_raw: String = json_get(act_stats, "hebb_cand_max")
|
||||
let hebb_cmax: String = if str_eq(hebb_cmax_raw, "") { "-1" } else { hebb_cmax_raw }
|
||||
let hebb_mass_raw: String = json_get(act_stats, "hebb_mass")
|
||||
let hebb_mass: String = if str_eq(hebb_mass_raw, "") { "-1" } else { hebb_mass_raw }
|
||||
let hebb_edges_raw: String = json_get(act_stats, "hebb_edges")
|
||||
let hebb_edges: String = if str_eq(hebb_edges_raw, "") { "-1" } else { hebb_edges_raw }
|
||||
// Consolidation write-back gauges (2026-08-07 self-review). hebb_links
|
||||
// counts what this process LEARNED; these three count what SURVIVES it.
|
||||
// The distinction is the whole finding: 1,198 links formed, 0 persisted,
|
||||
@@ -430,6 +457,14 @@ fn emit_heartbeat() -> Void {
|
||||
let dup_wm_g: String = if str_eq(dup_wm_g_raw, "") { "-1" } else { dup_wm_g_raw }
|
||||
let act_brk_raw: String = json_get(act_stats, "embed_breaker_open")
|
||||
let act_brk: String = if str_eq(act_brk_raw, "") { "-1" } else { act_brk_raw }
|
||||
// embed_consec_fail (2026-08-10 self-review): also computed by the C side
|
||||
// and also dropped here. embed_breaker_open is the LAGGING indicator — it
|
||||
// only goes 1 after ENGRAM_EMBED_BREAKER_LIMIT consecutive failures, by
|
||||
// which point semantic activation has already degraded to pure lexical
|
||||
// for the whole cooldown. consec_fail is the leading edge of the same
|
||||
// event and costs nothing to carry.
|
||||
let emb_cf_raw: String = json_get(act_stats, "embed_consec_fail")
|
||||
let emb_cf: String = if str_eq(emb_cf_raw, "") { "-1" } else { emb_cf_raw }
|
||||
// ctx_cos (2026-07-29 self-review): cos(query, context centroid) at the
|
||||
// last activate call — the drift gauge for the new context-centroid
|
||||
// scoring. ~1.0 aligned; low at domain-rotation boundaries is healthy;
|
||||
@@ -464,7 +499,52 @@ fn emit_heartbeat() -> Void {
|
||||
// a 60s beat); this is the cheap flow counter that belongs on every beat.
|
||||
let txt_dmg_raw: String = json_get(act_stats, "txt_damaged")
|
||||
let txt_dmg: String = if str_eq(txt_dmg_raw, "") { "-1" } else { txt_dmg_raw }
|
||||
let payload: String = "{\"event\":\"heartbeat\",\"pulse\":" + pulse + ",\"tick\":" + pulse + ",\"boot\":" + boot + ",\"idle\":" + idle + ",\"idle_ms\":" + int_to_str(idle_ms) + ",\"node_count\":" + int_to_str(nc) + ",\"edge_count\":" + int_to_str(ec) + ",\"node_delta\":" + int_to_str(node_delta) + ",\"edge_delta\":" + int_to_str(edge_delta) + ",\"wm_active\":" + int_to_str(wmc) + ",\"wm_delta\":" + int_to_str(wm_delta) + ",\"wm_saturated\":" + int_to_str(wm_sat) + ",\"wm_top0_streak\":" + int_to_str(t0streak) + ",\"wm_churn\":" + int_to_str(wm_churn) + ",\"wm_top0_wm\":" + wm_top0_wm + ",\"sync_added_total\":" + sat_str + ",\"sync_age_ms\":" + int_to_str(sync_age) + ",\"wm_avg_weight\":" + wm_avg_str + ",\"wm_top\":" + wm_top + ",\"ts\":" + int_to_str(ts) + ",\"uptime_ms\":" + int_to_str(up_ms) + ",\"uptime\":\"" + up_human + "\",\"embed_ok\":" + int_to_str(emb_ok) + ",\"embed_backfilled\":" + bf_done + ",\"embed_count\":" + bf_total + ",\"embed_eligible\":" + embed_elig + ",\"wm_evicted\":" + act_evict + ",\"wm_evicted_delta\":" + int_to_str(evict_delta) + ",\"breakthroughs\":" + act_bt + ",\"breakthroughs_delta\":" + int_to_str(bt_delta) + ",\"auto_term_streak\":" + int_to_str(hb_ats) + ",\"auto_term_empty_streak\":" + int_to_str(hb_ate) + ",\"embed_breaker_open\":" + act_brk + ",\"ctx_cos\":" + ctx_cos + ",\"dup_seeds\":" + dup_seeds + ",\"dup_wm\":" + dup_wm + ",\"dup_wm_global\":" + dup_wm_g + ",\"hebb_warm\":" + hebb_warm + ",\"hebb_max\":" + hebb_max + ",\"hebb_links\":" + hebb_links + ",\"hebb_wb_pending\":" + wb_pend + ",\"hebb_wb_drained\":" + wb_drain + ",\"hebb_wb_dropped\":" + wb_drop + ",\"hebb_wb_sent\":" + wb_sent + ",\"ise_fail\":" + fail_str + ",\"txt_damaged\":" + txt_dmg + "}"
|
||||
// ── Corpus damage STOCK, not just flow (2026-08-10 self-review) ────────
|
||||
// txt_damaged above is a FLOW gauge: nodes damaged by a write in THIS
|
||||
// process. The 08-08 review fixed the parser, watched that flow fall to
|
||||
// 0, and recorded the defect as closed. It was not closed. Today's census
|
||||
// on the live store: scanned 4100, damaged 2781 — 67.8% of the corpus is
|
||||
// STILL carrying the character loss, including the self root and every
|
||||
// values node ("Value ? Constraints as Freedom"). The parser stopped
|
||||
// producing new damage; nothing ever repaired the old.
|
||||
//
|
||||
// That is the 08-08 lesson recursing one level up. 08-08 said "instrument
|
||||
// the payload, not just the machinery" — and then instrumented the payload
|
||||
// RATE and not the payload STOCK. A flow gauge reads 0 both when the
|
||||
// corpus is clean and when it is uniformly damaged but quiescent. Those
|
||||
// are opposite states and the beat could not tell them apart.
|
||||
//
|
||||
// Cost: GET /api/text-health scans the whole store, too expensive for a
|
||||
// 60s beat (which is why 08-08 left it off). So sample it on a countdown
|
||||
// and CARRY the last reading on every beat, with its age. A stale-but-
|
||||
// present stock number beats an absent one; damaged_age_ms makes the
|
||||
// staleness explicit rather than implied. No modulo/multiply — both
|
||||
// operators are broken in this compiler (see the note at line ~160).
|
||||
let tc_raw: String = state_get("soul.txt_census_countdown")
|
||||
let tc_n: Int = if str_eq(tc_raw, "") { 0 } else { str_to_int(tc_raw) }
|
||||
if tc_n <= 0 {
|
||||
let th_resp: String = http_get(hb_engram_url + "/api/text-health")
|
||||
let th_pct: String = json_get(th_resp, "damaged_pct")
|
||||
if !str_eq(th_pct, "") {
|
||||
state_set("soul.txt_damaged_pct", th_pct)
|
||||
state_set("soul.txt_damaged_n", json_get(th_resp, "damaged"))
|
||||
state_set("soul.txt_scanned_n", json_get(th_resp, "scanned"))
|
||||
state_set("soul.txt_census_ts", int_to_str(ts))
|
||||
}
|
||||
// 30 beats ≈ 30 min at the 60s cadence. Reset even on a failed census
|
||||
// so an unreachable route cannot turn this into a per-beat full scan.
|
||||
state_set("soul.txt_census_countdown", "30")
|
||||
}
|
||||
if tc_n > 0 { state_set("soul.txt_census_countdown", int_to_str(tc_n - 1)) }
|
||||
let dmg_pct_raw: String = state_get("soul.txt_damaged_pct")
|
||||
let dmg_pct: String = if str_eq(dmg_pct_raw, "") { "-1" } else { dmg_pct_raw }
|
||||
let dmg_n_raw: String = state_get("soul.txt_damaged_n")
|
||||
let dmg_n: String = if str_eq(dmg_n_raw, "") { "-1" } else { dmg_n_raw }
|
||||
let dmg_scan_raw: String = state_get("soul.txt_scanned_n")
|
||||
let dmg_scan: String = if str_eq(dmg_scan_raw, "") { "-1" } else { dmg_scan_raw }
|
||||
let dmg_ts_raw: String = state_get("soul.txt_census_ts")
|
||||
let dmg_age: Int = if str_eq(dmg_ts_raw, "") { 0 - 1 } else { ts - str_to_int(dmg_ts_raw) }
|
||||
let payload: String = "{\"event\":\"heartbeat\",\"pulse\":" + pulse + ",\"tick\":" + pulse + ",\"boot\":" + boot + ",\"idle\":" + idle + ",\"idle_ms\":" + int_to_str(idle_ms) + ",\"node_count\":" + int_to_str(nc) + ",\"edge_count\":" + int_to_str(ec) + ",\"node_delta\":" + int_to_str(node_delta) + ",\"edge_delta\":" + int_to_str(edge_delta) + ",\"wm_active\":" + int_to_str(wmc) + ",\"wm_delta\":" + int_to_str(wm_delta) + ",\"wm_saturated\":" + int_to_str(wm_sat) + ",\"wm_top0_streak\":" + int_to_str(t0streak) + ",\"wm_churn\":" + int_to_str(wm_churn) + ",\"wm_top0_wm\":" + wm_top0_wm + ",\"sync_added_total\":" + sat_str + ",\"sync_age_ms\":" + int_to_str(sync_age) + ",\"wm_avg_weight\":" + wm_avg_str + ",\"wm_top\":" + wm_top + ",\"ts\":" + int_to_str(ts) + ",\"uptime_ms\":" + int_to_str(up_ms) + ",\"uptime\":\"" + up_human + "\",\"embed_ok\":" + int_to_str(emb_ok) + ",\"embed_backfilled\":" + bf_done + ",\"embed_count\":" + bf_total + ",\"embed_eligible\":" + embed_elig + ",\"wm_evicted\":" + act_evict + ",\"wm_evicted_delta\":" + int_to_str(evict_delta) + ",\"breakthroughs\":" + act_bt + ",\"breakthroughs_delta\":" + int_to_str(bt_delta) + ",\"auto_term_streak\":" + int_to_str(hb_ats) + ",\"auto_term_empty_streak\":" + int_to_str(hb_ate) + ",\"embed_breaker_open\":" + act_brk + ",\"ctx_cos\":" + ctx_cos + ",\"dup_seeds\":" + dup_seeds + ",\"dup_wm\":" + dup_wm + ",\"dup_wm_global\":" + dup_wm_g + ",\"hebb_warm\":" + hebb_warm + ",\"hebb_max\":" + hebb_max + ",\"hebb_links\":" + hebb_links + ",\"hebb_cands\":" + hebb_cands + ",\"hebb_cand_max\":" + hebb_cmax + ",\"hebb_mass\":" + hebb_mass + ",\"hebb_edges\":" + hebb_edges + ",\"embed_consec_fail\":" + emb_cf + ",\"txt_damaged_pct\":" + dmg_pct + ",\"txt_damaged_n\":" + dmg_n + ",\"txt_scanned_n\":" + dmg_scan + ",\"txt_census_age_ms\":" + int_to_str(dmg_age) + ",\"hebb_wb_pending\":" + wb_pend + ",\"hebb_wb_drained\":" + wb_drain + ",\"hebb_wb_dropped\":" + wb_drop + ",\"hebb_wb_sent\":" + wb_sent + ",\"ise_fail\":" + fail_str + ",\"txt_damaged\":" + txt_dmg + "}"
|
||||
ise_post(payload)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user