code wiki / (root) / nx_health_check.nx

nx_health_check.nx

buildroot/runtime/nx_health_check.nx

4093 B125 linesdepth 3pulls 3 transitivereach 2 importersview sourcekind librarytopic health
docsdependenciesstructsconstsfunctions

about

nx_health_check.nx -- overall substrate health verdict. Per [[feedback-self-surfacing-intelligence-staged-autonomy]]: substrate emits a coarse GREEN / YELLOW / RED verdict aggregating all known indicators. Operator sees one color first; can drill into the dashboard for details. Verdict rules (Q10 alert_score from nx_audit_dashboard): GREEN : alert_score < 200 AND colony_status == HEALTHY YELLOW : alert_score 200-768 OR colony_status == ALERTED RED : alert_score > 768 OR colony_status >= RESPONDING Composes: nx_audit_dashboard -- the snapshot consumed for verdict nx_recovery -- RED verdict triggers recovery procedure nx_book -- RED entry written when transitioning into RED

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_tier.nx nx_audit_dashboard.nx nx_health_check.nx nx_audit_compose_test.nx nx_health_check_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_audit_dashboard.nx

imported by: nx_audit_compose_test.nxnx_health_check_test.nx

structs

42struct NxHealthState

consts

24const NX_HC_GREEN: nx_int = 0
25const NX_HC_YELLOW: nx_int = 1
26const NX_HC_RED: nx_int = 2
27const NX_HC_N_VERDICTS: nx_int = 3

functions

29func nx_hc_verdict_is_valid(v: nx_int) -> nx_int
called by 1: main
49func nx_health_state_new() -> *NxHealthState
called by 2: mainmain calls 1: sys_mmap
63func nx_health_check(state: *NxHealthState,
95func nx_health_just_transitioned_to(state: *NxHealthState,
called by 2: mainmain
103func nx_health_last_verdict(state: *NxHealthState) -> nx_int
called by 1: main
107func nx_health_consecutive_red(state: *NxHealthState) -> nx_int
called by 1: main
118func nx_health_should_trigger_recovery(state: *NxHealthState) -> nx_int
called by 2: mainmain