code wiki / _hdl_build / nx_nofloat_adversary.nx
nx_nofloat_adversary.nx
buildroot/runtime/_hdl_build/nx_nofloat_adversary.nx
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
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
| 13 | const K_MAGIC_20480: i64 = 20480 |
functions
| 15 | func 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 } |
| 16 | func 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 } |
| 17 | func 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 } |
| 18 | func slen(s: *u8) -> i64 { var n: i64=0; while s[n]!=(0 as u8){n=n+1} return n } |
| 19 | func read_file(path: *u8, buf: *u8, cap: i64) -> i64 |
| 25 | func findidx(buf: *u8, n: i64, needle: *u8) -> i64 |
| 31 | func contains(buf: *u8, n: i64, needle: *u8) -> i64 { if findidx(buf,n,needle)>=0 { return 1 } return 0 } |
| 32 | func countocc(buf: *u8, n: i64, needle: *u8) -> i64 |
| 39 | func main() -> i64 |