code wiki / _hdl_build / nx_nofloat_adversary.nx

nx_nofloat_adversary.nx

buildroot/runtime/_hdl_build/nx_nofloat_adversary.nx

9634 B141 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic nofloat
docsdependenciesstructsconstsfunctions

about

nx_nofloat_adversary.nx -- CAP-NF-ADVERSARY: a DURABLE, sovereign adversarial reviewer. Nishi OWNS adversarial review -- it re-runs forever, not a one-time LLM-subagent pass. Encodes the wave-detectors the auditors used: DETECTOR 1 -- LOG-DISCIPLINE: each gate's status-log write must be GREEN-gated (append AFTER 'if okall==1'), not unconditional (an unconditional log is written even on RED -> "log present == passed" is FALSE). DETECTOR 2 -- SELECTIVE-BASELINE: every incumbent file in the corpus must be cited by the census. DETECTOR 3 -- HELD-OUT / ANTI-MEMORIZATION: a gate that TRAINS (has nfa_backward) AND CLAIMS learning (source says LEARN/generaliz) must use a held-out eval (>=2 sdat seeds). 'trains + claims-learn + no held-out' = memorization mislabeled as learning (the "LM learned" wave the 3rd auditor caught). T1 zero log-discipline violators. T2 baseline-complete. T3 zero memorization-mislabels. T4 (non-vacuity) the detector anchors are found in every scanned gate. expect_exit: 0 Sovereign: nx_syscalls. (lean strings -- nx_cc ceiling)

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_nofloat_adversary.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 g_puts sys_write sys_mmap read_file sys_openat_rd sys_read sys_close findidx slen g_pn sys_mmap ↻ sys_write ↻ contains findidx ↻ countocc slen ↻ ck g_puts ↻ sys_openat_append sys_write ↻ sys_close ↻ sys_exit

structs

none

consts

13const K_MAGIC_20480: i64 = 20480

functions

15func g_puts(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: ckmain calls 1: sys_write
16func g_pn(v: i64) -> i64 { let b: *u8=sys_mmap(28); var x: i64=v; if x<0{b[0]=45;sys_write(1,b,1);x=0-x} if x==0{b[0]=48;sys_write(1,b,1);return 0} var d: i64=0; var y: i64=x; while y>0{d=d+1;y=y/10} var i: i64=d-1; y=x; while i>=0{b[i]=(48+(y%10)) as u8;y=y/10;i=i-1} sys_write(1,b,d); return 0 }
called by 1: main calls 2: sys_mmapsys_write
17func ck(name: *u8, c: i64) -> i64 { if c==1 { g_puts(" PASS " as *u8) } else { g_puts(" FAIL " as *u8) } g_puts(name); g_puts("\n" as *u8); return c }
called by 1: main calls 1: g_puts
18func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n }
called by 2: findidxcountocc
19func read_file(path: *u8, buf: *u8, cap: i64) -> i64
called by 1: main calls 3: sys_openat_rdsys_readsys_close
25func findidx(buf: *u8, n: i64, needle: *u8) -> i64
called by 2: containsmain calls 1: slen
31func contains(buf: *u8, n: i64, needle: *u8) -> i64 { if findidx(buf,n,needle)>=0 { return 1 } return 0 }
called by 1: main calls 1: findidx
32func countocc(buf: *u8, n: i64, needle: *u8) -> i64
called by 1: main calls 1: slen
39func main() -> i64