code wiki / (root) / nx_verify.nx

nx_verify.nx

buildroot/runtime/nx_verify.nx

21498 B351 linesdepth 5pulls 5 transitivereach 0 importersview sourcekind orphan librarytopic verify
docsdependenciesstructsconstsfunctions

about

nx_verify.nx -- CONSOLIDATED Nishi-unique verification tool (per NISHI_TOOL_ARCHITECTURE: 50+ organs -> 15 verb-based tools; "new capability = a VERB, not a new micro-organ"). This is the nx_verify tool: ONE entry point, verbs, that ABSORBS the session's separate self-analysis organs so they stop sprawling as individual stubs. Imports the canonical nx_capability_triage_core (no reinvention). SUPERSEDES the standalone nx_capability_triage.nx + nx_triage_ground.nx CLIs (their cores stay as libs; these two verbs are now the interface). nx_verify triage [registry] -> route/wire/build/measure per capability + operator proposals (anti-navel-gazing: SOTA credited ONLY on 3rd-party bench) nx_verify ground [registry] -> cross-check has_organ vs DISK FACTS (gate>organ>absent); flags any claim the disk can't back (DISCREPANCY) Future verify verbs (claim / crossval / census / adversary) fold in HERE, not as new organs. Always exit 0; journals a summary. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_syscalls.nx nx_capability_triage_core.nx nx_verify.nx

imports: nx_syscalls.nxnx_capability_triage_core.nx

imported by: nobody (leaf or entry point)

structs

none

consts

15const V_MAGIC_1048576: i64 = 1048576
16const V_MAGIC_1048575: i64 = 1048575
17const V_MAGIC_65536: i64 = 65536
18const V_MAGIC_65535: i64 = 65535
19const V_MAGIC_1024: i64 = 1024
102const V_MAGIC_BUDGET: i64 = 0 // zero-tolerance default for a checked file/diff
103const V_DATA_DENS_X100: i64 = 80 // >=0.8 magic/line = a data table (bias/mesh/font/KAT), not logic -> EXEMPT
104const V_DATA_MIN_CNT: i64 = 50 // ...AND has many literals: floors out line-packed logic one-liners gaming density
105const V_DENS_SCALE: i64 = 100 // density is reported x100 (fixed-point, no floats)
106const V_RADIX10_LEN: i64 = 2 // "10" is two chars (the radix-extraction allowlist match)
107const V_ASCII_NL: i64 = 10
108const V_ASCII_SP: i64 = 32
109const V_ASCII_LP: i64 = 40 // '('
110const V_ASCII_0: i64 = 48
111const V_ASCII_1: i64 = 49
112const V_ASCII_2: i64 = 50
113const V_ASCII_9: i64 = 57
114const V_ASCII_x: i64 = 120
115const V_ASCII_PCT: i64 = 37 // '%'
116const V_ASCII_SLASH: i64 = 47 // '/'
117const V_ASCII_DQ: i64 = 34 // '"' string delimiter -- numbers inside strings are text, not magic (skip like comments)
118const V_ASCII_BS: i64 = 92 // '\' escape -- an escaped quote does not close the string

functions

21func v_puts(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } sys_write(1, s, n); return 0 }
calls 1: sys_write
22func v_putn(v: i64) -> i64 { nxi_out(v); return 0 }
calls 1: nxi_out
23func v_streq(a: *u8, b: *u8) -> i64 { var i: i64 = 0; while a[i] != (0 as u8) { if a[i] != b[i] { return 0 } i = i + 1 } if b[i] != (0 as u8) { return 0 } return 1 }
27func v_print_task(buf: *u8, ls: i64, le: i64) -> i64
calls 1: sys_write
33func v_field(buf: *u8, ls: i64, le: i64, idx: i64, out: *u8) -> i64
45func v_slen(s: *u8) -> i64 { var n: i64 = 0; while s[n] != (0 as u8) { n = n + 1 } return n }
48func v_line_int(buf: *u8, ls: i64, le: i64, tok: i64) -> i64
67func v_starts(buf: *u8, ls: i64, le: i64, pre: *u8) -> i64
77func v_exists(path: *u8) -> i64 { let sb: *u8 = sys_mmap(256); if sys_fstatat(path, sb) < 0 { return 0 } return 1 }
called by 1: v_grade calls 2: sys_mmapsys_fstatat
78func v_probeable(name: *u8, n: i64) -> i64
87func v_grade(name: *u8) -> i64
120func v_isdig(c: u8) -> i64 { if c >= (V_ASCII_0 as u8) { if c <= (V_ASCII_9 as u8) { return 1 } } return 0 }
121func v_isaln(c: u8) -> i64
128func v_matchat(buf: *u8, i: i64, n: i64, lit: *u8) -> i64 { var k: i64 = 0; while lit[k] != (0 as u8) { if i + k >= n { return 0 } if buf[i+k] != lit[k] { return 0 } k = k + 1 } return 1 }
called by 1: v_scan_magic
129func v_scan_magic(buf: *u8, n: i64) -> i64
calls 1: v_matchat
188func main(argc: i64, argv: *i64) -> i64