code wiki / _hdl_build / nx_stackaudit_lib.nx
nx_stackaudit_lib.nx
buildroot/runtime/_hdl_build/nx_stackaudit_lib.nx
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
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
| 13 | const SAX_MAGIC_262144: i64 = 262144 |
| 15 | const SAX_LOG: *u8 = "knowledge/status/stack_census.log" |
| 16 | const SAX_PAGE: *u8 = "web_assets/stack_audit.html" |
| 138 | const SAX_HEALTH_FLOOR: i64 = 500 |
functions
| 18 | func sax_n(t: i64) -> i64 { if t == 0 { return 13 } if t == 3 { return 1 } return 3 } |
| 20 | func sax_id(t: i64, i: i64) -> *u8 |
| 41 | func sax_name(t: i64, i: i64) -> *u8 |
| 63 | func sax_kind(t: i64, i: i64) -> i64 |
| 84 | func sax_log(t: i64, i: i64) -> *u8 |
| 111 | func sax_pat(t: i64, i: i64) -> *u8 |
| 128 | func sax_expect(t: i64, i: i64) -> i64 called by 1: sax_census |
| 140 | func sax_kind2(t: i64, i: i64) -> i64 called by 1: sax_census |
| 151 | func sax_log2(t: i64, i: i64) -> *u8 called by 1: sax_census |
| 161 | func sax_pat2(t: i64, i: i64) -> *u8 called by 1: sax_census |
| 167 | func sax_healthy(kind: i64, status: i64, permil: i64) -> i64 |
| 173 | func sax_tri_status(h1: i64, kind2: i64, missing2: i64, h2: i64) -> i64 |
| 182 | func sax_eval(kind: i64, logp: *u8, pat: *u8, ev: *i64) -> i64 |
| 203 | func sax_status_label(status: i64, kind: i64, missing: i64) -> *u8 |
| 216 | func sax_census(t: i64, verbose: i64, out: *i64) -> i64 |
| 297 | func sax_weight(i: i64) -> i64 called by 1: sax_emit_targets_core |
| 312 | func sax_next(i: i64) -> *u8 called by 1: sax_emit_targets_core |
| 327 | func sax_mkid(name: *u8, out: *u8) -> i64 |
| 337 | func sax_should_emit(name: *u8, unhealthy: i64, qb: *u8, qn: i64) -> i64 |
| 345 | func sax_emit_targets_core(qb: *u8, qn: i64, qf: i64, lf: i64, out: *i64) -> i64 |
| 386 | func sax_emit_page(t: i64, outhtml: *u8) -> i64 |