self-review 2026-08-01: emit discrete wm_saturation_transition ISE
wm_saturated was a sampled boolean — the 0->1 onset and 1->0 release moments were only recoverable by hand-diffing consecutive heartbeats. Emit a low-rate transition ISE at each edge carrying the WM top-5 at that instant, so the composition that caused the regime change is captured rather than the composition up to 59s later. First beat of a boot never fires (restart is not a transition).
This commit is contained in:
@@ -212,6 +212,21 @@ fn emit_heartbeat() -> Void {
|
||||
// cap-pinned regime; wm_top0_streak counts consecutive heartbeats with
|
||||
// the same node in WM slot 0 (state-tracked, same mechanism as wm_delta).
|
||||
let wm_sat: Int = if wmc >= 24 { 1 } else { 0 }
|
||||
// Saturation TRANSITION event (2026-08-01 self-review): wm_saturated is a
|
||||
// sampled boolean — the 0→1 onset and 1→0 release moments were only
|
||||
// recoverable by diffing consecutive heartbeats by hand. Emit a discrete
|
||||
// low-rate ISE at each edge, carrying the WM top-5 at that instant so the
|
||||
// composition that CAUSED the regime change is captured, not the
|
||||
// composition 59 seconds later. State-tracked like wm_delta; first beat
|
||||
// of a boot never fires (prev defaults to current) — a restart is not a
|
||||
// transition.
|
||||
let prev_sat_raw: String = state_get("soul.prev_wm_saturated")
|
||||
let prev_sat: Int = if str_eq(prev_sat_raw, "") { wm_sat } else { str_to_int(prev_sat_raw) }
|
||||
if wm_sat != prev_sat {
|
||||
let sat_dir: String = if wm_sat == 1 { "onset" } else { "release" }
|
||||
ise_post("{\"event\":\"wm_saturation_transition\",\"direction\":\"" + sat_dir + "\",\"wm_active\":" + int_to_str(wmc) + ",\"wm_top\":" + wm_top + ",\"ts\":" + int_to_str(ts) + "}")
|
||||
}
|
||||
state_set("soul.prev_wm_saturated", int_to_str(wm_sat))
|
||||
let wm_top0: String = json_array_get(wm_top, 0)
|
||||
let wm_top0_id: String = json_get(wm_top0, "id")
|
||||
let prev_top0: String = state_get("soul.prev_wm_top0")
|
||||
|
||||
Reference in New Issue
Block a user