code wiki / _hdl_build / nx_reader_liveness.nx

nx_reader_liveness.nx

buildroot/runtime/_hdl_build/nx_reader_liveness.nx

6716 B97 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic reader
docsdependenciesstructsconstsfunctions

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

nx_syscalls.nx nx_reader_liveness.nx

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

main lw sys_write sys_mmap sys_read_file sys_openat_rd sys_lseek sys_mmap ↻ sys_read sys_close ln2 sys_mmap ↻ sys_write ↻ sys_exit audit_row count_sub lslen file_exists sys_openat_rd ↻ sys_close ↻ has_sub count_sub ↻ lw ↻ ln2 ↻ sys_openat_append sys_write ↻ lslen ↻ sys_close ↻

structs

none

consts

none

functions

13func lw(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} sys_write(1,s,n); return 0 }
called by 2: audit_rowmain calls 1: sys_write
14func 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 }
called by 2: audit_rowmain calls 2: sys_mmapsys_write
15func lslen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: count_submain
18func count_sub(hay: *u8, hl: i64, needle: *u8) -> i64
called by 2: has_subaudit_row calls 1: lslen
31func has_sub(hay: *u8, hl: i64, needle: *u8) -> i64 { if count_sub(hay, hl, needle) > 0 { return 1 } return 0 }
called by 1: audit_row calls 1: count_sub
32func file_exists(path: *u8) -> i64 { let fd: i64 = sys_openat_rd(path); if fd >= 0 { sys_close(fd); return 1 } return 0 }
called by 1: audit_row calls 2: sys_openat_rdsys_close
35func audit_row(label: *u8, idxtoken: *u8, elfpath: *u8, srvtoken: *u8, idxb: *u8, idxn: i64, srvb: *u8, srvn: i64, tally: *i64) -> i64
54func main() -> i64