code wiki / _hdl_build / nx_reader_liveness.nx
nx_reader_liveness.nx
buildroot/runtime/_hdl_build/nx_reader_liveness.nx
about
nx_reader_liveness.nx -- ACTIVE BUILT-vs-LIVE auditor for the sovereign Library reader.
The static nx_reader_census records what is BUILT; this organ PROBES whether each format the library
actually CONTAINS is also WIRED into the serving binary -> it catches the BUILT-not-LIVE class the static
census structurally misses (mobi/azw/azw3 decoders existed + were gated GREEN, but ms_handle_open never
routed to them, so ~390 books dead-ended at /file with an alert). It reads REAL artifacts only -- zero
assertions: the library index (format presence), _offc/<extractor>.elf (BUILT), and the serving binary
_offc/nx_media_server.elf (WIRED = the binary actually references the extractor). A format the library
holds whose built extractor is NOT wired = a GAP (the actionable feedback). Anti-wave: a row that CLAIMS
live with no wiring evidence in the binary is REFUSED (liar-kill). main() is the self-validating gate.
expect_exit: 0 license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 13 | func lw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 } |
| 14 | func ln2(v: i64) -> i64 { let bb: *u8=sys_mmap(28); var m: i64=v; if m<0{m=0-m;sys_write(1,"-" as *u8,1)} let t: *u8=sys_mmap(28); var k: i64=0; if m==0{t[0]=48 as u8;k=1} while m>0{t[k]=(48+(m%10)) as u8;m=m/10;k=k+1} var i: i64=0; while i<k{bb[i]=t[k-1-i];i=i+1} sys_write(1,bb,k); return 0 } |
| 15 | func lslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 18 | func count_sub(hay: *u8, hl: i64, needle: *u8) -> i64 |
| 31 | func has_sub(hay: *u8, hl: i64, needle: *u8) -> i64 { if count_sub(hay, hl, needle) > 0 { return 1 } return 0 } |
| 32 | func file_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd >= 0 { sys_close(fd); return 1 } return 0 } |
| 35 | func audit_row(label: *u8, idxtoken: *u8, elfpath: *u8, srvtoken: *u8, idxb: *u8, idxn: i64, srvb: *u8, srvn: i64, tally: *i64) -> i64 |
| 54 | func main() -> i64 |