code wiki / _hdl_build / nx_stackaudit_lib.nx

nx_stackaudit_lib.nx

buildroot/runtime/_hdl_build/nx_stackaudit_lib.nx

21486 B442 linesdepth 4pulls 5 transitivereach 4 importersview sourcekind librarytopic stackaudit
docsdependenciesstructsconstsfunctions

about

nx_stackaudit_lib.nx -- shared core for the FULL-STACK LADDER CENSUS (the sovereign auditor). Operator 2026-07-02: "did you build the auditors capabilities into the nishi family and ecosystems" -> this organ family regenerates the rung-by-rung stack audit (R0 silicon .. R12 team/autonomy) from REAL evidence logs in knowledge/status/ on every run: no Claude in the loop, no self-report, measured never asserted. Composes the proven ecomat evidence readers (el_last_after/el_last_green). STATUSES per rung: GREEN/RED (gate-liveness, LAST verdict wins) | MEASURED permil (permil-derive) | UNKNOWN (no source, or source missing). ANTI-ROT LIAR-KILL: a rung that EXPECTS evidence whose log is missing/unparseable => conflict => census verdict RED (a renamed/deleted log screams, never silently greens). Rung REDs (e.g. funcheck) do NOT redden the census -- honest readings are the job. Tables: t=0 REAL (13 rungs) | t=1 gate RED-path fixture | t=2 gate GREEN-path fixture. license_tier: ORIGINAL

dependencies 1 imports · 4 importers

nx_ecomat_lib.nx nx_stackaudit_lib.nx nx_stackaudit_census.nx nx_stackaudit_census_gate.nx nx_stackaudit_targets.nx nx_stackaudit_targets_gate.nx

imports: nx_ecomat_lib.nx

imported by: nx_stackaudit_census.nxnx_stackaudit_census_gate.nxnx_stackaudit_targets.nxnx_stackaudit_targets_gate.nx

structs

none

consts

13const SAX_MAGIC_262144: i64 = 262144
15const SAX_LOG: *u8 = "knowledge/status/stack_census.log"
16const SAX_PAGE: *u8 = "web_assets/stack_audit.html"
138const SAX_HEALTH_FLOOR: i64 = 500

functions

18func sax_n(t: i64) -> i64 { if t == 0 { return 13 } if t == 3 { return 1 } return 3 }
20func sax_id(t: i64, i: i64) -> *u8
41func sax_name(t: i64, i: i64) -> *u8
63func sax_kind(t: i64, i: i64) -> i64
84func sax_log(t: i64, i: i64) -> *u8
111func sax_pat(t: i64, i: i64) -> *u8
128func sax_expect(t: i64, i: i64) -> i64
called by 1: sax_census
140func sax_kind2(t: i64, i: i64) -> i64
called by 1: sax_census
151func sax_log2(t: i64, i: i64) -> *u8
called by 1: sax_census
161func sax_pat2(t: i64, i: i64) -> *u8
called by 1: sax_census
167func sax_healthy(kind: i64, status: i64, permil: i64) -> i64
173func sax_tri_status(h1: i64, kind2: i64, missing2: i64, h2: i64) -> i64
called by 2: mainsax_census
182func sax_eval(kind: i64, logp: *u8, pat: *u8, ev: *i64) -> i64
203func sax_status_label(status: i64, kind: i64, missing: i64) -> *u8
216func sax_census(t: i64, verbose: i64, out: *i64) -> i64
297func sax_weight(i: i64) -> i64
312func sax_next(i: i64) -> *u8
327func sax_mkid(name: *u8, out: *u8) -> i64
337func sax_should_emit(name: *u8, unhealthy: i64, qb: *u8, qn: i64) -> i64
345func sax_emit_targets_core(qb: *u8, qn: i64, qf: i64, lf: i64, out: *i64) -> i64
386func sax_emit_page(t: i64, outhtml: *u8) -> i64