code wiki / (root) / nx_gate_total_scan.nx

nx_gate_total_scan.nx

buildroot/runtime/nx_gate_total_scan.nx

8114 B184 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic gate
docsdependenciesstructsconstsfunctions

about

nx_gate_total_scan.nx -- scans *_gate.nx sources for the DUPLICATED tooth-total magic number. The corpus-dominant gate epilogue writes the total TWICE: g_puts("/15 verdict=" ...) <- the printed denominator if pass[0] == 15 { GREEN } <- the verdict comparison Both must also agree with a THIRD thing (the real number of assertions), so it is a three-way drift. This organ proves the mechanically-checkable half exactly: printed N vs compared N. A gate printing /15 while comparing ==14 is LYING ABOUT ITS OWN COVERAGE. Verdicts per file: OK (both found, equal) · MISMATCH (both found, differ) · UNPAIRED (printed N with no comparison to check it against) · SKIP (neither) usage: nx_gate_total_scan <dir> [dir2] [dir3] exit 0 clean, 1 if any MISMATCH license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 0 importers

nx_syscalls.nx nx_gate_total_scan.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 s_puts sys_write sys_openat_rd sys_mmap nxa_die sys_write ↻ sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ sys_getdents64 dirent_reclen dirent_name s_is_gate s_slen sys_read_file sys_openat_rd ↻ sys_lseek sys_mmap ↻ sys_read sys_munmap sys_close s_printed s_find s_slen ↻ s_int s_has_cmp s_find ↻ s_int ↻ s_putn sys_write ↻

structs

none

consts

15const S_NAMECAP: i64 = 4096
16const S_DENTCAP: i64 = 65536

functions

18func s_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 1: main calls 1: sys_write
19func s_putn(v: i64) -> i64
called by 1: main calls 3: sys_writesys_mmapsys_munmap
31func s_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
called by 2: s_finds_is_gate
33func s_find(hay: *u8, hn: i64, needle: *u8, from: i64) -> i64
called by 2: s_printeds_has_cmp calls 1: s_slen
47func s_int(hay: *u8, hn: i64, p: i64) -> i64
called by 2: s_printeds_has_cmp
66func s_printed(buf: *u8, n: i64) -> i64
called by 1: main calls 2: s_finds_int
93func s_has_cmp(buf: *u8, n: i64, pv: i64) -> i64
called by 1: main calls 2: s_finds_int
112func s_is_gate(name: *u8) -> i64
called by 1: main calls 1: s_slen
121func main(argc: i64, argv: *i64) -> i64